Gate diagram in Simulink

2 ビュー (過去 30 日間)
John Barton
John Barton 2023 年 6 月 5 日
回答済み: Bhanu Prakash 2024 年 7 月 19 日
I'm trying to make the following diagram in the simulink but there are some problems I encountered.
1) You can't have a line to somewhere when not connected
2) There are no logical buffers from what I've searched
3) don't know how to merge 2 lines together
If you know how to do this I would appreciate the help.

回答 (1 件)

Bhanu Prakash
Bhanu Prakash 2024 年 7 月 19 日
Hi John,
Please find below the workaround for the questions asked:
1. Unconnected lines
Yes, you can't have a line unconnected in Simulink. To work around this issue, there are several blocks in Simulink that you can use based on your use case::
  • To pass the inputs (A0, A1, A2, C, D, E) to the design/model, you can either use a 'Constant' block or a 'From Workspace' block (if you want to pass the inputs from the MATLAB workspace).
  • The output 'Q7' can be connected to a 'Display' block (to display the value), a 'To Workspace' block (to store its value in the MATLAB workspace), or a 'Terminator' block (to terminate any unconnected output port).
2. Logical buffers
To replicate the functionality of a digital buffer, you can either use the 'Unit Delay' or the 'Memory' block in Simulink, depending on your use case.
3. Merge two lines
In Simulink, you can merge two wires only when the first wire is properly connected between two blocks. To merge two wires, you need to first connect two blocks with wire-1, place a third block to which wire-2 needs to be connected, and then connect the two wires.
You can refer to the following image to merge two wires:
For further information regarding the blocks mentioned, you can refer to the following documentation links:
Apart from these Simulink blocks, there are several others that you can use. You can search and use the required blocks from the following list:
Hope this helps!

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by