Ironlord
Member level 3
- Joined
- Oct 16, 2018
- Messages
- 63
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Activity points
- 713
PROCESS(ep, es, reset, change)
BEGIN
IF(reset='1')then
es<=e0;
ELSE
CASE ep IS
WHEN e0 => --Estado de conf
es<=e1;
WHEN e1 =>
if(change='1')then
es<=e2;
end if;
WHEN e2 =>
es<=e2;
WHEN OTHERS =>
es<=es;
END CASE;
END IF;
END PROCESS;
espera<='1' when ep=e1 else '0';
go<='1' when ocupado='0' else '0';
command<=cmd_config when ep=e0 else cmd_write when ep=e2 else command when ep=e1;
data<=data_ports when ep=e0 else data_out when ep=e2 else data when ep=e1;
Warning (10631): VHDL Process Statement warning at pruebaI2C.vhd(58): inferring latch(es) for signal or variable "es", which holds its previous value in one or more paths through the process
I tried to edit my last post, but was impossible. Anyway, yes, I do, and I changed the state machine as it should be, just with the states.
As I mentioned earlier, you could have started with a simple project rather than an I2C, the learning curve will be very steep here.About your questions, yes, I know the differences between combinational and sequential circuits, but I'm not an electronic engineer, I'm a computer engineer and I often think in software where it isn't. I must change my mind but it's not a thing I can do from today to tomorrow, the process takes it time.
Single process isn't the problem here, it's not using registered (edge sensitive) logic.The one-process style always kills me a bit. It is a failing of VHDL/Verilog. From a technical standpoint, 2-process is strictly better.
In my view, two process state machine design is mainly a text book legacy.
As I mentioned earlier, you could have started with a simple project rather than an I2C, the learning curve will be very steep here.
So if time is a constraint on your side, then I would still say use IP cores.
Hi,
You are in the mV range, close to zero Volts. Are you sure you installed the pullup resistors correctly?
Klaus
The Board is a Terasic DE10-Nano.Warning (169133): Can't reserve pin SCL -- pin name is an illegal or unsupported format
Warning (169140): Reserve pin assignment ignored because of existing pin with name "SCL"
Warning (169133): Can't reserve pin SDA -- pin name is an illegal or unsupported format
Warning (169140): Reserve pin assignment ignored because of existing pin with name "SDA"
Hi,
external resistors are mandatory! - you really should read some I2C specification.
They are real resistors and need to be connected / soldered as pullup rsistors at SCL and SDA. They have nothing to do with HDL, Quartus or anything else..
Klaus
Every basic I2C specification shows this. Every basic I2C turorial shows this.I don't know how is the circuit to make a pull-up resistor nor how? Could you facilitate me a scheme or something?
Please show oscilloscope waveforms that includes start condition, address byte, expected acknowledge. Even in the simulation waveforms there's no complete record yet.
The one-process style always kills me a bit. It is a failing of VHDL/Verilog. From a technical standpoint, 2-process is strictly better. but who cares? The languages aren't designed for HW development.
The one-process style always kills me a bit. It is a failing of VHDL/Verilog. From a technical standpoint, 2-process is strictly better. but who cares? The languages aren't designed for HW development.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?