Académique Documents
Professionnel Documents
Culture Documents
Introduction
In this tutorial you will use Xilinx 10.1 to analyze and simulate a clocked sequential circuit. The circuit to be simulated uses an edge triggered JK-type flip-flop and an edge triggered D-type flip-flop.
Q1
Q0
When you power up a circuit containing flip-flops, the initial state of the flip-flops is unknown. You need to clear the flip-flops before you can begin the actual simulation. To do this, assert the CLR input (set it to 1) for 1 clock period at the beginning of the simulation. After the first clock cycle, set your CLR to 0. Note that the input sequence is applied only after the flip-flops have been reset or cleared. As long as the CLR input is 1, the outputs (Q1, Q0) will always be 0. So when CLR is 0, start applying your input sequence DI = 01011111.. in the second clock cycle. Your input stimulus is shown in Figure 3. Save the test bench waveform. To set the end of simulation to 1200 ns, click on wave (wave.tbw) in the Sources for: Behavioral Simulation sub-window. Now in the Processes sub-window, right click on the option Simulate Behavioral Model and select the Properties. In the Process Properties window, change the Simulation Run Time to 1200 ns. Save the waveform for the test bench setup. To simulate the circuit, double-click on Simulate Behavioral Model in the Processes sub-window under ModelSim Simulator.