Skip to content

Commit c845a96

Browse files
committed
make: moved nangate45 to python
$ DESIGN_NAME=gcd CORE_UTILIZATION=55 PLACE_DENSITY_LB_ADDON=0.20 PLATFORM=nangate45 PLATFORM_DIR=platforms/nangate45 scripts/flow.sh 2_1_floorplan floorplan Running floorplan.tcl, stage 2_1_floorplan [INFO ODB-0227] LEF file: platforms/nangate45/lef/NangateOpenCellLibrary.tech.lef, created 22 layers, 27 vias [INFO ODB-0227] LEF file: platforms/nangate45/lef/NangateOpenCellLibrary.macro.mod.lef, created 135 library cells ========================================================================== Floorplan check_setup -------------------------------------------------------------------------- number instances in verilog is 503 [WARNING IFP-0028] Core area lower left (1.000, 1.000) snapped to (1.140, 1.400). [INFO IFP-0001] Added 24 rows of 180 site FreePDK45_38x28_10R_NP_162NW_34O. repair_timing -verbose -setup_margin 0 -repair_tns 100 [WARNING RSZ-0021] no estimated parasitics. Using wire load models. [INFO RSZ-0098] No setup violations found [INFO RSZ-0033] No hold violations found. Default units for flow time 1ns capacitance 1fF resistance 1kohm voltage 1v current 1mA power 1nW distance 1um Report metrics stage 2, floorplan final... ========================================================================== floorplan final report_design_area -------------------------------------------------------------------------- Design area 650 u^2 57% utilization. Elapsed time: 0:00.40[h:]min:sec. CPU time: user 0.33 sys 0.09 (106%). Peak memory: 121724KB. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent c5f25c4 commit c845a96

File tree

4 files changed

+94
-106
lines changed

4 files changed

+94
-106
lines changed

flow/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ $(foreach line,$(shell \
201201
YOSYS_EXE=$(YOSYS_EXE) \
202202
KLAYOUT_CMD=$(KLAYOUT_CMD) \
203203
SCRIPTS_DIR=$(SCRIPTS_DIR) \
204+
ADDITIONAL_LIBS=$(ADDITIONAL_LIBS) \
205+
ADDITIONAL_LIBS=$(ADDITIONAL_GDS) \
206+
ADDITIONAL_LIBS=$(ADDITIONAL_LEFS) \
204207
$(SCRIPTS_DIR)/defaults.py make),$(eval export $(subst __SPACE__, ,$(line))))
205208

206209
# Not normally adjusted by user

flow/platforms/nangate45/config.mk

Lines changed: 0 additions & 104 deletions
This file was deleted.

