Hello there;
I have simulated a module with an external temperature sensor(LM75). In
the top Level module the port were defined as "inout" type something
like this
1 | i2c_scl : inout std_logic;
|
2 | i2c_sda : inout std_logic;
|
3 | ….;
|
4 |
|
5 | achitecture behav of top_level is
|
6 |
|
7 | Signal i2c_scl_int : std_logic;
|
8 | Signal i2c_sda_int : std_logic;
|
9 | …. ;
|
10 | begin
|
11 |
|
12 | i2c_scl <= '0' when i2c_scl_int ='0' else 'Z';
|
13 | i2c_sda <= '0' when i2c_sda_int ='0' else 'Z';
|
14 | … ;
|
15 | end;
|
With the above Code my Output was "ZZ" every time and I have to modify
the LM75 source Code as well as the i2c Controller Code to get a proper
Output Signal.
I would like to know if there is any other Approach by not modifying the
source Code and only add some Code in the testbench?
Thank you.