Replies: 3 comments 2 replies
-
Nice fix! 👍 But I am not sure if this is really necessary. However, I am no expert here. @umarcor what do you think about this? 😉 |
Beta Was this translation helpful? Give feedback.
-
For simulation-only it would be nice to convert the TWI signals into a binary value (0 or 1). At least for the TWI clock line this is helpful, as we need to check this for "clock stretching". Currently, clock stretching is detected by this logic (all signals are of type clk_gen.halt <= '1' when (io_con.scl_out = '1') and ((io_con.scl_in_ff(1) = '0') else '0'; However, I am not sure what exactly happens when we are using
Is this what @umarcor maybe you can help out 😉 |
Beta Was this translation helpful? Give feedback.
-
Hi Stephan,
Yes FUNCTION To_bit ( s : std_ulogic
--synopsys synthesis_off
; xmap : BIT := '0'
--synopsys synthesis_on
) RETURN BIT IS
-- pragma built_in SYN_FEED_THRU
-- pragma subpgm_id 205
BEGIN
--synopsys synthesis_off
CASE s IS
WHEN '0' | 'L' => RETURN ('0');
WHEN '1' | 'H' => RETURN ('1');
WHEN OTHERS => RETURN xmap;
END CASE;
--synopsys synthesis_on
END; https://www.csee.umbc.edu/portal/help/VHDL/packages/std_logic_1164.vhd |
Beta Was this translation helpful? Give feedback.
-
neorv32/rtl/core/neorv32_twi.vhd
Line 286 in 0e194c0
In a TB can the I2C Pull-up emulated by the asignment of 'H'. To convert this weak high ('H') to a strong High ('1') ccould be used the following statement:
This avoid the read-in 'H' levels into the processors deeper logic. What do you think
Cheers,
Andreas
Beta Was this translation helpful? Give feedback.
All reactions