Lab 1 - EE 421L 

Authored by Ricardo Rodriguez

UNLV E-mail: rodrir15@unlv.nevada.edu

August 25, 2021


Lab 1 for ECE 421L is designed to introduce the Cadence program for simulation, design, and layout of a chip. 

We will be using an Xterm to access Cadence (MobaXterm in this case)

We started this process by downloading the NCSU Cadence Design Kit (CDK) from the NCSU wiki.

Since the file will be a .tar, we will have to unzip the file to access the NCSU CDK folder for upload  to the 

UNLV ECE EDA Server.   

In my particular case, I uploaded the .tar file into my $HOME directory in the EDA Server and unzipped it 

by using the commands 

tar -xvf NCSU-CDK-1.6.0.beta.tar followed by the command 

tar -xvf NCSU-CDK-1.6.0.beta.tar.gz

       

    

     

From there, in the .bashrc file in the $HOME directory, the following lines were added to the end of the file

export SPECTRE_DEFAULTS=-E

export CDS_Netlisting_Mode=Analog

export CDS_LOAD_ENV=CWDElseHome

export CDK_DIR=$HOME/ncsu-cdk-1.6.0.beta 

and then promptly resource the bash file using the ". .bashrc" command.

To keep the directory organized, we create the CMOSedu folder for our Cadence files.

We also have to rename cdsinit, simrc, and cdsenv files to be hidden by adding a "." in the front

of their names after we move the NSCU CDK files into the CMOSedu folder. 

In the cds.lib file, we need to define libraries that we will need. We do this by adding these lines 

in the cds.lib file.

DEFINE analogLib /usr/cadence/IC615/tools.lnx86/dfII/etc/cdslib/artist/analogLib

DEFINE functional /usr/cadence/IC615/tools.lnx86/dfII/etc/cdslib/artist/functional

DEFINE sbaLib /usr/cadence/IC615/tools.lnx86/dfII/etc/cdslib/artist/sbaLib
envSetVal("asimenv.startup" "simulator" 'string "spectre")

The last line above sets our default simulator to spectre from hspice, as it is the one we will be using for

this course. Before we can start Cadence, we need to delete some files for it to work properly. 

These files are divaDRC.rul, divaEXT.rul, and divaLVS.rul.

The directory is $HOME/ncsu-cdk-1.6.0.beta/lib/NCSU_TechLib_ami06

We replace them with the same files from this link.

Once finished, we can start up cadence with the command virtuoso & and we will be able to see the library page.

     

 

     

Next, what we wanna do is create a new library by going File -> New -> Library. For the sake of this tutorial,

we're gonna name the library Tutorial_1 and assign it the AMI 0.60u tech library and then we can hit OK.

However, we will also need to define the library in our cds.lib file so we can access the file freely.

     

   

     

After we define the newly made library in the cds.lib file, we can go ahead and make a new cell for it.

Click on Tutorial_1 and then File -> New -> Cell View and we can name the cell R_Div and select schematic.

Once we open the cell's schematic, we can create an instance and start adding components. To create,

we go to Create -> Instance or hit the key "I" for instance.

     

   

     

We should see two new windows pop up. The add instance window and the component browser. We can select a 

resistor by going to the NCSU_Analog_Parts and selecting res under the R_L_C library in the component browser.

We can make the value of the resistor 10K ohms. If we go back to the schematic page, we can go ahead and place two 10K Ohm resistors. 

       

   

         

          

       

 

              

          

   If we'd like to edit the properties of an already existing instance,   

   we can select the instance and go to Edit -> Properties -> Objects 

   or, more conveniently, simply press Q. 

         

           
       
       
        

              

We can create an instance of ground by navigating to the Supply_Nets library and selecting gnd in the 

component library. The voltage supply will be found under the Voltage_Sources library of the 

component library window. For this schematic, we're gonna create a 1V DC voltage supply.

       

After adding in the ground and voltage supply, we can wire together the schematic by 

pressing the bindkey "w". 

To keep things organized, we can label wires and nets by pressing the "L" key.

     

 

       

Once everything is in order, it is important to check and save the schematic so that we can 

successfully run a simulation. Afterwards, we can launch our Analog Design Environment

by going to Launch and selecting an ADE type.

       

 

     

Given that we already set the default simulator to spectre, we should see that by going to

Setup -> Simulator/Directory/Host through the ADE window, that our simulator is spectre. 

       

 

       

Let's make the simulation run as a transient. We do this by going to Analyses -> Choose or by selecting the top button on the 

right-most side of the ADE window. From here, we can choose trans, 1 second, and enable the analyses type. 

We can also select the components that we want to be plotted by going Outputs -> To be Plotted -> Select on Schematic, or alternatively, 

pressing the blue button two units under the choose analyses button and selecting "From Schematic" from the middle of the new window.

       

     

       

We can choose the Input and Output of our schematic with the following selections. And we should see that our ADE window looks as follows. 

        

   

       

For convenience, we can save this cell state so that we don't have to always re-input our desired settings.

We do this by going to Session -> Save State and save it as a cell view. If we would like to load it,

we go to Session -> Load State, and load the cell view, NOT the directory. 

Once it's all saved, we can press the green arrow button on the ADE window and run our simulation.

We should get the following results.

     

 

     

Return to my labs

     

Return to EE 421 Labs