Zeemz

Tutorial 4: Adding Signals to Waveform Viewer from Object Browser

Here is a tutorial to help you dump simulation signals to the waveform viewer for debugging from the object browser.

Step 1: Open up LogicSim
Step 2: File->New Project
Step 3: Enter "myproject" for project name and "mytopmodule" for top module when prompted, choose your desired location to save the project.

 

New Project

 

Step 4: File->New->Verilog, choose "Yes" when prompted "Add file to project?"
Step 5: Enter "wavedump.v" when prompted to save the new file
Step 6: Copy and paste the following code into the "wavedump.v" code editor

module mytopmodule();
reg osc;
reg [10:1] vec_reg;
wire tmp1, tmp2, tmp3;
integer num;
real real_val;
reg [10:0] tmp14, tmp15, tmp16;
reg tmp4, tmp5, tmp6;
reg [20:0] tmp24, tmp25, tmp26;

initial
begin

osc = 0;
vec_reg = 0;
num = 10;
real_val = 100;

repeat(20)
begin

$display("osc=%b", osc);
#20

osc = ~osc;
vec_reg = ~vec_reg;
num = num + 2;
real_val = real_val + 10;

end

end

endmodule

Step 7: File->Save File
Step 8: Simulation->Load Simulation
Step 9: Click on "Objects" pane to bring it into focus at the bottom of the workspace
Step 10: Click on "mytopmodule" in the "Hierarchy" pane, this will automatically populate the "Objects" pane with internal signals
Step 11: Right-click on "osc" in the "Objects" pane, choose "Add To Waveform", choose "Yes" when prompted "Add file to project?"
Step 12: Enter "wavedump.wave" when prompted to save the new file
Step 13: Simulation->Run Simulation, choose "Yes" when prompted "Save changes to wavedump.wave ?"

 

Add To Waveform

 

LogicSim will dump simulation signals that you selected in the object browser. Shortly, you will see values of selected signals being displayed on the waveform viewer after the simulation run is completed.

 

Last Updated: 20 Apr 2007
Date Created: 12 Apr 2007

 

Copyright © Zeemz. All Rights Reserved.
Home | Legal | About | Contact