Lab7 ASIC
Lab7 ASIC
Overview
In this lab, we will go over the basics of using circuits other than standard cells in VLSI designs.
The most common example of this is SRAM, which is a dense addressable memory block used in
most VLSI designs. The process for adding other custom, analog, or mixed signal circuits will be
similar to what we use for SRAMs.
To begin this lab, get the project files by typing the following command
If you have not done so already you should add the following line to your bashrc file (in your
home folder) so that every time you open a new terminal you have the paths for the tools setup
properly.
source /home/ff/eecs151/tutorials/eecs151.bashrc
Note: after doing this, you need to manually source your own .bashrc file or open a new terminal.
You can test whether your path is setup properly or not by typing which dc shell and making
sure that it does not say no dc shell in ....
SRAM2RW32x16 sram (
.CE1(clk),
.CE2(clk),
.WEB1(web1),
.WEB2(web2),
.OEB1(oeb1),
.OEB2(oeb2),
.CSB1(csb1),
.CSB2(csb2),
.A1(address_1),
EECS 151/251A ASIC Lab 7: SRAM Integration 2
.A2(address_2),
.I1(data_in_1),
.I2(data_in_2),
.O1(data_out_1),
.O2(data_out_2)
);
This code instantiates an SRAM module, which is a dense memory unit provided by the foundry.
This module specifically is a 32x16 SRAM, which means that there are 32 entries of 16 bits. This
means that there is a 5 bit address for selecting those entries. In this code one port is configured to
be a write port, and the other port is configured to be a read port by setting up the input parameters
for the ports. The data for the write port comes from the A reg signal within the gcd datapath
module, and the address is just constantly looping around. This sets up a history of previous values
of the A reg signal over time, which could be read out for debugging and verification, but that is
not included in this design for simplicity.
To simulate this rtl design there has been one change to the Makefile in the vcs-sim-rtl folder,
shown below:
vsrcs = \
$(srcdir)/gcd_control.v \
$(srcdir)/gcd_datapath.v \
$(srcdir)/gcd.v \
$(srcdir)/gcd_testbench.v \
$(srcdir)/gcd_io.v \
$(srcdir)/gcd_scan.v \
$(srcdir)/top.v \
$(UCB_VLSI_HOME)/stdcells/synopsys-32nm/multi_vt/verilog/pll.v \
$(UCB_VLSI_HOME)/stdcells/synopsys-32nm/multi_vt/verilog/io_wb.v \
$(UCB_VLSI_HOME)/stdcells/synopsys-32nm/multi_vt/verilog/sram.v \
This variable is used in the simulator to include the necessary files, and by adding the last line
which points to the sram verilog models we should be able to simulate the design. There is no need
to run this right now, but just keep this in mind for your project which you will want to be able to
simulate.
mw_ref_libs = \
cells_rvt.mw \
io_wb.mw \
EECS 151/251A ASIC Lab 7: SRAM Integration 3
io_pll.mw \
sram.mw
target_library_files = \
saed32rvt_$(tt_corner_stdcells).db \
saed32io_wb_tt1p05v25c_2p5v.db \
saed32pll_tt1p05v25c_2p5v.db \
saed32sram_tt1p05v25c.db \
This sets up variables that point to the Milkyway (mw) libraries, as well as the database library
files. After running make in the dc-syn folder, it creates a make generated vars.tcl file, which
will contain these variables from the Makefrag file, and then the variables that are setup in that file
(MW REFERENCE LIB DIRS and TARGET LIBRARY FILES) are then used in the scripts for
design compiler. Inside design compiler, the following commands are issued that use these variables:
This sets up the $target library variable and adds it to the link library variable within design
compiler. This link library variable is used when linking the design, and it will search through
those files to find any modules that are not found in the verilog files that are read in.
This sets up a variable called $mw reference library, and then creates a Milkyway library with
the reference library set to that variable.
These are all of the changes that need to be made for Design Compiler to integrate an SRAM
module, so please run the following commands and we will move on to IC Compiler:
cd dc-syn
make
cd ..
a) What directory are the Milkyway files for the SRAM designs located?
b) What directory are the database library files for the SRAM designs located?
c) Open up the verilog implementation of the SRAM. What are the different sizes available in this
process?
EECS 151/251A ASIC Lab 7: SRAM Integration 4
Below are a few lines from the lef file for the SRAM Macro that we are using:
MACRO SRAM2RW32x16
CLASS BLOCK ;
SOURCE USER ;
ORIGIN 0 0 ;
SIZE 87.727 BY 61.298 ;
SYMMETRY X Y R90 ;
Here are the specifications for one of the output bits, O1[8]:
PIN O1[8]
DIRECTION OUTPUT ;
USE SIGNAL ;
PORT
LAYER M5 ;
RECT 63.5180 0.0000 63.7180 0.2000 ;
END
PORT
LAYER M4 ;
RECT 63.5180 0.0000 63.7180 0.2000 ;
END
PORT
LAYER M3 ;
RECT 63.5180 0.0000 63.7180 0.2000 ;
END
PORT
LAYER M2 ;
RECT 63.5180 0.0000 63.7180 0.2000 ;
END
PORT
LAYER M1 ;
RECT 63.5180 0.0000 63.7180 0.2000 ;
END
ANTENNADIFFAREA 0.11118 LAYER M3 ;
ANTENNADIFFAREA 0.11118 LAYER M4 ;
ANTENNADIFFAREA 0.11118 LAYER M5 ;
EECS 151/251A ASIC Lab 7: SRAM Integration 5
If you look at the rectangles set up for the ports, you should be able to quickly see that all of
the coordinates are the same. This means that these metal connections are all directly on top of
each other, but this is fine since they are all on different metal layers. This does mean that you
can connect to this particular pin of the SRAM on any of the layers specified here. The lines with
ANTENNADIFFAREA, ANTENNAPARTIALMETALSIDEAREA and ANTENNAPARTIALMETALAREA are specifying
the area of these particular metals within the SRAM cell so that you can verify that the design will
pass antenna design rules. Those particular design rules address charge that is picked up in the
fabrication process on large areas of metal, and basically make sure that your layout is such that
this charge will be small enough to ensure you do not blow up your devices.
If instead you look at the area of the file corresponding to the pin for VSS, you will see there are
a lot of different ports. Below is a part of that section:
PIN VSS
DIRECTION INOUT ;
USE GROUND ;
PORT
LAYER M5 ;
RECT 47.4510 60.9980 47.7520 61.2980 ;
END
PORT
LAYER M5 ;
RECT 36.6510 60.9980 36.9500 61.2980 ;
END
PORT
LAYER M5 ;
RECT 41.1510 60.9980 41.4510 61.2980 ;
END
PORT
LAYER M5 ;
EECS 151/251A ASIC Lab 7: SRAM Integration 6
Only part of this section is included, since there are a ton of different connections to the VSS port
within the SRAM module. This makes connecting to this port not only possible, but possible in
a way that will still create a low resistance path to make sure there is a small amount of IR drop
even inside of the SRAM cell itself.
There is an entry in the LEF file for each pin of the design, as well as a section at the bottom for
obstructions. In this case, obstructions are sets of metal routing contained internally to the macro,
to make sure that the tools do not create shorts in trying to route over/through the macros. Part
of that section is shown below:
OBS
LAYER M1 ;
RECT 0.8000 43.2180 86.9270 50.6300 ;
RECT 0.8000 43.2180 86.9270 50.6300 ;
RECT 0.8000 43.2180 86.9270 50.6300 ;
RECT 0.8000 50.5070 86.9270 50.5350 ;
RECT 0.8000 43.2180 86.9270 50.6300 ;
.
.
.
EECS 151/251A ASIC Lab 7: SRAM Integration 7
LAYER PO ;
RECT 0.0000 0.0000 87.7270 61.2980 ;
LAYER M3 ;
RECT 0.9000 0.9000 86.8270 61.2980 ;
RECT 0.9000 0.9000 86.8270 61.2980 ;
RECT 0.9000 0.9000 86.8270 61.2980 ;
RECT 0.9000 0.9000 86.8270 61.2980 ;
.
.
.
END
There are entries for each of the metal layers contained within the macro, and hopefully specify all
of the connections. You can also manually create blockages within IC Compiler over the area of
the macro if you are worried about the obstructions being set up properly. This can be achieved
using the following command:
where x1 y1, and x2 y2 are the lower left and upper right corners of the bounding box for the
blockage.
create_fp_placement
set_dont_touch_placement [all_macro_cells]
The result of these commands is to place the pll on the left side, and the sram module in the top
right corner. A picture of the result is shown below:
EECS 151/251A ASIC Lab 7: SRAM Integration 8
cd icc-par
make
And load up the gui to see the placement using the following commands:
cd current-icc
./start_gui
You should see something similar to the picture above. This placement method uses absolute
coordinates, so with the design open take note of coordinates of the core area of the design, as well
as sizes of the macros.
a) Suppose we wanted to change the position of the macros such that the pll is in the top left of
the core area and the sram is in the bottom right of the core area. What would the resulting
commands be for the create bounds commands?
We can also specify the placement of macros relative to each other with the following command
instead:
This will make sure that the macros are within 100um of each other in the x dimension, and 400um
in the y dimension. You can try this by opening up the floorplan.tcl and replace line 36-37 with
EECS 151/251A ASIC Lab 7: SRAM Integration 9
line 39. Then, rerun make init design icc and then go into current-iccdp. You can start the
gui in the same way as before, using ./start gui.
The result of this is the following (hiding the metal layers to see the SRAM easier):
And zoomed in further to show the macros, again without showing the metal:
There is another way to specify simply exactly where you want the macro to go. To do that, you
can use the following syntax:
EECS 151/251A ASIC Lab 7: SRAM Integration 10
The first command will move the macro to the specified spot, and the rest of the lines will tell the
tool not to touch it in any of the remaining steps. In this command, llx and lly correspond to the
position of the lower left corner, setting the x and y coordinates respectively. Please note that this
will make part b of the question below actually work properly. Alternatively, you can create the
bounds large enough such that the keepout and the macro itself will fit inside, which is annoying
to do.
a) Sometimes you would like to place a keepout region (an area of nothing) around the edges of your
macros in your design. What is the command to do this, and how do you specify the arguments?
b) Using your modified commands from the previous question, create a keepout of 5um on each edge
of your macros with the pll in the top left and the sram in the bottom right. Specify the commands
you used as well as a screenshot of the result, zoomed in on each macro to show the keepout