0% found this document useful (0 votes)
5 views2 pages

Modelsim

The document outlines the steps to run the TB_JK_FlipFlop testbench in ModelSim, starting from opening the software to running the simulation. Key steps include creating a new project, adding and compiling source files, loading the testbench, adding signals to the waveform, and running the simulation. It also provides debugging tips for checking signal assignments if incorrect outputs are observed.

Uploaded by

ashimsapkota0.32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Modelsim

The document outlines the steps to run the TB_JK_FlipFlop testbench in ModelSim, starting from opening the software to running the simulation. Key steps include creating a new project, adding and compiling source files, loading the testbench, adding signals to the waveform, and running the simulation. It also provides debugging tips for checking signal assignments if incorrect outputs are observed.

Uploaded by

ashimsapkota0.32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ModelSim Steps

To run the testbench (TB_JK_FlipFlop) in ModelSim, follow these steps:

1. Open ModelSim

 Launch ModelSim.

2. Create a New Project

 Go to File → New → Project.

 Provide a project name and select a working directory.

 Click OK.

3. Add Source Files

 Right-click in the Project tab and select Add Existing File.

 Add the VHDL files (D_FlipFlop.vhd, JK_FlipFlop.vhd, TB_JK_FlipFlop.vhd).

4. Compile the Files

 In the Library tab, ensure work is selected.

 Right-click each file and click Compile.

 Compile the files in the following order:

1. D_FlipFlop.vhd

2. JK_FlipFlop.vhd

3. TB_JK_FlipFlop.vhd

 Ensure there are no compilation errors.

5. Load the Testbench

 In the Library tab, expand work and find TB_JK_FlipFlop.

 Right-click on TB_JK_FlipFlop and select Simulate.

6. Add Signals to Waveform

 In the simulation window, go to View → Wave.

 Right-click in the waveform window and select Add → Signals in Design.

 Select all signals (J, K, CLK, Q, Q_bar) and add them.

7. Run the Simulation

 Click Run and specify the simulation time (e.g., 200 ns).

 Observe the waveform for expected outputs.


8. Debugging (If Needed)

 If incorrect outputs appear, check signal assignments.

 Use View → List to check signal values.

You might also like