Pre-simulation using nclaunch

Prepared by:

Hui Geng

Updated by Travis Schulze

Updated by Yin Sun

Updated by Muqi Ouyang

Before you Begin: Read FAQ's and Do's and Don'ts!

To start Cadence:

  • Login to the Linux System in EECH 107.

Available Linux server: rcNNxece107.managed.mst.edu, where NN = 36 ~ 40

For more details on starting Cadence Virtuoso, please find the instruction at PuttyXmingInstruction.docx - Google Drive

  • Open a terminal window.

  • Alternately, if you are logging in from a Windows system,

  • Click on the Start>XLaunch

  • Then, open Putty (Start> Programs > Putty ) and enter a remote login rcNNxece107.managed.mst.edu

  • Navigating back to the main screen on Putty select Open to connect

  • Navigate to the SDRIVE (cd dfs/users/yourAccountName) and create a new directory just for this Cadence library using "mkdir filename". This will be the directory for the NCSU library and is only to be used for that library.

  • Navigate to the new directory.

Input source code:

Updated on Feb 2022:

  • You can download the files at the end of this page and copy them into the folder you created in the previous step. Then, you can skip this "Input source code" section and continue in the next section.

  • The editor emacs is not installed on the current server. To view or edit those files in Linux, please use vim.

Ø Type "emacs &" in the Terminal to open the editor. (You can also choose gedit, or vim as your editor).

Ø Go to File->visit New File…

Ø Enter your file name, please use counter.v here. (Otherwise you need to change all the file names in the following steps accordingly.)

Ø Download the source code from the bottom of the page and type or paste into the emacs window and save.

Ø For the paste operation, you can select "Edit->Paste", ctrl-v not work

Ø Create another file named testbench.v and input the testbench file also found at the bottom of the page and save.

Run simulation

Ø Type "nclaunch &" in the terminal to start the simulator, and select "Multiple Steps" for on first time use.

Ø Go to File-> Set Design Directory ->, then choose your directory, for example ~/CBIC_TEST, and click on Create cds.lib.

Ø Click on Save

Ø Choose "include default libraries(vhdl or mixed design)"

Ø Click on Save

Ø Then your window should look like this

Ø Compile the files, both counter.v and test_bench.v should be compiled.

Ø After compiling, there will be some folders under worklib, please click on the + before the worklib to check the content under worklib.

Ø Click the “+” before test_bench (test_bench is under worklib) to get the file list of your design, and then select module of test_bench. After that click on the button on the top of nclaunch to start the Elaborator.

Ø Click the “+” before snapshots and select the worklib.test_bench: module, then start the simulator

Ø The following two windows will be started after you start the simulator

Ø In the Design Browser 1 window, select test_bench, and hit right key of mouse, select Send to Waveform Window

Ø You will get the waveform window like this:

Ø Input run 1000 ns in the console window to start the simulation.

Now you are ready for Part 2

Ø The final result should be like the following waveform.

When up_down = 1, the counter increases 1 each clock, and when up_down = 0, the counter decreases 1 each clock