Tri-state buffer in simulink

14 visualizaciones (últimos 30 días)
Adrin
Adrin el 22 de En. de 2015
Respondida: Ying Bai el 25 de Jun. de 2025
Hi,
I am trying to use a tri-state buffer (logic : 1,0,Z) in a simulink model in order to test a vhdl component. Any suggestions ?
I thank you in advance,
Best regards,

Respuestas (4)

Tim McBrayer
Tim McBrayer el 22 de En. de 2015
Support for enumerated types was added to HDL Coder in R2014a. You could try making an enumerated type in Simulink that contained the values you need. But, I don't expect that VHDL will equate your custom enumerated type with std_logic or std_ulogic.

Girish Venkataramani
Girish Venkataramani el 6 de Feb. de 2015
Unfortunately, there's not a concept of an inout port in Simulink and this makes it hard to model a tri-state buffer. But, we have a somewhat manual workaround:
You can set a DUT input port as a Bi-directional port in the HDL block properties for the port object (right-click on an input port, select bidirectional port type in the HDL Block properties dialog). This will generate HDL with an 'inout' type for this port.
You should then connect this port to a subsystem, which you should black-box (again, HDL block properties for Subsystem and choose 'BlackBox' for the architecture). This will give you HDL with inout port and a place-holder module (the black-boxed subsystem) connected to the inout port - you will then have to hand-code the tri-state logic in this place-holder module.
Hope this makes sense.

Sergio Luis Martínez
Sergio Luis Martínez el 29 de Mayo de 2020
Una propuesta simple: Compuerta activada con 1.

Ying Bai
Ying Bai el 25 de Jun. de 2025
Try to use Switch block that has a similar function as a tri-state block.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by