Interfacing an FPGA to an SRAM which has a bidirectional data bus

4 次查看(过去 30 天)
Problem: Need to interface an external SRAM device to an FPGA The SRAM device has a bidirectional data bus Simulink HDL coder does not appear to support bidirectional pins. Need to avoid stepping out of the Simulink/Stateflow environment.
Question: How to implement the bidirectional nature of the SRAM data bus in a Simulink Model/Stateflow chart.
Observation: I can do it if I create a custom VHDL module that I would then need to compile into a complete FPGA project. This would mean I would have to step outside the Turnkey environment of Simulink (where I can generate the entire project in simulink without having to step out to Quartus) I would hope there is a better solution :)

回答(1 个)

Kiran Kintali
Kiran Kintali 2021-5-22
Specify Bidirectional Ports
You cannot simulate bi-directinal ports in Simulink (Simulink is a synchronous data flow language, outputs depends on inputs and state in the subsystem representing your design).
However during HDL Code generation you can mimic bidirectional ports using code generation settings on a blackbox. Bi-directional ports are propagated to the top of the DUT from the blackbox.

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by