Lab Manual: 1 Dept of E&C, PACE, Mangalore
Lab Manual: 1 Dept of E&C, PACE, Mangalore
LAB MANUAL
(15ECL77)
1 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
3 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
PART - A
4 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
ü #csh
ü #source cshrc
ü #ls (ls can be skipped if you know which is the next directory to go)-this will list out
the directories like
Cadence_digital_labs
cadence_analog_labs … then
ü #cd Cadence_digital_labs/Workarea
ü Crate a directory for the experiment presently executed by using following command.
mkdir directory name Ex: mkdir Inverter
ü A Text Editor window will open.To enter text in editor window PRESS “I” and then type
the program and exit to terminal window by save and exit command --- Press Esc :wq!
ü Repeat the steps for test bench by following above TWO steps with different file name.
Ex: vi test_inverter.v
ü Now to compile
Note: Check out for error and warnings. If any then go back to text editor and edit and the
compile
ü Elaborate the top level design(test bench)
Ø ncelab toplevelmodulename-access+rwc-message
Top level module name to be elaborated is the name of test bench module
ncelab inv_test –access +rwc –messages
Ø In GUI Mode
Ncsim toplevelmodulename-gui
ncsim inv_test -gui
Now a console and Design Browser windows of Simvision are opened.
In the Design Browser Window,Select the toplevelmodulename scope(Ex:inv_test) and
select all the signals displayed and click on the waveform button in the toolbar.
Waveform Window opens.Press run to run the simulation for a time period specified in
the time field.
6 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
ü # cd csh
ü #source cshrc
ü # cd Cadence_digital_labs/Workare
#cd rclabs --- for digital synthesis enter into rclabs
#cd rtl --- The verilog file to be sythesizd must be copied into this
directory form the directory where the simulated code is present. i.e from
your directory created under Workarea.
cd .. --- Come back rclabs directory
#cd work --- Get into work directory under rclabs to synthesize the hdl file
present in rtl directory.
#rc –gui --- this would start a GUI window for synthesizing.
ü rc:/>set_attr lib_search_path ../library
ü rc:/>set_attribute hdl_search_path ../rtl
ü rc:/>set_attr library slow_highvt.lib (if this step gives an error then close the rc
window by closing the GUI window and then type the following)
• #cd /
• #cd root/Cadence_digital_labs
• #tar -xzvf Cadence_digital_labs.tar.gz (this should work and then continue
with RC labs again)
rc:/>read_hdl {file_name.v} Ex:read_hdl {ff1.v} (ff1.v must be in rtl directory of
rclabs)
ü rc:/>read_sdc ../constraints_filename.g (if any constraints file they must be read here)
ü rc:/>elaborate
ü rc:/>synthesize -to_mapped -effort medium ---now you must be able to see the
schematic else go to file and click on update GUI in GUI window.
ü rc:/>write > any_name.v
rc:>report timing - This gives the timing reports like delay, propagation so on
rc:/>report power - This gives the power dissipation report static and dynamic
power dissipation
rc:/>report area - This gives no of cell used and the area used for the calls.
7 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
1. INVERTER
Step by step procedure to be followed for all the digital ASIC designs:
Step 1: Write the RTL code (eg. inverter.v) and testbench code (eg. inverter_tb.v) in rtl
directory:
8 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
9 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Output Waveform:
2. BUFFER
//Verilog code //Test bench
endmodule
Constraints:
set_input_delay -max 1.0 [get_ports "a"]
set_input_delay -max 1.0 [get_ports "en"]
set_output_delay -max 1.0 [get_ports "b"]
Output Waveform:
3. TRANSMISSION GATE
//Verilog code //Test bench
module trans_tb;
module trans(b, a, cntrl1, cntrl2); wire b ;
input a; reg a ;
input cntrl1,cntrl2; reg cntrl1,cntrl2;
output b;
reg b; trans t1(b, a, cntrl1, cntrl2);
always @ (a or cntrl1 or cntrl2) initial
begin begin
if (cntrl1 = = cntrl2) a= 1'b0 ; cntrl1 = 1'b0 ; cntrl2 = 1'b0 ;
b = 1’bx; #10 a= 1'b0 ; cntrl1 = 1'b0 ; cntrl2 = 1'b1;
else if (cntrl1 = = 0 & cntrl2 = = 1) #10 a= 1'b0 ; cntrl1 = 1'b1 ; cntrl2 = 1'b0;
b = a; #10 a= 1'b0 ; cntrl1 = 1'b1 ; cntrl2 = 1'b1;
11 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Output Waveform:
4. LOGIC GATES
12 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
13 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Output Waveform:
5. FLIP-FLOPS
a) SR FLIP-FLOP
//Verilog code //Test bench
module srff(q,qb,s,r,clk,rst); module srfftest;
input s,r,clk,rst; reg s,r,clk,rst;
output q,qb; wire q,qb;
reg [1:0] sr; srff s1(q,qb, s,r,clk,rst);
reg q,qb; initial
always @(posedge clk) clk=1'b0;
begin always
14 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Output Waveform:
b) D FLIP-FLOP
15 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Constraints:
create_clock -name clk -period 10 -waveform {0 5} [get_ports "clk"]
//Verilog code //Test bench
Output Waveform:
16 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
c) JK FLIP-FLOP
//Verilog code //Test bench
18 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Output Waveform:
e) T FLIP-FLOP
Output Waveform:
6. ADDERS
a) PARALLEL ADDER:
20 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
//Verilog code //Test bench
// Full Adder module patest;
module fa(a,b,cin,sum,cout); reg [3:0]a,b;
input a,b,cin; reg cin=1'b0;
output sum, cout; wire cout;
assign sum=(a^b)^cin; wire [3:0]s;
assign cout=((a&b)|(b&cin)|(cin&a)); pa p1(a,b,cin,s,cout);
endmodule initial
begin
// Parallel Adder a=4'b0; b=4'b0;
module pa(a,b,cin,s,cout); #10 a=4'd1;b=4'd2;
input [3:0]a,b; #20 a=4'd9; b=4'd3;
input cin; #10 a=4'd9; b=4'd7;
output [3:0]s; #10;
output cout; end
wire [2:0]c; endmodule
fa f1(a[0],b[0],cin,s[0],c[0]);
fa f2(a[1],b[1],c[0],s[1],c[1]);
fa f3(a[2],b[2],c[1],s[2],c[2]);
fa f4(a[3],b[3],c[2],s[3],cout);
endmodule
Constraints:
set_input_delay -max 1.0[get_ports a"]
set_input_delay -max 1.0[get_ports b"]
set_input_delay -max 1.0[get_ports cin"]
set_output_delay -max 1.0[get_ports s"]
set_output_delay -max 1.0[get_ports cout"]
Output Waveform:
21 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
b) SERIAL ADDER
//Verilog code //Test bench
module serial_adder(sum,clk,load,a,b); module serialtest;
input clk,load; reg clk,load;
input[3:0] a,b; reg[3:0] a,b;
output[4:0] sum; wire[4:0] sum;
reg[3:0] ina,inb; serial_adder s1(sum,clk,load,a,b);
reg [4:0] org; initial
wire so,co; clk=1'b0;
always@(posedge clk) always #5 clk=~clk;
begin initial
if(load) begin
begin load=1'b1;
ina=a; inb = b; org = 5’b0; a = 4’d9;
end b = 4’d8;
else #10 load = 1’b0;
begin #30 ;
ina = {1’b0,ina[3:1]}; end
inb = {1’b0,inb[3:1]}; endmodule
org[4] = co;
org[3:0] = {so,org [3:1]};
end
end
assign so = ina[0]^inb [0]^org[4];
assign co = (ina[0] & inb[0] |( inb[0] &
org[4])|org[4] & ina[0]);
assign sum = org;
endmodule
Constraints:
create_clock -name clk -period 10 -waveform {0 5} [get_ports
clk"] set_clock_transition -rise 0.1 [get_clocks clk"]
set_clock_transition -fall 0.1 [get_clocks clk"]
set_clock_uncertainty 1.0 [get_ports clk"]
set_input_delay -max 1.0 [get_ports “load"] -clock [get_clocks clk"]
set_input_delay -max 1.0 [get_ports a"] -clock [get_clocks clk"]
set_input_delay -max 1.0 [get_ports b"] -clock [get_clocks clk"]
set_output_delay -max 1.0 [get_ports sum"] -clock [get_clocks clk"]
Output Waveform:
22 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
7. COUNTERS
a) Asynchronous counter
Constraints:
create_clock -name clk -period 10 -waveform {0 5} [get_ports
clk"] set_clock_transition -rise 0.1 [get_clocks clk"]
set_clock_transition -fall 0.1 [get_clocks clk"]
set_clock_uncertainty 1.0 [get_ports clk"]
set_output_delay -max 1.0 [get_ports q"] -clock [get_clocks clk"]
Output Waveform:
23 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
b) SYNCHRONOUS COUNTER
Constraints:
create_clock -name clk -period 10 -waveform {0 5} [get_ports
clk"] set_clock_transition -rise 0.1 [get_clocks clk"]
set_clock_transition -fall 0.1 [get_clocks clk"]
set_clock_uncertainty 1.0 [get_ports clk"]
set_input_delay -max 1.0 [get_ports reset"] -clock [get_clocks clk"]
24 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Output Waveform:
25 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
PART – B
26 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
st
3. Use 1 window i.e virtuoso window(CIW) for further processing.
27 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
d. Add the required components from the libraries and make the connections.
1. Go to instance fixed menu or use shortcut key “I” from keypad to go
instances
2. Click on browse. This opens the library browser
3. Now select the appropriate library for components like
Gpdk180 ----------------- nmos, pmos
Analog library ---------- Vdd, Gnd, Vcc, Vpulse, Vsin
4. Make the connections by using fixed narrow wire key
5. Click Check and Save button
28 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
29 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
30 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Expected Waveform:
Transient analysis
31 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
DC Analysis
32 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
33 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Simulation Settings
34 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Expected Waveform:
Transient analysis
DC Analysis
AC Analysis- Frequency
35 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
A common-drain amplifier, also known as a source follower, is one of three basic single-stage
field effect transistor (FET) amplifier topologies, typically used as a voltage buffer. In this circuit the
gate terminal of the transistor serves as the input, the source is the output, and the drain is common to
both (input and output), hence its name. The analogous bipolar junction transistor circuit is the
common-collector amplifier. In addition, this circuit is used to transform impedances. For example, the
Thévenin resistance of a combination of a voltage follower driven by a voltage source with high
Thévenin resistance is reduced to only the output resistance of the voltage follower, a small resistance.
That resistance reduction makes the combination a more ideal voltage source. Conversely, a voltage
follower inserted between a small load resistance and a driving stage presents an infinite load to the
driving stage, an advantage in coupling a voltage signal to a small load.
36 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
37 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Simulation Settings
38 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Expected Waveform:
Transient analysis
DC Analysis
AC Analysis- Frequency
39 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
40 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Expected Waveform:
41 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
\
Specifications: Diff_Amplifie From your library
r Cs_amplifier From your library
Input Pins Vinv,Vnoninv,Id.c,Vdd,Vss
42 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Expected Waveform:
43 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
44 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
D0,D1,D2,D3 –Input pins Vout-output pin Vdd and Gnd –Input pins
45 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Simulation Settings
46 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Output Waveform:
47 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
48 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
50 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
13A Maximum distance from a source/drain OXIDE region to the nearest well tie 10um
14A Minimum and maximum width of VIA3 0.2um
14B Minimum VIA3 space 0.3um
14C Minimum METAL3 enclosure of VIA3 0.1um
15A Minimum METAL4 width 0.3um
15B Minimum METAL4 space 0.3um
15C Minimum METAL4 enclosure of VIA3 0.1um
16A Minimum and maximum width of VIA4 0.2um
16B Minimum VIA4 space 0.3um
16C Minimum METAL4 enclosure of VIA4 0.1um
17A Minimum METAL5 width 0.3um
17B Minimum METAL5 space 0.3um
17C Minimum METAL5 enclosure of VIA4 0.1um
18A Minimum and maximum width of VIA5 0.2um
18B Minimum VIA5 space 0.3um
18C Minimum METAL5 enclosure of VIA5 0.1um
19A Minimum METAL6 width 0.3um
19B Minimum METAL6 space 0.3um
19C Minimum METAL6 enclosure of VIA5 0.1um
20A Minimum BONDPAD width 45.0um
20B Minimum BONDPAD space 10.0um
20C Minimum and Maximum METAL1 enclosure BONDPAD 3.0um
20D Minimum and Maximum METAL2 enclosure BONDPAD 3.0um
20E Minimum and Maximum METAL3 enclosure BONDPAD 3.0um
20F Minimum and Maximum METAL4 enclosure BONDPAD 3.0um
20G Minimum and Maximum METAL5 enclosure BONDPAD 3.0um
20H Minimum and Maximum METAL6 enclosure BONDPAD 3.0um
51 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Some of the important design rules mentioned above are pictorially represented in next page.
(p.t.o)
N WELL RULE
OXIDE RULE
52 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
53 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Poly RULE
54 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
55 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
The PMOS is designed with respect to the design rules mentioned. The PMOS is designed
with a respect to the W/L ratio.
56 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
58 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
59 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
60 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
61 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
iv) If schematic & Layout matches completely, you will get the form displaying
“Schematic and Layout Match”
If Not matching, a form informs LVS completed successfully and asks if you
want view the results of this run.
CLICK Yes in the form.
v) The LVS debug form opens indicating the mismatches and you need to correct
all these mismatches and Re – run the LVS.
C) Running RCX.
i) Assura – Run RCX.
ii) Assura RCX form opens.
iii) RCX progress form appears, wait until it completes the process.
iv) Whwn RXC complete, a dialog box appears, informs you that Assura RCX run
Completed Successfully.
v) Go to CIW (Virtuso window)
File – open – av- extracted view form the corresponding library.
Then, the av-extracted view window opens with parasitic components (RC).
Observe the view by zooming
62 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
a. Go to CIW window and open (Inverter_test) Config view, Top cell view
form opens.
b. Enable Yes and Yes in Top Cell View form
c. Launch – ADE L(Analog Design Environment)
d. Execute Setup—Simulation/directory/Host A new window opens
e. Set the simulation window to spectre and click ok
f. Execute Setup-Model Library. Anew window opens, Check of gpdk.scs as
lib and section type as stat then press OK.
g. Execute Analysis – Choose. A window opens.
h. Select the type and set the specifications and press OK
i. Execute Output s—to be plotted – Select on Schematic
j. Then Select the INPUT WIRE(Vin ) and OUTPUT WIRE(Vout) from
your test Schematic using mouse
k. Execute Simulation -- Net list and Run
63 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
a. Open the same hierarchy Editor window which is already set for config.
b. Select the TREE VIEW tab,this will show the design hierarchy in tree format.
c. CLICK right button on IO (lib name Inverter schematic) in TREE VIEW and
Select set instances view as av_extracted view.
d. Press Recompute the Hierarchy icon, the configuration is now updated from
schematic to av_extracted view
e. Then,go output waveform window( analog design environment) and click
Netlist and RUN
f. Observe the waveform with additional nets and parameters.
g. Calculate the delay again and match with the previous one.
Now you can conclude how much delay is introduced by parasites by comparing delay
with and without parasites and based on this we need to optimize the parasitic effect and reduce
the delay due to parasites. This finally leads to an optimized layout
64 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
LSW
What is LSW?
It is a layout Vs Schematic window which
consists of different layers used for layout.
65 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
Path: This shape is chosen when the path to be drawn is with predefined with.
66 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
67 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
68 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
69 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
70 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
71 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
72 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
73 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
74 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
75 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
76 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
77 Dept of E&C,PACE,Mangalore
VLSI LAB MANUAL
78 Dept of E&C,PACE,Mangalore