VLSI Lab Manual PART - A DIGITAL DESIGN ASIC-DIGITAL DESIGN FLOW 1. Write Verilog Code for the following circuits and their Test Bench for verification, observe the waveform and synthesis the code with technological library with given Constraints*. Do the initial timing verification with gate level simulation. i. An inverter ii. A Buffer iii. Transmission Gate iv. Basic/universal gates v. Flip flop -RS, D, JK, MS, T vi. Serial & Parallel adder vii. 4-bit counter [Synchronous and Asynchronous counter] viii. Successive approximation register [SAR] * An appropriate constraint should be given Dept. of ECE,Dr.SMCE,Nelamangala Page 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
VLSI Lab Manual
PART - A
DIGITAL DESIGN
ASIC-DIGITAL DESIGN FLOW
1. Write Verilog Code for the following circuits and their Test Bench for verification, observe the waveform and synthesis the code with technological library with given Constraints*. Do the initial timing verification with gate level simulation.
i. An inverter
ii. A Buffer
iii. Transmission Gate
iv. Basic/universal gates
v. Flip flop -RS, D, JK, MS, T
vi. Serial & Parallel adder
vii. 4-bit counter [Synchronous and Asynchronous counter]
viii. Successive approximation register [SAR]
* An appropriate constraint should be given
Dept. of ECE,Dr.SMCE,Nelamangala Page 1
VLSI Lab Manual
(i) INVERTER
Logic Diagram Truth Table
input_i output_o
Program
module inverter( input_i, output_o); input input_i; output reg output_o; always @ (input_i) begin if(input_i) output_o=1'b0; else output_o=1'b1; endendmodule Test Bench
module inverter_tb; reg input_i; wire output_o;
inverter dut (input_i, output_o);
initial input_i=1'b0; always #5 input_i= ~ input_i; initial begin $monitor( $time, " input_i=%b and output_o=%b ", input_i,output_o); endendmodule
always @ (posedge clock) begin if (reset) q<=1'b0; else q<=d; end
assign qb=~q;endmodule
Test Bench
Dept. of ECE,Dr.SMCE,Nelamangala Page 9
clock d q qb
1 1 0
0 0 1
0 X X Hold
D_ FF
VLSI Lab Manual
module dff_tb; reg clock, reset, d; wire q, qb;
dff uut (reset, clock, d, q, qb); initial begin clock=1'b1; reset=1'b0; end always #5 clock=~clock; always #40 reset=~reset; initial begin #20 d =1'b1; #20 d =1'b0; #30 d =1'b1; #30 d =1'b0; end initial begin
sar dut(.data(data),.load(load),.E(E),.w(w),.clock(clock),.q(q));
initialclock=1'b1;
always #5 clock = ~clock;initial
begin load = 1'b1; w = 1'b0; E = 1'b0;
#5 data = 8'b11110000;#10 load = 1'b0;
E = 1'b1; w = 1'b0;
#10 w = 1'b0;#10 w = 1'b0;#10 w = 1'b0; #10 w = 1'b1; #10 w = 1'b1; #10 w = 1'b1; #10 w = 1'b1;
endendmodule
Dept. of ECE,Dr.SMCE,Nelamangala Page 31
VLSI Lab Manual
STEPS FOR SYNTHESIS
Step 1. Open a terminal and type the following commands:
[root@localhost ~]# csh[root@localhost ~]# source .cshrcWelcome to mentor graphics Tool brought to you by Tridents Tech Labs Pvt Ltd[root@localhost ~]# spectrumMessages will be logged to file '/root/leospec.log'...LeonardoSpectrum Level 3 - 2010a.7 (Release Production Release, compiled Jun 30 2010 at 15:05:46)Copyright 1990-2010 Mentor Graphics. All rights reserved.Portions copyright 1991-2010 Compuware Corporation
Checking Security ...
** Welcome to Interactive Leonardo Spectrum Level 3 Version 2010a.7 ***
News : * Enter "help" to get an overview of all commands * Enter <command> -help to get usage of each command
Session history will be logged to file '/root/leospec.his'
This will open the Leonardo Spectrum synthesis tool.
Dept. of ECE,Dr.SMCE,Nelamangala Page 32
VLSI Lab Manual
Step 2. Loading the library:
LEONARDO{1}: load_library /mgc_tree/design_data/libraries/tsmc018_typ.synReading library file `/mgc_tree/design_data/libraries/tsmc018_typ.syn`...Library version = v3.1 Release : Patch (a) : (Aug 26, 2005)Delays assume: Process=typical Temp= 0.0 C Voltage=1.80 V Info: setting encoding to autoInfo, Command 'load_library' finished successfully
Step 3. Reading the Verilog file to be synthesized:
LEONARDO{4}: optimize Info: The target technology was not selected, tsmc018_typ was automatically selected for you.NO wire table is found-- Optimizing netlist .work.and_gate.INTERFACE-- Automatic IO buffer insertion... WARNING: cannot do IO mapping. Library has no plain input IO buffer-- Matching combinational logic..-- Matching non-combinational logic.. -- Covering..-- CPU Time used : 00:00 Mapping-- Final Design Rule Check..Info, Command 'optimize' finished successfully
data required time not specified------------------------------------------------------------------------------data required time not specifieddata arrival time 0.06
data required time not specified------------------------------------------------------------------------------data required time not specifieddata arrival time 0.05
1. Design an Inverter with given specifications*, completing the design flow mentioned below:
a. Draw the schematic and verify the following
i) DC Analysis
ii) Transient Analysis
b. Draw the Layout and verify the DRC, ERC
c. Check for LVS
d. Extract RC and back annotate the same and verify the Design
e. Verify & Optimize for Time, Power and Area to the given constraint***
2. Design the following circuits with given specifications*, completing the design flow mentioned below:
a. Draw the schematic and verify the following
i) DC Analysis
ii) AC Analysis
Dept. of ECE,Dr.SMCE,Nelamangala Page 35
VLSI Lab Manual
iii) Transient Analysis
b. Draw the Layout and verify the DRC, ERC
c. Check for LVS
d. Extract RC and back annotate the same and verify the Design.
i) A Single Stage differential amplifier
ii) Common source and Common Drain amplifier
3. Design an op-amp with given specification* using given differential amplifier Common source and Common Drain amplifier in library** and completing the design flow mentioned below:
a. Draw the schematic and verify the following
i) DC Analysis
ii). AC Analysis
iii) Transient Analysis
b. Draw the Layout and verify the DRC, ERC
c. Check for LVS
d. Extract RC and back annotate the same and verify the Design.
4. Design a 4 bit R-2R based DAC for the given specification and completing the design flow mentioned using given op-amp in the library**.
a. Draw the schematic and verify the following
i) DC Analysis
ii) AC Analysis
iii) Transient Analysis
b. Draw the Layout and verify the DRC, ERC
c. Check for LVS
d. Extract RC and back annotate the same and verify the Design.
5. For the SAR based ADC mentioned in the figure below draw the mixed signal schematic and verify the functionality by completing ASIC Design FLOW.
[Specifications to GDS-II]
* Appropriate specification should be given.
** Applicable Library should be added & information should be given to the Designer.
*** An appropriate constraint should be given
Dept. of ECE,Dr.SMCE,Nelamangala Page 36
VLSI Lab Manual
Step 1: Invoking icstudio
Open a terminal and type the following commands:
csh (press enter)source .cshrc (press enter)
welcome to mentor graphics message will be displayed, then typeicstudio (press enter)
this will open the icstudio interface.
Dept. of ECE,Dr.SMCE,Nelamangala Page 37
VLSI Lab Manual
Step 2: Creating a new project
Click on File>New >Project from the menu bar. The new project setup wizard will open. Press Next to proceed with the wizard.
Enter the project name & choose its location & click on Next.
Dept. of ECE,Dr.SMCE,Nelamangala Page 38
Fig 1:Opening a terminal
Fig 2: icstudio Interface
VLSI Lab Manual
Click on Open library list editor tab to set the location map.
Select Edit menu >Add MGC Design Kit. Browse for the my_kit installation directory in the specified location (/mgc_tree/design_data/cicd_spt_051007/cicd/data)Similarly select edit menu & then select Add Standard MGC Libraries. (The standard MCG Libraries will be automatically be added to the project once my kit has been added i.e. if the previous step is successfully completed )
After that press OK. This will return you back to the main menu wizard. Press Next to proceed. This will move to you on the Technology Settings. Press Open Setting Editor to set the technology setting.
Dept. of ECE,Dr.SMCE,Nelamangala Page 39
VLSI Lab Manual
Browse for the paths of the Process file, DRC, LVS, SDL and PEX rule files.For Process file the path is, /mgc_tree/design_data/cicd_spt_051007/my_kit/processFor DRC the path is, /mgc_tree/design_data/cicd_spt_051007/my_kit/rule_deck/DRCFor LVS the path is, /mgc_tree/design_data/cicd_spt_051007/my_kit/rule_deck/LVSFor SDL the path is, /mgc_tree/design_data/cicd_spt_051007/my_kit/process/sdl_process_rulesFor PEX the path is, /mgc_tree/design_data/cicd_spt_051007/my_kit/rule_deck/PEX
Press OK to return back to the main wizard. On pressing next a summary of all the previous steps will be shown.
Press finish to finalize.
Dept. of ECE,Dr.SMCE,Nelamangala Page 40
VLSI Lab Manual
The icstudio interface will look like as shown below after creating the new project.
Step 3: Creating a Library
To create a library right click in the library area and select the New Library option. A window will pop-up asking for the library name.
Dept. of ECE,Dr.SMCE,Nelamangala Page 41
VLSI Lab Manual
Enter the library name and click on OK. The library will be added in the library area.
Step 4: Creating a Schematic Cell View
Select the library created and then right click in the cell area, and select the New Cell View option. Enter the cell name and the view type as Schematic.
Dept. of ECE,Dr.SMCE,Nelamangala Page 42
VLSI Lab Manual
On clicking on Finish the Schematic Editor window will open up.
The schematic of the required circuit has to be created. For example, let us consider an inverter using CMOS technology.
From the palette select Add Instance icon or hot key ‘i’ can be used. Browse through the libraries added while creating the project, and select the required devices. An example of selecting nmos device is show below.
Dept. of ECE,Dr.SMCE,Nelamangala Page 43
Palette Workspace
VLSI Lab Manual
Once the device has been selected move to the workspace and click to place the device.
Press Esc once the device has placed.
Similarly all the required devices including vdd, ground and ports are placed in the same manner.
Dept. of ECE,Dr.SMCE,Nelamangala Page 44
VLSI Lab Manual
Selecting vdd is shown below.
Once all the devices have been placed they have to be connected using wires. A wire can be selected using the Wire Icon on the palette or hot key ‘w’.
Click once to start drawing a wire and double click to end it.
Dept. of ECE,Dr.SMCE,Nelamangala Page 45
VLSI Lab Manual
The connections are made as shown below. (Make sure the body terminal connections are also made).
To change the name of a particular net(wire), select the particular net and in the Object Editor change the Net Name to the desired name. Then click on Apply.
Dept. of ECE,Dr.SMCE,Nelamangala Page 46
VLSI Lab Manual
The completed inverter design with the desired net names is shown below.
Next click on check/save option on the menu bar to check for any errors and also save the circuit design.
Dept. of ECE,Dr.SMCE,Nelamangala Page 47
VLSI Lab Manual
The error report is as shown below:
A symbol for the design has to be created. Click on Tools> Generate Symbol. A window will pop-up as shown below. The name & Shape of the symbol can be selected as desired.
Dept. of ECE,Dr.SMCE,Nelamangala Page 48
VLSI Lab Manual
On clicking on Ok the Symbol will be generated as shown below.
Step 5: Creating a Test Bench
Under the library created in step 3 create a new cell. ( make sure the cell name is {module name}_tb.
Dept. of ECE,Dr.SMCE,Nelamangala Page 49
VLSI Lab Manual
The required voltage sources, ports & connections are made as shown below. Make sure the cell under test is chosen correctly i.e. the cell created in step 4 has to be chosen.
Click on Check/Save & make sure there are no errors in the error report.
Dept. of ECE,Dr.SMCE,Nelamangala Page 50
VLSI Lab Manual
Step 6. Simulating the Test Bench
In the palette area click on the icon Enter Simulation Mode.
This will open up the simulation setup window as shown below.
Dept. of ECE,Dr.SMCE,Nelamangala Page 51
VLSI Lab Manual
In the schematic sim palette click on Lib/Temp/Inc & select Libraries.The setup simulation window will open up as shown below.
A new scenario has to be created. A scenario Name is chosen which is entered in the space provided and is added to the scenario list by clicking on the Add Scenario To List
To the scenario added a library file (lib.eldo) has to be included.To do this first highlight the scenario & click on browse tab & locate the lib.eldo file. ( /mgc_tree/design_data/cicd_spt_051007/cicd/data/my_kit/models/lib.eldo )
Dept. of ECE,Dr.SMCE,Nelamangala Page 52
VLSI Lab Manual
Select TT (Typical Type) option under the lib.eldo library.
In
the schematic sim palette click on Lib/Temp/Inc & select Include Files option and delete the include_all file & click on Ok.
In the palette area click on Setup Sim session & select the Environment option. The Setup Simulation Environment window will open up. Select Netlist, Run Simulation and Display Waveforms & click on Ok.
Dept. of ECE,Dr.SMCE,Nelamangala Page 53
VLSI Lab Manual
In the palette area click on Setup Analysis. The Setup Simulation window will popup. The desired analysis type (AC, DC, Transient) is selected.
For each of the analysis selected the corresponding parameters have to be set in the analysis set up window.
An example of Transient & DC setup parameters are shown below.
Dept. of ECE,Dr.SMCE,Nelamangala Page 54
VLSI Lab Manual
In the palette area click on click on Wave Outputs icon. From the test bench schematic select the nets (wire) were the waveforms to be observed & add these nets to the object list.
Click on Run Simulator icon & observe the waveforms in EZwave tool.
Waveform for Transient analysis of the Inverter is shown below.
Dept. of ECE,Dr.SMCE,Nelamangala Page 55
VLSI Lab Manual
Waveform for DC analysis of the Inverter is shown below.