Automatic place and route (APR)
The script that runs APR is located at apr/apr.tcl. You will need to calculate the desired X and Y dimensions of the chip, which are called CoreX and CoreY in apr.tcl.
You will find a PY script at PY_SCRIPTS/pinout/GenChipDim.py which calculates CoreX and CoreY based on your desired overall chip dimensions. After synthesis, check syn/report/DigitalCorePads.area to find the area of DigitalCorePads. For shared tapeout, the X dimension is required to be exactly 1, 2, or 3 mm. Additionally, you should aim for a density between 70-80%. This script will also perform calculations for the seal ring that will be used later.
For example, for the ERASICv1, the area found from synthesis is 2.41 mm2. If we are aiming for a 2 mm x 2.5 mm chip, then this yields CoreX = 2030 μm, CoreY = 1530 μm, and density = 78%. Initialize your floorplan as follows:
set PadWidth 30
set PadHeight 190
set PowerGap 20
set CoreX 2030
set CoreY 1530
set DigitalX [expr {$CoreX + 2*$PadHeight + 2*$PowerGap}]
set DigitalY [expr {$CoreY + 2*$PadHeight + 2*$PowerGap}]
set PadOffsetX [expr {$DigitalX - $PadHeight}]
set PadOffsetY [expr {$DigitalY - $PadHeight}]
init_design
setDesignMode -process 65
floorPlan -s $CoreX $CoreY $PowerGap $PowerGap $PowerGap $PowerGap
setFlipping f
redraw
fit
Next, you will need to load the I/O pads using a TCL script. The TCL script can be generated using a PY script located in the PY_SCRIPTS directory. The WritePinLib.py script can be imported into another PY script that generates the TCL script.
The pads will need to be defined according to their north, east, south, and west locations. The order the pads are listed is critical here. Here are a few things to consider:
- To determine the placement of I/O pads, consider how it will route and the power distribution. It is ideal for power to be near critical high-frequency signals and for clocks to be adjacent to VSSPST.
- If in DigitalCorePads, the pad is created using a generate loop, then the naming convention will be different in the .tcl script. For instance, for
PTRI_CSPI_DATA[0], the pad name will end up beingPTRI_CSPI_DATA_0_PTRI_CSPI_DATA. - While VSS and VSSPST may not be included in the pin diagram, they should be include as pads here.
- To center the pads, you may need to include a pad called "EMPTY" with all the other pads. It can be included as the first pad on all four edges.
WritePinLib.pywill automatically handle the pad so that it is only used for spacing purposes. - To help distinguish the orientation, consider having a different number of pads for the north/south edges by adding an extra VSS pad to the north edge.
- Use the same floorplan dimensions as defined in
apr.tcl. - Write the pads for all four corners and all four edges.
Look at DigitalCorePads_pads.py in PY_SCRIPTS/pinout/module_scripts for reference. Run the PY script to generate the TCL script. The spacing of all four edges will be printed to the terminal, and you will need those numbers later. Copy the TCL script into apr/design. You can create a Makefile that automates this process.
Before running APR, ensure that the clk_list is updated and I/O fillers are being added to all four edges. This will result in a final GDS that can be found at apr/gds/DigitalCorePads.gds2. Innovus will automatically open with your design.
Innovus Violations
To load your design in Innovus, navigate to the DigitalCorePads/apr folder and type innovus. Then, write the following command into the Innovus terminal:
innovus 1> restoreDesign ./saved/final_design.enc.dat DigitalCorePads
Any white X's refer to DRC violations in the design and must be resolved before moving forward. Navigate to ER_ASIC_Rev1/TCL_SCRIPTS/apr_common/nanoroute_flow.tcl. There are several commands that can be run to resolve these errors. Write the following commands into the Innovus terminal:
innovus 2> ecoRoute -fix_drc
innovus 3> editDeleteViolations
innovus 4> ecoRoute
These three commands will 1) attempt to resolve the violations, 2) delete the remaining violations by removing the corresponding nets, and 3) re-route the nets. If the first command resolves all violations, then there is no need to do the remaining two commands.
You will need to complete the rest of APR by re-running the rest of the APR commands in the Innovus terminal. This includes the remaining commands in nanoroute_flow.tcl and the entire write_outputs.tcl script. You may consider simply including the commands in nanoroute_flow.tcl.