Quickstart Guide to Using
CADENCE AFFIRMA NCVHDLPrepared by Sharad Kumar ,S00
(kumarsha@egr.msu.edu)
Reviewed by Arun Narayanan, F00
(arunkum2@egr.msu.edu)
Step 1 : Create the folder for the design.
> mkdir <folder_name>Step 2 : Setting up the environment.
To start using the Cadence tools one needs to source a script which contains all the necessary path and setup information to invoke the tool. Type the following on the UNIX command prompt.> source $SOFT/cadence
Create a user library called worklib in your design folder.
> mkdir worklibTwo other setup files, listed below, are required before you can start using the tools. Copy the contents from here into your design folder. These files specify the path to libraries and also create a user work library. In this case the user work library has been called worklib but can be given any name.
SOFTINCLUDE $CDS_INST_DIR/tools/inca/files/hdl.var
DEFINE USE_NEW_SIMWAVE_WINDOW ON
DEFINE EDITOR vi
DEFINE CDS_TEXT_EDITOR vi
DEFINE WORK worklib
2. cds.lib
SOFTINCLUDE $CDS_INST_DIR/tools/inca/files/cds.lib
-- This cds.lib file was made by the Notebook Startup
-- as part of a Create Work Area command
-- File Created at Tue Dec 21 3:32:44 1999
DEFINE worklib ./worklib
architecture trial_rtl of trial is
begin
architecture tb_arch of test_trial is
component trial
port
(
begin
UUT : trial
port
map
(
The elaborator, ncelab, constructs a design hierarchy based on the instantiation and configuration information in the design, establishing signal connectivity, and computes initial values for all objects in the design. The elaborated design hierarchy is stored in a simulation snapshot file, which is used by the simulator.
Analyze the design.
> ncvhdl <filename.vhd>
--(Generic Command)
(Note: Type ncvhdl -help for a complete list of available options)
For our specific case:
> ncvhdl trial.vhd
> ncvhdl test_trial.vhd
Elaborate the design.
> ncelab my_lib.top:behav
--(Generic Command)
( Note: my_lib is your library where design is kept, top is the name of the design entity and behav is the name of the design architecture. Type ncelab -help for a complete list of available options )
For our specific case
> ncelab worklib.trial:trial_rtl
> ncelab worklib.test_trial:tb_arch
(Note: The design file needs to be analyzed and elaborated before
the testbench file.)
> ncsim my_lib.top --(Generic Command)
For our specific case we would like to view the simulation in a GUI so also specify the -gui option)
> ncsim -gui test_trial &
(Note : We are simulating only the testbench. Our design was declared as a component in the testbench.)
You should see a simulator window as shown below.
Notice that the window in figure 1 displays the architecture of
the testbench file. The menu's of this tool are quite extensive and provide
the user with a lot of debugging facilities like setting breakpoints and
watch values, which should sound familiar to users of C/C++ debugger. Another
thing to note is that the lower portion of the window gives a command prompt
(ncsim>). This allows you to type a command rather than choosing
options from the menu. For large designs with many hierarchical .vhd files
it is also possible to write scripts to do a complete design starting from
compile to simulation.For our simple design we will, however, move on to
the displaying the waveform for our design.
To invoke the Signal scan click on the button
in the upper right corner (refer figure 1). You should see the DAI Signalscan
with the signals you selected (figure 3).
Step 7 : Running the Simulation.
This concludes the brief tutorial for using AFFIRMA NCVHDL tools in Cadence. The HELP on these tools is very good and extensive. Refer to this for any detailed description on using the advanced options for compiling, simulation and waveform viewing.
References
[1] Affirma NC VHDL Simulator Help.