Skip to content

Commit f769f62

Browse files
committed
- Update README
- Update two_phase_clk_constraint.sdc - Create specify_files_for_sdc.tcl - Update two_phase_clk_synth.tcl - Update variables.mk
1 parent 472c622 commit f769f62

File tree

5 files changed

+37
-12
lines changed

5 files changed

+37
-12
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ timeline
4444
: DRC/LVS check (KLayout)
4545
```
4646

47+
## Running ORFS with two-phase clocking with latches
48+
49+
```
50+
make DESIGN_CONFIG=./designs/sky130hd/gcd/config.mk .DEFAULT_GOAL=place MODE=two_phase_clk | tee orfs.log
51+
```
52+
53+
## Running static timing analysis
54+
55+
Inside `openroad`, run the following:
56+
57+
```
58+
source platforms/sky130hd/specify_files_for_sdc.tcl
59+
```
60+
4761
## Tool Installation
4862

4963
There are different ways to install and develop OpenROAD and ORFS, which is the best fit depends use-case, experience and personal taste.

flow/designs/sky130hd/gcd/two_phase_clk_constraint.sdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
current_design gcd
44

5-
set clk_period [expr 3 * 1.1]
5+
set clk_period [expr 4 * 1.1]
66
set clk_io_pct 0.2
77
set duty_cycle 0.4
88

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set design gcd
2+
set base_dir "/OpenROAD-flow-scripts/flow"
3+
4+
read_lib $base_dir/platforms/sky130hd/lib/sky130_fd_sc_hd__tt_025C_1v80.lib
5+
6+
7+
read_db $base_dir/results/sky130hd/$design/base/3_place.odb
8+
#read_spef $base_dir/results/sky130hd/$design/base/6_final.spef
9+
read_sdc $base_dir/results/sky130hd/$design/base/3_place.sdc

flow/scripts/two_phase_clk_synth.tcl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,26 +142,23 @@ techmap -autoproc -map $::env(DFF_TO_LATCH_MAP_FILE)
142142
opt -noff
143143

144144

145-
set dfflibmap_args ""
146-
foreach cell $::env(DONT_USE_CELLS) {
147-
lappend dfflibmap_args -dont_use $cell
148-
}
149-
150145
# Technology mapping of flip-flops
151146
# dfflibmap only supports one liberty file
152147
if { [env_var_exists_and_non_empty DFF_LIB_FILE] } {
153-
dfflibmap -liberty $::env(DFF_LIB_FILE) {*}$dfflibmap_args
148+
dfflibmap -liberty $::env(DFF_LIB_FILE) {*}$lib_dont_use_args
154149
} else {
155-
dfflibmap -liberty $::env(DONT_USE_SC_LIB) {*}$dfflibmap_args
150+
dfflibmap {*}$lib_args {*}$lib_dont_use_args
156151
}
157152
opt -noff
158153

159154
# Replace undef values with defined constants
160155
setundef -zero
161156

162157

163-
if { ![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] } {
164-
puts "Running basic abc"
158+
if {
159+
![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] &&
160+
![env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]
161+
} {
165162
log_cmd abc {*}$abc_args
166163
} else {
167164
scratchpad -set abc9.script $::env(SCRIPTS_DIR)/abc_speed_gia_only.script
@@ -190,11 +187,14 @@ insbuf -buf {*}$::env(MIN_BUF_CELL_AND_PORTS)
190187
# Reports
191188
tee -o $::env(REPORTS_DIR)/synth_check.txt check
192189

193-
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$stat_libs
190+
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$lib_args
194191

195192
# check the design is composed exclusively of target cells, and
196193
# check for other problems
197-
if { ![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] } {
194+
if {
195+
![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] &&
196+
![env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]
197+
} {
198198
check -assert -mapped
199199
} else {
200200
# Wrapped operator synthesis leaves around $buf cells which `check -mapped`

flow/scripts/variables.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ export WRAP_CFG = $(PLATFORM_DIR)/wrapper.cfg
161161
export TCLLIBPATH := util/cell-veneer $(TCLLIBPATH)
162162

163163
export SYNTH_SCRIPT ?= $(SCRIPTS_DIR)/synth.tcl
164+
export TWO_PHASE_CLK_SYNTH_SCRIPT ?= $(SCRIPTS_DIR)/two_phase_clk_synth.tcl
165+
164166
export SDC_FILE_CLOCK_PERIOD = $(RESULTS_DIR)/clock_period.txt
165167

166168
export YOSYS_DEPENDENCIES=$(LIB_FILES) $(WRAPPED_LIBS) $(DFF_LIB_FILE) $(VERILOG_FILES) $(SYNTH_NETLIST_FILES) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE) $(SDC_FILE_CLOCK_PERIOD)

0 commit comments

Comments
 (0)