Lab0 Xcelium
Lab0 Xcelium
Hai Cao X.
Abstract
This document presents the basic usage of Xcelium, Cadence, for logic design and verification. It first
explains the typical flow of Front-End development and then how to manage projects appropriately. With
two ways of verifying a design, students will learn to use both, depending on which phases they’re in
while designing, and also how to use this commercial tool in the SERVER203. In case you meet an error
or have any improvement in this document, please email the TA: [email protected] with the
subject “[COMPARCH203 FEEDBACK]”
1 Objectives
• Understand the design flow of Front-End, both logic design and design verification
1
2 Design Flow for Front-End Development
2
3 Project Management
To have a neat and organized project, students need to structure their project directory efficiently. The below
tree directory is an example that students must follow.
2. Each testbench for each source code file must have the same name with suffix _tb
4. All simulation-related files, such as filelist and submit files, are in 10_sim
5. In 10_sim, students will run all their simulation tasks to avoid polluting source code and testbench
files
3
4 Text-based Verification
4.1 Half adder
First, investigate the source file hadder.sv and identify two bugs: a functional bug and a syntax bug.
After finishing coding, students need to run a command to check syntax (or lint for both syntax checks and
structural checks) before going to simulation phase. Going to 10_sim and that command is in line 14 of
checksyntax.submit. However, students need to provide a lot of lines before that so they can submit this
command to the server.
1 #!/bin/bash --login
2 #SBATCH --job-name=checksyntax
3 #SBATCH --account=hai.cao
4 #SBATCH --ntasks=1
5 #SBATCH --nodes=1
6 #SBATCH --cpus-per-task=1
7 #SBATCH --time=00:10:00
8 #SBATCH --mem-per-cpu=1G
9 #SBATCH --partition=phobos
10 #SBATCH --out=checksyntax.out
11
job-name the name of this file, students should name it after the task they want to do
time the expected time this job will finish. Remember, your job will be prioritized to be executed if it uses less
time than others.
mem-per-cpu the RAM/memory this job needs. You will know how much to use after several run.
But, students need to invoke or load the tool first, so add module load xcelium before the main
command.
The last command is for lint checking the SystemVerilog file ../00_src/hadder.sv. Remember that
you’re in 10_sim
Investigate the output file in the same directory and fix the syntax bug. Then, open the file hadder_tb.sv
to learn how to write testbench and compare what are the differences between checksyntax.submit and
hadder.sv.
Hint: -f hadder.f will take all files in hadder.f, so you don’t need to list a lot files in a single command.
Now that submit hadder.submit and enjoy the functional bug that causes the simulation failed. There are
some useful command to track jobs: sacct and squeue. Please try these two and discover yourselves.
4
The functional bug is really simple. Go back to hadder.sv, fix that bug and re-run the job until it shows
“TEST PASSED”.
5 GUI-based Verification
Xcelium provides a tool called SimVision that helps users debug with wide-range of features: wavefore,
source browser, etc. As in the last section, students learn how to submit jobs to get text-based results. Even
though that is fast, but occasionally, they still require a more visual result to debug.
First, unlike the above example that students list all parameters in a file to ask the server doing their jobs,
they now will access to the compute node and only run Xcelium command (xrun). To access the compute
node, say phobos, run:
time the expected time this job will finish. Remember, your job will be prioritized to be executed if it uses less
time than others.
mem-per-cpu the RAM/memory this job needs. You will know how much to use after several run.
The first one is to ask the server allocating a slot with those familiar parameters like the submit file
above
The second command is to access to the compute node. Notice the host name after @ change when you
run this command.
When in the compute node, students need to load the tool first:
This, however, just prints the text result like in the previous section. In order to invoke the SimVision, use
this command instead:
Now, when the SimVision windows are all open, feel free to explore this tool yourselves using the sample
files.