How to find the simulation time of digital circuits?

1 visualizzazione (ultimi 30 giorni)
I want to simulate some digital circuits and see the variation of signals at the different stages of the circuits. Also, I need to find the time it takes for the signal to propagate. For example, let us consider a basic AND gate shown below.
The scope always shows the time taken for the signal to reach the high state as immediate, no matter what value I set the simulation time to. Like for example, in this case I have reduced the simulation time to picoseconds and still the output change is shown to be immediate.
So, my question is how to find the delay or simulation time of various circuits.
Thanks.

Risposte (1)

Jose Lara
Jose Lara il 27 Dic 2016
The reason the response of the signal is immediate is because there is only one computation performed, which is the logical operation. In order to create a model with simulation time, you should make an input that is dependent in time. For example, instead of using a constant block as an input, use a Pulse Generator block as shown below:
Change the ‘Period’ to 0.5 seconds and the ‘Pulse Width’ to 50 percent of the period. Simulate the model and open the scope. The input to the logical operator will now have a time component and will calculate at the correct time.
As you can see, the pulse generator is compared to the input of the Constant block each step. You can change the step size by navigating to the Fixed-Step Size (fundamental sample time) option under Configuration Parameters > Solver.
Check out the following links for more information regarding sample time:

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by