Flip Flops and other logic circuits

3 次查看(过去 30 天)
I have tried to produce a Flip Flop with a standard pair of NOR gates but I get an algebraic error. What do I need to do to make the flip flop work? I feel that this effect is everywhere in logic circuits and if Simulink cannot do this natively then what else will its capability deviate from the reality.

回答(1 个)

Daniel
Daniel 2023-7-31
编辑:Daniel 2023-7-31
The crucial features of paired (transistor) NOR gates which make a flip-flop work are:
  1. Propagation delay. Simulink models things instantaneously by default. If you want to model propagation delay, you can either add a Transport Delay or Time Delay block, or you can use Simscape Electrical.
  2. NOR gates are built by pairing transistors that have a nonlinear behavior across a range of input voltages, to get a bistable output value of something-near-GND or something-near-VCC based on the inputs received. Simulink models a NOR gate as a simple logical operation, where either input being true produces an output of false and neither input is true produces an output of true. You miss the analog behavior, which is also relevant to transient behavior of the transistor-based real-life NOR gate. To model that behavior, you would need to feed the transistors' (or transistors' and resistors') nonlinearity models into Simulink (perhaps with a 1-D Lookup Table, and you could get away with something simpler for a resistor since it's really linear), or, again, you can use Simscape Electrical.
What are you trying to do that requires you to twist NOR gates together to make a flip-flop, or were you doing this for curiosity's sake?

类别

Help CenterFile Exchange 中查找有关 General Applications 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by