Skip to content

Commit 3c7a7cd

Browse files
committed
Merge remote-tracking branch 'private/master' into secure-gpl-fix-revert-if-diverge
2 parents 500b5dd + 68d2fa0 commit 3c7a7cd

File tree

9 files changed

+252
-17
lines changed

9 files changed

+252
-17
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: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# settings.mk is not under source control. Put variables into this
2+
# file to avoid having to adding the to the make command line.
3+
-include settings.mk
4+
15
# ==============================================================================
26
# Uncomment or add the design to run
37
# ==============================================================================
@@ -184,10 +188,6 @@ ifneq ($(BLOCKS),)
184188
endif
185189
endif
186190

187-
export RTLMP_RPT_DIR ?= $(OBJECTS_DIR)/rtlmp
188-
export RTLMP_RPT_FILE ?= partition.txt
189-
export RTLMP_BLOCKAGE_FILE ?= $(OBJECTS_DIR)/rtlmp/partition.txt.blockage
190-
191191
#-------------------------------------------------------------------------------
192192
ifeq (,$(strip $(NUM_CORES)))
193193
# Linux (utility program)
@@ -223,15 +223,27 @@ endif
223223
# Priority is given to
224224
# 1 user explicit set with variable in Makefile or command line, for instance setting OPENROAD_EXE
225225
# 2 ORFS compiled tools: openroad, yosys
226-
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
227-
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
228236

229237
OPENROAD_ARGS = -no_init -threads $(NUM_CORES) $(OR_ARGS)
230238
OPENROAD_CMD = $(OPENROAD_EXE) -exit $(OPENROAD_ARGS)
231239
OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE) $(OPENROAD_ARGS)
232240
OPENROAD_GUI_CMD = $(OPENROAD_EXE) -gui $(OR_ARGS)
233241

234-
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
235247

236248
# Use locally installed and built klayout if it exists, otherwise use klayout in path
237249
KLAYOUT_DIR = $(abspath $(FLOW_HOME)/../tools/install/klayout/)
@@ -436,8 +448,7 @@ yosys-dependencies: $(YOSYS_DEPENDENCIES)
436448
.PHONY: do-yosys
437449
do-yosys: $(DONT_USE_SC_LIB)
438450
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
439-
(export VERILOG_FILES=$(RESULTS_DIR)/1_synth.rtlil; \
440-
$(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)
441452

442453
.PHONY: do-yosys-canonicalize
443454
do-yosys-canonicalize: yosys-dependencies $(DONT_USE_SC_LIB)

flow/designs/asap7/riscv32i/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"compare": "<="
5757
},
5858
"finish__timing__drv__setup_violation_count": {
59-
"value": 544,
59+
"value": 692,
6060
"compare": "<="
6161
},
6262
"finish__timing__drv__hold_violation_count": {

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/designs/nangate45/ariane136/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"compare": "<="
6161
},
6262
"finish__timing__drv__hold_violation_count": {
63-
"value": 205,
63+
"value": 359,
6464
"compare": "<="
6565
},
6666
"finish__timing__wns_percent_delay": {

flow/designs/nangate45/swerv_wrapper/rules-base.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"compare": "<="
4949
},
5050
"finish__timing__setup__ws": {
51-
"value": -0.55,
51+
"value": -0.52,
5252
"compare": ">="
5353
},
5454
"finish__design__instance__area": {
@@ -60,11 +60,11 @@
6060
"compare": "<="
6161
},
6262
"finish__timing__drv__hold_violation_count": {
63-
"value": 228,
63+
"value": 444,
6464
"compare": "<="
6565
},
6666
"finish__timing__wns_percent_delay": {
67-
"value": -28.24,
67+
"value": -27.05,
6868
"compare": ">="
6969
}
7070
}

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)