Skip to content

Commit 0fd0c4c

Browse files
committed
Merge remote-tracking branch 'origin/master' into secure-gpl-modify-td-max-weight
2 parents 4f916c6 + ea570f4 commit 0fd0c4c

File tree

7 files changed

+244
-19
lines changed

7 files changed

+244
-19
lines changed

flake.lock

Lines changed: 171 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
openroad = {
6+
type = "git";
7+
url = "https://github.com/The-OpenROAD-Project/OpenROAD";
8+
submodules = true;
9+
rev = "ec1bf1a13902813b722f8341c432cd09714d9e55";
10+
};
11+
yosys = {
12+
type = "git";
13+
url = "https://github.com/The-OpenROAD-Project/yosys";
14+
submodules = true;
15+
rev = "c4b5190229616f7ebf8197f43990b4429de3e420";
16+
};
17+
};
18+
outputs = { self, nixpkgs, flake-utils, openroad, yosys }: flake-utils.lib.eachDefaultSystem (
19+
system:
20+
let
21+
pkgs = nixpkgs.legacyPackages.${system};
22+
in {
23+
devShells.default = pkgs.mkShell {
24+
buildInputs = [
25+
openroad.packages.${system}.default
26+
yosys.packages.${system}.default
27+
pkgs.time
28+
pkgs.klayout
29+
pkgs.verilator
30+
pkgs.perl
31+
pkgs.python3
32+
pkgs.python3Packages.pandas
33+
pkgs.python3Packages.numpy
34+
pkgs.python3Packages.firebase-admin
35+
pkgs.python3Packages.click
36+
pkgs.python3Packages.pyyaml
37+
pkgs.python3Packages.yamlfix
38+
];
39+
};
40+
}
41+
);
42+
}

flow/Makefile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,6 @@ ifneq ($(BLOCKS),)
188188
endif
189189
endif
190190

191-
export RTLMP_RPT_DIR ?= $(OBJECTS_DIR)/rtlmp
192-
export RTLMP_RPT_FILE ?= partition.txt
193-
export RTLMP_BLOCKAGE_FILE ?= $(OBJECTS_DIR)/rtlmp/partition.txt.blockage
194-
195191
#-------------------------------------------------------------------------------
196192
ifeq (,$(strip $(NUM_CORES)))
197193
# Linux (utility program)
@@ -227,15 +223,27 @@ endif
227223
# Priority is given to
228224
# 1 user explicit set with variable in Makefile or command line, for instance setting OPENROAD_EXE
229225
# 2 ORFS compiled tools: openroad, yosys
230-
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
231-
export OPENSTA_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/sta)
226+
ifneq (${IN_NIX_SHELL},)
227+
export OPENROAD_EXE := $(shell command -v openroad)
228+
else
229+
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
230+
endif
231+
ifneq (${IN_NIX_SHELL},)
232+
export OPENSTA_EXE := $(shell command -v sta)
233+
else
234+
export OPENSTA_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/sta)
235+
endif
232236

233237
OPENROAD_ARGS = -no_init -threads $(NUM_CORES) $(OR_ARGS)
234238
OPENROAD_CMD = $(OPENROAD_EXE) -exit $(OPENROAD_ARGS)
235239
OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE) $(OPENROAD_ARGS)
236240
OPENROAD_GUI_CMD = $(OPENROAD_EXE) -gui $(OR_ARGS)
237241

238-
YOSYS_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys)
242+
ifneq (${IN_NIX_SHELL},)
243+
YOSYS_EXE := $(shell command -v yosys)
244+
else
245+
YOSYS_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys)
246+
endif
239247

240248
# Use locally installed and built klayout if it exists, otherwise use klayout in path
241249
KLAYOUT_DIR = $(abspath $(FLOW_HOME)/../tools/install/klayout/)
@@ -440,8 +448,7 @@ yosys-dependencies: $(YOSYS_DEPENDENCIES)
440448
.PHONY: do-yosys
441449
do-yosys: $(DONT_USE_SC_LIB)
442450
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
443-
(export VERILOG_FILES=$(RESULTS_DIR)/1_synth.rtlil; \
444-
$(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys.log)
451+
($(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys.log)
445452

446453
.PHONY: do-yosys-canonicalize
447454
do-yosys-canonicalize: yosys-dependencies $(DONT_USE_SC_LIB)
@@ -485,12 +492,6 @@ floorplan: $(RESULTS_DIR)/2_floorplan.odb \
485492

486493
# ==============================================================================
487494

488-
ifneq ($(FOOTPRINT),)
489-
IS_CHIP = 1
490-
else ifneq ($(FOOTPRINT_TCL),)
491-
IS_CHIP = 1
492-
endif
493-
494495
UNSET_VARS = for var in $(UNSET_VARIABLES_NAMES); do unset $$var; done
495496

496497
# FILE_MAKEFILE is needed when ORFS is invoked with

flow/designs/gf12/ca53/config.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export DIE_AREA = 0 0 1400 1400
4848
export CORE_AREA = 10 10 1390 1390
4949
export PLACE_DENSITY_LB_ADDON = 0.05
5050

51-
export IO_CONSTRAINTS = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/io.tcl
51+
export IO_CONSTRAINTS = $(DESIGN_HOME)/$(PLATFORM)/ca53/io.tcl
5252

5353
export MACRO_PLACE_HALO = 7 7
5454

flow/scripts/io_placement.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source $::env(SCRIPTS_DIR)/load.tcl
22
erase_non_stage_variables place
33

4-
if {![env_var_equals IS_CHIP 1]} {
4+
if {![env_var_exists_and_non_empty FOOTPRINT] && ![env_var_exists_and_non_empty FOOTPRINT_TCL]} {
55
load_design 3_1_place_gp_skip_io.odb 2_floorplan.sdc
66
source $::env(SCRIPTS_DIR)/io_placement_util.tcl
77
write_db $::env(RESULTS_DIR)/3_2_place_iop.odb

flow/scripts/macro_place_util.tcl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
if {[find_macros] != ""} {
2-
# If wrappers defined replace macros with their wrapped version
3-
# # ----------------------------------------------------------------------------
2+
if {![env_var_exists_and_non_empty RTLMP_RPT_DIR]} {
3+
set ::env(RTLMP_RPT_DIR) "$::env(OBJECTS_DIR)/rtlmp"
4+
}
5+
if {![env_var_exists_and_non_empty RTLMP_RPT_FILE]} {
6+
set ::env(RTLMP_RPT_FILE) "partition.txt"
7+
}
8+
if {![env_var_exists_and_non_empty RTLMP_BLOCKAGE_FILE]} {
9+
set ::env(RTLMP_BLOCKAGE_FILE) "$::env(OBJECTS_DIR)/rtlmp/partition.txt.blockage"
10+
}
11+
12+
# If wrappers defined replace macros with their wrapped version
413
if {[env_var_exists_and_non_empty MACRO_WRAPPERS]} {
514
source $::env(MACRO_WRAPPERS)
615

flow/scripts/synth.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
set ::env(VERILOG_FILES) $::env(RESULTS_DIR)/1_synth.rtlil
2+
13
source $::env(SCRIPTS_DIR)/synth_preamble.tcl
24

35
hierarchy -check -top $::env(DESIGN_NAME)

0 commit comments

Comments
 (0)