0% found this document useful (0 votes)
106 views

LAB1 Simulation

This document provides instructions for simulating a design using Cadence Xcelium and viewing the results. It describes how to set up the file structure, run simulation from the command line, generate a waveform file, and open the waveform in the GUI tool SimVision. The key steps are running Xcelium to simulate the design, adding code to the testbench to dump the waveform, and using SimVision to view the waveform and debug signal values.

Uploaded by

nhân đặng
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

LAB1 Simulation

This document provides instructions for simulating a design using Cadence Xcelium and viewing the results. It describes how to set up the file structure, run simulation from the command line, generate a waveform file, and open the waveform in the GUI tool SimVision. The key steps are running Xcelium to simulate the design, adding code to the testbench to dump the waveform, and using SimVision to view the waveform and debug signal values.

Uploaded by

nhân đặng
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

BKU / RVC / CADENCE COLLABORATION

LAB 1 - SIMULATION

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved.


Overview
 This Lab will familiarize you with one of Cadence simulation tool - Xcelium.

 This Lab will cover the following:

 How to use Xcelium for execute simulation


 How to generate Waveform file by Xcelium
 How to debug by using GUI (Graphic User Interface)
 In this material, command-line instructions are shown with gray background, for example:

%> mkdir simulation_env


%> cd simulation_env

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 2
Getting Started
 Firstly, please create the tree folder as below:  To do that, execute below
${Student_ID} commands:
|-- ouput  Output folder %> cd vlsi
|-- design  Used to store your output design %> mkdir {Student_ID}
`-- doc  Used to store your output document %> cd {Student_ID}
|-- work  Working folder %> mkdir output
|-- simulation_env  Simulation’s work-place %> mkdir output/design
|-- synthesis_env  Synthesis’s work-place %> mkdir output/doc
`-- lec_env  Equivalence checking’s work-place %> mkdir work
%> mkdir work/simulation_env
%> mkdir work/synthesis_env
%> mkdir work/lec_env

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 3
Simulate with Xcelium (1/2)
 Step 1: Change directory to simulation_env folder. In this Lab 1, we will work at this place:
%> cd work/simulation_env
 Step 2: Copy Design file and Testbench file into this place.

 Step 3: Execute below commands to get permission for using Xcelium:

%> cd /home/share_file/cadence/
%> source add_path
%> source add_license
%> cd -
The last command “cd -” use to turn back to simulation_env directory

 Step 4: Execute “xrun -access rw -licqueue -64BIT -l run.log ${testbench_file} ${design_file}”


For example:
%> xrun -access rw -licqueue -64BIT -l run.log testbench.v bound_flasher.v
© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 4
Simulate with Xcelium (2/2)
 Step 5: After simulation finish, you can check the simulation result via Log file “run.log”
%> vi run.log
 Step 6: Each time you want to execute simulation, you need to perform Step 3 -> Step 4 again.
It may inconvenience. To avoid that, you can add all commands into 1 file (ex “go_sim” file):

Don’t forget to
add this line

After that, for simulation, you can execute only: %> source go_sim
WARNING: The simulation time might less than 5 minutes. If it over 5 minutes, it might hang-
up.
When it hang-up, please press “Ctrl + C” to stop the simulation
© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 5
Generate Waveform file
 Step 1: Add following code lines into the testbench file:
initial begin
$recordfile ("waves");
$recordvars ("depth=0", testbench);
end
Must be same
 Step 2: Re-execute simulation. End simulation
WARNING: Before execute simulation with
dumping Waveform, please ensure that
your Testbench has the “$finish” code line
to end the simulation

 Step 3: After simulation finish, check that the Waveform


file has been dumped – “waves.dsn” and “waves.trn”

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 6
Open Waveform by GUI (1/4)
 Step 1: Execute below commands to get permission for using Xcelium:
%> cd /home/share_file/cadence/
%> ssource add_path
%> source add_license
%> cd -
 Step 2: Execute %> simvision -64 &

 Step 3: Like above, you can add all command into 1 file (ex “go_gui” file) and execute only:
%> source go_gui
Don’t forget to
add this line

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 7
Open Waveform by GUI (2/4)
 Step 4: The GUI will be opened like below

Tool bar

Waveform’s
display area
Signal
name
area
Signal name
area

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 8
Open Waveform by GUI (3/4)
 Step 5: Click “File” -> “Open Database”  Step 6: Choose Waveform file -> “Open &
Dismiss”

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 9
Open Waveform by GUI (4/4)
 Step 7: Select Design -> Select signals -> Signal’s wave will be displayed

Select design

Signal’s wave
Select
signals

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 10
Some useful buttons in GUI (1/3)
 Zoom In (+) - Zoom Out (-) - Zoom Full (=)  Auto add to Wave-view button
buttons When this button active (red light), click on to any signal
will add it to Wave-view automatically.
When this button in-active, you need to press “Ctrl + W”
to add targeted signal to Wave-view

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 11
Some useful buttons in GUI (2/3)
 Open Source code Browser button

Select signal then Click

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 12
Some useful buttons in GUI (3/3)
 Open Schematic Tracer button

Select signal then Click

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 13
THANK YOU FOR YOUR LISTENING

© 2021 Renesas Design Vietnam Co., Ltd. All rights reserved. Page 14

You might also like