0
\$\begingroup\$

Can the weak-pullup 'H' assignment of std_logic be synthesized, or is it only allowed in simulation? You're probably wondering why I would want to do this: I'm trying to emulate both the master and slave I2C devices inside the same FPGA (internal bi-directional bus), thus I have no external pull-up resistor. I'm not sure what input logic level the FPGA will see when both master and slave are set to 'Z'. I realize that since both devices are inside the FPGA, I could just avoid using the bi-directional buffer, but I'd like to be able to use the same exact i2c master code, as is, and at a later time route it to real hardware.

asked Mar 18, 2021 at 21:59
\$\endgroup\$
1
  • \$\begingroup\$ As far as I know, it's just a simulation model for pull ups. Not synthesisable. \$\endgroup\$ Commented Mar 20, 2021 at 11:32

1 Answer 1

1
\$\begingroup\$

There won't be a universal answer except "no".

But check the synthesis guide for your chosen FPGA in case it is an exception (can synthesise 'H' to an internal pullup).

You'd be better treating the output and input aspects separately on your cores (SDAout/SDAin) and combining both/all SDAouts (which are '0' or '1') in logic gates in the top level design, and feeding the result to all SDAins. (Ditto SCL to handle clock stretching).

This mimics the strategy of avoiding bidirectional internal buses with Data_Out/Data_In buses and multiplexing in the top level design.

answered Mar 18, 2021 at 22:37
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.