Introduction to MacroCell Place/Route with Mentor MicroRoute
Yong Chen, Bob Reese


MicroRoute is a block routing tool released by Mentor Graphics for interconnecting IC design blocks and top-level IO connectors. It enables you to interactively assemble a block-based design using graphical and procedural interfaces. MacroCell place/route is different from Standard Cell place/route in that it allows arbitrarily sized blocks to be placed and routed; standard cell place/route requires all cells to have a common height.

This tutorial references several config files, scripts, etc. This compressed tar file contains the entire example and the scripts/config files, etc which are referenced are included in the tar archive. One difference between the zipped files and this tutorial is design 'top' and associated edif, L files are called 'hw4' in the tar archive.

Preliminaries

This tutorial assumes that two blocks of layout are being interconnected : reg32x32 (32 bit register file, produced by Memory Builder) and rfglue (glue logic for Register file, layout produced by AutoCells). All terminals in your layout blocks must be brought to the edges of the layout.

An edif netlist file called 'top.edif' is assumed to specify the block interconnection. Any scripts referenced in this tutorial are assumed to exist in '/projects/mpl/cddd/tools/src/scripts'. The starting files are:

  1. reg32x32.L, rfglue.L - layout for blocks, assume scn08hp technology
  2. top.edif - edif file which connects reg32x32 and rfglue blocks

You must first create a Mentor netlist file from the edif file. Do this via:

 EDIF2UPR top.edif -lf -c /projects/mpl/msu_scmos/release/mentor_scs/config_files/test.cfg -o top.S
This will produce the file called top.S. EDIF2UPR has trouble with terminals which are bussed if the edif file was produced by Synopsys; you will need to do the following to correct this problem:
 fix_1.perl top.S