flow/platforms/nangate45/config.py

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,93 @@
1-
def get_defaults():
1+
import glob
2+
import os
3+
4+
5+
def get_defaults(variables):
6+
gds_files = (
7+
" ".join(
8+
sorted(glob.glob(os.path.join(variables["PLATFORM_DIR"], "gds", "*.gds")))
9+
)
10+
+ " "
11+
+ variables.get("ADDITIONAL_GDS", "")
12+
).strip()
213
return {
314
"PROCESS": "45",
15+
# -----------------------------------------------------
16+
# Tech/Libs
17+
# -----------------------------------------------------
18+
"TECH_LEF": f"{variables['PLATFORM_DIR']}/lef/NangateOpenCellLibrary.tech.lef",
19+
"SC_LEF": f"{variables['PLATFORM_DIR']}/lef/NangateOpenCellLibrary.macro.mod.lef",
20+
"LIB_FILES": f"{variables['PLATFORM_DIR']}/lib/NangateOpenCellLibrary_typical.lib {variables.get('ADDITIONAL_LIBS', '')}",
21+
"GDS_FILES": gds_files,
22+
# Don't use cells to ease congestion
23+
# Specify at least one filler cell if none
24+
"DONT_USE_CELLS": "TAPCELL_X1 FILLCELL_X1 AOI211_X1 OAI211_X1",
25+
# Fill cells used in fill cell insertion
26+
"FILL_CELLS": "FILLCELL_X1 FILLCELL_X2 FILLCELL_X4 FILLCELL_X8 FILLCELL_X16 FILLCELL_X32",
27+
# -----------------------------------------------------
28+
# Yosys
29+
# -----------------------------------------------------
30+
# Ungroup size for hierarchical synthesis
31+
"SYNTH_MINIMUM_KEEP_SIZE": 10000,
32+
# Set the TIEHI/TIELO cells
33+
# These are used in yosys synthesis to avoid logical 1/0's in the netlist
34+
"TIEHI_CELL_AND_PORT": "LOGIC1_X1 Z",
35+
"TIELO_CELL_AND_PORT": "LOGIC0_X1 Z",
36+
# Used in synthesis
37+
"MIN_BUF_CELL_AND_PORTS": "BUF_X1 A Z",
38+
# Yosys mapping files
39+
"LATCH_MAP_FILE": f"{variables['PLATFORM_DIR']}/cells_latch.v",
40+
"CLKGATE_MAP_FILE": f"{variables['PLATFORM_DIR']}/cells_clkgate.v",
41+
"ADDER_MAP_FILE": f"{variables['PLATFORM_DIR']}/cells_adders.v",
42+
"ABC_DRIVER_CELL": "BUF_X1",
43+
# BUF_X1, pin (A) = 0.974659. Arbitrarily multiply by 4
44+
"ABC_LOAD_IN_FF": 3.898,
45+
# --------------------------------------------------------
46+
# Floorplan
47+
# --------------------------------------------------------
48+
# Placement site for core cells
49+
# This can be found in the technology lef
50+
"PLACE_SITE": "FreePDK45_38x28_10R_NP_162NW_34O",
51+
# IO Placer pin layers
52+
"IO_PLACER_H": "metal5",
53+
"IO_PLACER_V": "metal6",
54+
# Define default PDN config
55+
"PDN_TCL": f"{variables['PLATFORM_DIR']}/grid_strategy-M1-M4-M7.tcl",
56+
# Endcap and Welltie cells
57+
"TAPCELL_TCL": f"{variables['PLATFORM_DIR']}/tapcell.tcl",
58+
"TAP_CELL_NAME": "TAPCELL_X1",
59+
"MACRO_PLACE_HALO": "22.4 15.12",
60+
# ---------------------------------------------------------
61+
# Place
62+
# ---------------------------------------------------------
63+
"PLACE_DENSITY": 0.30,
64+
# ---------------------------------------------------------
65+
# Route
66+
# ---------------------------------------------------------
67+
# FastRoute options
68+
"MIN_ROUTING_LAYER": "metal2",
69+
"MAX_ROUTING_LAYER": "metal10",
70+
# Define fastRoute tcl
71+
"FASTROUTE_TCL": f"{variables['PLATFORM_DIR']}/fastroute.tcl",
72+
# KLayout technology file
73+
"KLAYOUT_TECH_FILE": f"{variables['PLATFORM_DIR']}/FreePDK45.lyt",
74+
# KLayout DRC ruledeck
75+
"KLAYOUT_DRC_FILE": f"{variables['PLATFORM_DIR']}/drc/FreePDK45.lydrc",
76+
# KLayout LVS ruledeck
77+
"KLAYOUT_LVS_FILE": f"{variables['PLATFORM_DIR']}/lvs/FreePDK45.lylvs",
78+
# Allow empty GDS cell
79+
"GDS_ALLOW_EMPTY": "fakeram.*",
80+
"CDL_FILE": f"{variables['PLATFORM_DIR']}/cdl/NangateOpenCellLibrary.cdl",
81+
# Template definition for power grid analysis
82+
"TEMPLATE_PGA_CFG": f"{variables['PLATFORM_DIR']}/template_pga.cfg",
83+
# OpenRCX extRules
84+
"RCX_RULES": f"{variables['PLATFORM_DIR']}/rcx_patterns.rules",
85+
# ---------------------------------------------------------
86+
# IR Drop
87+
# ---------------------------------------------------------
88+
# IR drop estimation supply net name to be analyzed and supply voltage variable
89+
# For multiple nets: PWR_NETS_VOLTAGES = "VDD1 1.8 VDD2 1.2"
90+
"PWR_NETS_VOLTAGES": "VDD 1.1",
91+
"GND_NETS_VOLTAGES": "VSS 0.0",
92+
"IR_DROP_LAYER": "metal1",
493
}

flow/scripts/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
sys.path.append(os.path.dirname(config_py))
1111
import config
1212

13-
platform_defaults = config.get_defaults()
13+
platform_defaults = config.get_defaults(os.environ)
1414
else:
1515
platform_defaults = {}
1616

0 commit comments

Comments
 (0)