필터 지우기
필터 지우기

Tri-state buffer in simulink

조회 수: 13 (최근 30일)
Adrin
Adrin 2015년 1월 22일
답변: Sergio Luis Martínez 2020년 5월 29일
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,

답변 (3개)

Tim McBrayer
Tim McBrayer 2015년 1월 22일
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 2015년 2월 6일
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 2020년 5월 29일
Una propuesta simple: Compuerta activada con 1.

카테고리

Help CenterFile Exchange에서 Buffers, Switches, and Counters에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by