P
Peter Hermansson
Guest
Hi,
I am rather confused about the use of procedures in testbenches. My
intention is to model an I2C-bus with pullup resistors. My testbench
consists of a testprocess with a couple of procedures;reset, do
something, check that, do something else, check that etc.
If I set the I2C SCL and SDA line to 'H' in the reset-procedure and
then to '0' in another later procedure, everything is fine. But if set
them to 'H' outside the test-process, in the parallell part of the
code, both are 'U' from the very beginning of the simulation.
Both SCL and SDA are declared std_logic so why isnt the conflict
between 'H' and '0' resolved? And why are they 'U' from the beginning,
not just from the point in time were they are set to '0'?
I am sure that there is a very basic answer to this question and I
would be grateful if someone could provide it.
Regards, Peter
I am rather confused about the use of procedures in testbenches. My
intention is to model an I2C-bus with pullup resistors. My testbench
consists of a testprocess with a couple of procedures;reset, do
something, check that, do something else, check that etc.
If I set the I2C SCL and SDA line to 'H' in the reset-procedure and
then to '0' in another later procedure, everything is fine. But if set
them to 'H' outside the test-process, in the parallell part of the
code, both are 'U' from the very beginning of the simulation.
Both SCL and SDA are declared std_logic so why isnt the conflict
between 'H' and '0' resolved? And why are they 'U' from the beginning,
not just from the point in time were they are set to '0'?
I am sure that there is a very basic answer to this question and I
would be grateful if someone could provide it.
Regards, Peter