How to create tri-state interface in block design? #986
-
I am having an issue creating a tristate output (specifically, for onewire) using the neorv32 wrapper in a Vivado block design. Using logic as described in the Datasheet, I created a VHDL module (relevant lines shown below):
I then right-click in the diagram and select Add Module. I connect the bus_i pin to onewire_i on the neorv32, and the bus_o pin to the onewire_o pin. I then attempt to connect bus_io to a board pin referenced in the constraint file. I have tried both "Make External" and "Create Port" on the bus_io pin. In either case, I get the following error when implementing the design:
I'm guessing I probably am taking the wrong approach here, but I'm not sure how this should be done. I have successfully used onewire in a non-block design where I instantiate a neorv32 instance from Verilog using similar logic to that above with the io wire being and inout port in the top design. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @franksmicro!
Oh I know what you're talking about! 😅 Vivado has some issues inferring tri-state drivers that are not at the top level...
So you wrap-up this logic as another IP block for the block design? Sounds right, but also very complicated?! 🤔 For block designs I just use the "Utility Buffer" from the IP catalogue and configure it as simple Here is the documentation: https://docs.amd.com/r/en-US/ug953-vivado-7series-libraries/IOBUF Just add two of them and connect them right to the core's TWI ports. Use a single "Constant" block with "Value = 0" to tie the output signal to low (I don't know why I am using two of them here...) and make the "IO" ports external. To be precise, these tri-state drivers are not at the top level either... However, Vivado is happy with this. 😉 |
Beta Was this translation helpful? Give feedback.
Hey @franksmicro!
Oh I know what you're talking about! 😅 Vivado has some issues inferring tri-state drivers that are not at the top level...
So you wrap-up this logic as another IP block for the block design? Sounds right, but also very complicated?! 🤔
For block designs I just use the "Utility Buffer" from the IP catalogue and configure it as simple
IOBUF
:Here is the documentation: https://docs.amd.com/r/en-US/ug953-vivado-7series-libraries/IOBUF
But be careful …