This will correct the bussed terminal names used in 'top.S'. This 'top.S' is not in the final form which is needed by MicroRoute. You will need to DELETE all statements in the CELL definition except for the NET statements. *Let me repeat this!* You should DELETE any statements in your '.S' file which are NOT 'net' statements - this includes TERM and INST declarations! Your final '.S' file should only include NET statements. Also, change the top part from:
 CELL TOP()
{
SCHEMATIC;
...
to
OPEN CELL top_floorplan()
{
...

We want this file to function as a netlist for another file we are going to create called 'top_floorplan'.

VDD/GND Nets

Typically, the 'top.S' file will not contain any VDD/GND nets. One way to get MicroRoute to recognized VDD/GND nets is to edit this file and put the explicit VDD/GND net connections you want. Your layout blocks may have multiple VDD/GND terminals, you may or may not want to connect to them all. Standard Cell layout blocks especially have many VDD/GND terminals, all of which DO NOT have to be connected (there side terminals, called vdd_l/vdd_r/gnd_l/gnd_r, in MET1 and top/bottom terminals, called vdd_t/vdd_b/gnd_t/gnd_b, in MET2. Usually, you only connect to some subset of the top/bottom terminals. To add VDD/GND nets, you add statements to the 'top.S' file which look like:
## add VDD/GND Nets
NET REGA.vdd, REGB.vdd;          
NET REGA.gnd, REGB.gnd;
NET REGA.vdd, GLUE.vdd_t[0];
NET REGA.gnd, GLUE.gnd_t[0];
NET REGB.vdd, GLUE.vdd_t[1];
NET REGB.gnd, GLUE.gnd_t[1];
NET vdd, REGA.vdd;
NET gnd, REGA.gnd;
These statements create VDD/GND nets between two reg32x32 instances (REGA,REGB) and the rfglue instance (GLUE), as well external 'vdd/gnd' terminals. The instance names must match the instance names in the floorplan layout.

Creating the Floorplan

Microroute needs an L file called a 'floorplan' which sets the initial placements of the blocks in the design. Create the floorplan file by:

  1. Starting Led in the scn08hp technology (Led -t scn08hp -l /ecad/local/tech/rel/gdt).
  2. In one of the windows, load in a file which defines all of the standard cell leafcells (usually called something like 'lib.L'), load in the reg32x32.L, rfglue.L files.
  3. In another window, do 'New Layout Cell' and place instances of the reg32x32.L, rfglue.L file. Place them relative to each other roughly in the positions that you want them to appear in the final layout.
  4. Create 'terminals' for any I/O you want for the cell. For the scn08hp technology, the terminals should be on MET2. In MicroRoute terminology, these terminals are called 'top-level connects'. IMPORTANT:You need to have top-level connects on all four sides of the layout in order to bound the channels created by MicroRoute. If you do NOT do this, MicroRoute will fail in the channel routing phase. If you have a lot of top level connects to create (i.e., 32-bit busses), it is often easier to place one down via Led, save the L file, then edit the L file by hand and add the rest (or have a Perl script generate them with desired spacing).
In the floorplan layout, there should be NO connections between the blocks and the top-level connects - these should be specified in the netlist file (top.S). Click here to see an simple floorplan file. REMEMBER, the instance names in the floorplan file MUST MATCH the instance names specified in the netlist file (top.S). Terminal names, Cell names and Instance names are all case sensitive. There is often a mismatch in case between terminal names in a layout and terminal names in the top.S file as produced by EDIF2UPR. A useful script is 'change_termcase.perl', this can be used to change the case (either to all uppercase or all lowercase) of terminals of a particular instance inside of an L netlist file. Assume that the terminals names in reg32x32.L were all lower case, and the terminal names for the reg32x32 instances in top.S were all uppercase. To change them to lowercase do:
change_termcase.perl hw4.S REGA down
change_termcase.perl hw4.S REGB down

Bounding Box Files

Bounding box files for all blocks used in the floorplan are required by Microroute. These can be generated via:


 Lc -t scn08hp -l /ecad/local/tech/rel/gdt -B -inc lib.L rfglue.L > rfglue_bbox.L
 Lc -t scn08hp -l /ecad/local/tech/rel/gdt -B  reg32x32.L > reg32x32_bbox.L
The resulting BBOX files will have to be edited and the following line added to the top of the file:
L:: TECH scn08hp
There may also have been some status messages outputted to the '*_bbox.L' file in addition to the BBOX definition; these need to be deleted. The 'lib.L' file in the first 'Lc' command contains the definitions of the standard cells used in the 'rfglue.L' file.

Running MicroRoute

MicroRoute requires a parameter file similar to AutoCells. Copy the parameter file:

~reese/EE8273/MicroRoute_files/scn08hp/MicroRoute.par
to your local directory. IMPORTANT: There are several pathname parameters in this file - change these pathnames to reflect YOUR local directory root!!!!! Also, there are several 'host' parameters - change the host name to the name of your local machine.

MicroRoute requires two input files: 'block.upr' (block definition) and 'net.upr'. You can produce these files via:

 LtoUPR -c -A mr -t scn08hp -l /ecad/local/tech/rel/gdt rfglue_bbox.L reg32x32_bbox.L top_floorplan.L top.S

The LtoUPR program converts from L database format to UPR (Universal Place/Route) database format. The '-A mr' flag specifies that the end tool is MicroRoute; the '-c' option includes the top level connects in the 'net.upr' file. If you have ANY case mismatches between terminal names in the net file (top.S) and the floorplan file (top_floorplan.L) you will get errors from LtoUPR.

If LtoUPR is successful, you will have two new files: block.upr, net.upr. To run MicroRoute in batch mode, copy the file:

~reese/EE8273/MicroRoute_files/do_all.m
to your local directory. This file sets the Vdd/GND bus widths to match the register file Vdd/GND terminal widths, and does all steps in the MicroRoute process. To invoke MicroRoute with this script do:
MicroRoute -t scn08hp -l /ecad/local/tech/rel/gdt -load do_all.m

The MicroRoute window will appear and the following steps will be done:

  1. Setup - read in the block.upr, net.upr files.
  2. Slice - define the sections for where channels might go
  3. Channels - define the actual channels
  4. Global Pre-route - do global pre-route of channels
  5. Adjust Placement - adjust placement of blocks to relieve channel congestion
  6. Channel Route/Tile/Compaction for each channel

After MicroRoute is finished, a new file will be produced called MicroRoute.lx.m . This is a command file for Led which will be used to insert the routing/channnels into the original floorplan file.

Incorporating MicroRoute Results into Your Floorplan

Invoke Led and load your floorplan file into Led. Then, execute the following in the Led command window:

pf MicroRoute.lx.m
This will load the script, and modify your layout to incorporate the changes made by MicroRoute. Save your new layout after this is finished. Save it to a DIFFERENT layout name (ie., 'top_complete.L') so that you will still have your old floorplan if you want to re-run MicroRoute.

NOTE: When dealing with multiple levels of blocks that were routed with MicroRoute, the names of the channels have to be changed in the block layouts. MicroRoute always labels its channels the same.

Debugging MicroRoute Problems

If MicroRoute encounters an error during execution of the script, it will stop execution at the point of the error. The log window will contain the error message; copy this down and ask your local MicroRoute guru for help (DO NOT SEND EMAIL TO MENTOR!!!). You can also try invoking MicroRoute without the script and go through each step by hand to see where the exact problem is.

Tweaking MicroRoute

Reduce Routing Time

When routing multiple blocks together, try to plan terminal placement to the top/bottom/left/right of the block layouts. This will save in routing time, thus allowing more iterations for a very efficient final layout. Channels at right angles to each other have to use different routing directions. For example if you have four blocks sharing global routes (all blocks use these routes) and local routes (shared between only some of the blocks):
            -------------          -------------
           |             | LOCAL  |             |  
           |             |        |             |  
           |             | <----> |             |  
           |             |        |             |  
           |             |        |             |  
           |             | ROUTES |             |  
            -------------          -------------
                     GLOBAL     ROUTES
                    <----------------->
            -------------          -------------
           |             |        |             |  
           |             |        |             |  
           |             |        |             |  
           |             |        |             |  
           |             |        |             |  
           |             |        |             |  
            -------------          -------------
MicroRoute will have a very difficult time routing this floorplan because we want channels at right angles to each other to route in the same direction. A better approach is:
            -------------   -------------
           |             | |             |  
           |             | |             |  
           |             | |             |  
           |             | |             |  
           |             | |             |  
           |             | |             |  
            -------------   -------------
                  GLOBAL     ROUTES
                 <----------------->
                    LOCAL ROUTES
                     <-------->
            -------------   -------------
           |             | |             |  
           |             | |             |  
           |             | |             |  
           |             | |             |  
           |             | |             |  
           |             | |             |  
            -------------   -------------

For highly congested channels, we may want to have MicroRoute route this channel first. To do this, we may have to create our own slice in this channel. NOTE: Slices are perpendicular to routes. MicroRoute will assign this slice with the highest priority and create the rest of the slices based on this first slice. The channels are generated from the slices.

Bringing Route Widths to Edge Terminals

In order to force MicroRoute to route with the appropriate size wire to the edge/top connectors, the block.upr file has to be edited. In the block.upr file, find the section called TOP CONNECTORS. Then change the width of the port to which the route belongs. For example to get MicroRoute to route a 10 micron VDD wire to a top connector called vdd:
Change:
Port vdd (1347.600, -2364.900) MET2 kind=vdd width=0.9
To:
Port vdd (1347.600, -2364.900) MET2 kind=vdd width=10