How to find the simulation time of digital circuits?

2 次查看(过去 30 天)
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.

回答(1 个)

Jose Lara
Jose Lara 2016-12-27
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:

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by