-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
546 lines (457 loc) · 19.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
# ==============================================================================
# Uncomment or add the design to run
# ==============================================================================
# DESIGN_CONFIG=./designs/aes_nangate45.mk
# DESIGN_CONFIG=./designs/dynamic_node_nangate45.mk
# DESIGN_CONFIG=./designs/gcd_nangate45.mk
# DESIGN_CONFIG=./designs/ibex_nangate45.mk
# DESIGN_CONFIG=./designs/swerv_nangate45.mk
# DESIGN_CONFIG=./designs/aes_tsmc65lp.mk
# DESIGN_CONFIG=./designs/ariane_tsmc65lp.mk
# DESIGN_CONFIG=./designs/bp_fe_top_tsmc65lp.mk
# DESIGN_CONFIG=./designs/coyote_tsmc65lp.mk
# DESIGN_CONFIG=./designs/dynamic_node_tsmc65lp.mk
# DESIGN_CONFIG=./designs/gcd_tsmc65lp.mk
# DESIGN_CONFIG=./designs/ibex_tsmc65lp.mk
# DESIGN_CONFIG=./designs/jpeg_tsmc65lp.mk
# DESIGN_CONFIG=./designs/swerv_tsmc65lp.mk
# DESIGN_CONFIG=./designs/swerv_wrapper_tsmc65lp.mk
# DESIGN_CONFIG=./designs/tinyRocket_tsmc65lp.mk
# DESIGN_CONFIG=./designs/vb_tsmc65lp.mk
# Default design
DESIGN_CONFIG ?= ./designs/gcd_nangate45.mk
# # Global override Floorplan
# CORE_UTILIZATION := 30
# CORE_ASPECT_RATIO := 1
# CORE_MARGIN := 4
all: route
# ==============================================================================
# ____ _____ _____ _ _ ____
# / ___|| ____|_ _| | | | _ \
# \___ \| _| | | | | | | |_) |
# ___) | |___ | | | |_| | __/
# |____/|_____| |_| \___/|_|
#
# ==============================================================================
# Include design and platform configuration
include $(DESIGN_CONFIG)
include ./platforms/$(PLATFORM)/config.mk
# Setup working directories
export LOG_DIR = ./logs/$(PLATFORM)/$(DESIGN_NAME)
export OBJECTS_DIR = ./objects/$(PLATFORM)/$(DESIGN_NAME)
export REPORTS_DIR = ./reports/$(PLATFORM)/$(DESIGN_NAME)
export RESULTS_DIR = ./results/$(PLATFORM)/$(DESIGN_NAME)
export SCRIPTS_DIR = ./scripts
export TEST_DIR = ./test
# Tool Options
SHELL = /bin/bash -o pipefail
BANNER = printf "\e[31m" ; \
date ; \
figlet -c -p -d $(OPENROAD)/figlet/fonts/ $(1) ; \
printf "\e[0m" ; \
sleep 1 ;
# Quick check to make sure OpenROAD tools are installed
ifeq ("$(OPENROAD)","")
$(error ERROR: These tests require the OpenROAD tools to be setup.)
endif
# Pre-process Lefs
# ==============================================================================
$(OBJECTS_DIR)/merged.lef: $(MERGED_LEF)
mkdir -p $(OBJECTS_DIR)
cp $< $@
$(OBJECTS_DIR)/merged_padded.lef: $(OBJECTS_DIR)/merged.lef
$(SCRIPTS_DIR)/padLefMacro.py -p $(CELL_PAD_IN_MICRON) -i $< -o $@
# Modify lef files for TritonRoute
$(OBJECTS_DIR)/merged_padded_spacing.lef: $(OBJECTS_DIR)/merged_padded.lef
$(SCRIPTS_DIR)/modifyLefSpacing.py -i $< -o $@
# Pre-process libraries
# ==============================================================================
$(OBJECTS_DIR)/merged.lib: $(DESIGN_LIB_FILES)
mkdir -p $(OBJECTS_DIR)
$(SCRIPTS_DIR)/mergeLib.pl $(PLATFORM)_merged \
$(LIB_FILES) \
> $@.tmp
$(SCRIPTS_DIR)/markDontUse.pl -p "$(DONT_USE_CELLS)" -i $@.tmp -o $@
# Link flute data files
# ==============================================================================
./PORT9.dat:
ln -sf $(OPENROAD)/share/replace/$@ $@
./POST9.dat:
ln -sf $(OPENROAD)/share/replace/$@ $@
./POWV9.dat:
ln -sf $(OPENROAD)/share/replace/$@ $@
../etc/PORT9.dat:
mkdir -p ../etc
ln -sf $(OPENROAD)/share/replace/PORT9.dat $@
../etc/POST9.dat:
mkdir -p ../etc
ln -sf $(OPENROAD)/share/replace/POST9.dat $@
../etc/POWV9.dat:
mkdir -p ../etc
ln -sf $(OPENROAD)/share/replace/POWV9.dat $@
# ==============================================================================
# ______ ___ _ _____ _ _ _____ ____ ___ ____
# / ___\ \ / / \ | |_ _| | | | ____/ ___|_ _/ ___|
# \___ \\ V /| \| | | | | |_| | _| \___ \| |\___ \
# ___) || | | |\ | | | | _ | |___ ___) | | ___) |
# |____/ |_| |_| \_| |_| |_| |_|_____|____/___|____/
#
synth: $(RESULTS_DIR)/1_synth.v \
$(RESULTS_DIR)/1_synth.sdc
# ==============================================================================
# Run Synthesis using yosys
#-------------------------------------------------------------------------------
SYNTH_SCRIPT ?= scripts/synth.tcl
$(RESULTS_DIR)/1_1_yosys.v: $(OBJECTS_DIR)/merged.lib
@$(call BANNER, 1. SYNTHESIS)
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
yosys -l $(LOG_DIR)/1_yosys.log -c $(SYNTH_SCRIPT)
$(RESULTS_DIR)/1_2_buffer.v: $(RESULTS_DIR)/1_1_yosys.v $(SDC_FILE) | ../etc/PORT9.dat ../etc/POST9.dat ../etc/POWV9.dat
resizer $(SCRIPTS_DIR)/buffer.tcl \
2>&1 | tee $(LOG_DIR)/1_2_buffer.log
@! grep --color "Error:" $(LOG_DIR)/1_2_buffer.log
$(RESULTS_DIR)/1_synth.v: $(RESULTS_DIR)/1_2_buffer.v
cp $< $@
clean_synth:
rm -rf $(RESULTS_DIR)/1_*.v $(RESULTS_DIR)/1_synth.sdc
rm -rf _tmp_yosys-abc-*
# ==============================================================================
# _____ _ ___ ___ ____ ____ _ _ _ _
# | ___| | / _ \ / _ \| _ \| _ \| | / \ | \ | |
# | |_ | | | | | | | | | |_) | |_) | | / _ \ | \| |
# | _| | |__| |_| | |_| | _ <| __/| |___ / ___ \| |\ |
# |_| |_____\___/ \___/|_| \_\_| |_____/_/ \_\_| \_|
#
floorplan: $(RESULTS_DIR)/2_floorplan.def \
$(RESULTS_DIR)/2_floorplan.v \
$(RESULTS_DIR)/2_floorplan.sdc
# ==============================================================================
# STEP 1: Translate verilog to def
#-------------------------------------------------------------------------------
ifneq ($(CORE_UTILIZATION),)
FLOORPLAN_ARGS = -utilization $(CORE_UTILIZATION) \
-aspect_ratio $(CORE_ASPECT_RATIO) \
-core_space $(CORE_MARGIN)
else
FLOORPLAN_ARGS = -die_area "$(DIE_AREA)" -core_area "$(CORE_AREA)"
endif
$(RESULTS_DIR)/2_1_floorplan.def: $(OBJECTS_DIR)/merged.lef $(RESULTS_DIR)/1_synth.v
@$(call BANNER, 2. FLOORPLAN)
verilog2def \
-lef $(OBJECTS_DIR)/merged.lef \
$(foreach file,$(LIB_FILES),-liberty $(file)) \
-verilog $(RESULTS_DIR)/1_synth.v \
-top_module $(DESIGN_NAME) \
-units 2000 \
-site $(PLACE_SITE) \
-tracks $(TRACKS_INFO_FILE) \
-def $@ \
$(FLOORPLAN_ARGS) \
2>&1 | tee $(LOG_DIR)/2_1_verilog2def.log
sed -i 's/VERSION 5.5/VERSION 5.6/' $@
# STEP 2: IO Placement
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/2_2_floorplan_io.def: $(OBJECTS_DIR)/merged.lef $(RESULTS_DIR)/2_1_floorplan.def
ioPlacer --input-lef $(OBJECTS_DIR)/merged.lef \
--input-def $(RESULTS_DIR)/2_1_floorplan.def \
--output $@ \
--hmetal 5 \
--vmetal 6 \
--random 2 \
--wirelen 1 \
2>&1 | tee $(LOG_DIR)/2_2_ioPlacer.log
# STEP 3: Timing Driven Mixed Sized Placement
# Only run if required
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/2_3_floorplan_tdms.def: $(RESULTS_DIR)/2_2_floorplan_io.def $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES) $(OBJECTS_DIR)/merged_padded.lef | ./PORT9.dat ./POST9.dat ./POWV9.dat
ifeq ($(RUN_MACRO_PLACEMENT),1)
RePlAce \
-bmflag etc \
-lef $(OBJECTS_DIR)/merged_padded.lef \
-def $(RESULTS_DIR)/2_2_floorplan_io.def \
-verilog $(RESULTS_DIR)/1_synth.v \
$(foreach file,$(LIB_FILES),-lib $(file)) \
-sdc $(RESULTS_DIR)/1_synth.sdc \
-output $(RESULTS_DIR)/td-ms-replace \
-t 1 \
-timing \
-resPerMicron $(RES_PER_MICRON) \
-capPerMicron $(CAP_PER_MICRON) \
-skipIP \
-plot \
-experi output \
-den 0.7 \
-onlyGP \
2>&1 | tee $(LOG_DIR)/2_3_TD-MS-RePlAce.log
cp $(RESULTS_DIR)/td-ms-replace/etc/2_2_floorplan_io/output/2_2_floorplan_io_final.def $@
else
cp $< $@
endif
# STEP 4: Macro Placement
# Only run if required
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/2_4_floorplan_macro.def: $(RESULTS_DIR)/2_3_floorplan_tdms.def $(OBJECTS_DIR)/merged_padded.lef $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(IP_GLOBAL_CFG)
ifeq ($(RUN_MACRO_PLACEMENT),1)
fplan $(foreach file,$(LIB_FILES),-lib $(file)) \
-verilog $(RESULTS_DIR)/1_synth.v \
-lef $(OBJECTS_DIR)/merged_padded.lef \
-def $(RESULTS_DIR)/2_3_floorplan_tdms.def \
-design $(DESIGN_NAME) \
-sdc $(RESULTS_DIR)/1_synth.sdc \
-output $(DESIGN_NAME) \
-globalConfig $(IP_GLOBAL_CFG) \
-depth 3 \
-plot \
-westFix \
| tee $(LOG_DIR)/2_4_fplan.log
mv $(DESIGN_NAME)_best.def $@
else
cp $< $@
endif
# STEP 5: PDN generation
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/2_5_floorplan_pdn.def: $(RESULTS_DIR)/2_4_floorplan_macro.def
ifneq ($(PDN_CFG),)
apply_pdn $(PDN_CFG) | tee $(LOG_DIR)/2_5_apply_pdn.log
mv $(DESIGN_NAME)_post_T8.def $@
else
cp $< $@
endif
# STEP 6: Tapcell and Welltie insertion
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/2_6_floorplan_tapcell.def: $(OBJECTS_DIR)/merged.lef $(RESULTS_DIR)/2_5_floorplan_pdn.def
cp $(RESULTS_DIR)/2_5_floorplan_pdn.def $@
tapcell -lef $(OBJECTS_DIR)/merged.lef \
-def $(RESULTS_DIR)/2_5_floorplan_pdn.def \
-rule $(WELLTTAP_RULE) \
-welltap $(WELLTIE_CELL) \
-endcap $(ENDCAP_CELL) \
-rows \
-outdef $@ | tee $(LOG_DIR)/2_6_tapcell.log
$(RESULTS_DIR)/2_floorplan.def: $(RESULTS_DIR)/2_6_floorplan_tapcell.def
cp $< $@
$(RESULTS_DIR)/2_floorplan.v: $(RESULTS_DIR)/1_synth.v
cp $< $@
$(RESULTS_DIR)/2_floorplan.sdc: $(RESULTS_DIR)/1_synth.sdc
cp $< $@
clean_floorplan:
rm -rf $(RESULTS_DIR)/2_*floorplan*.def
rm -rf $(RESULTS_DIR)/2_floorplan.v $(RESULTS_DIR)/2_floorplan.sdc
# ==============================================================================
# ____ _ _ ____ _____
# | _ \| | / \ / ___| ____|
# | |_) | | / _ \| | | _|
# | __/| |___ / ___ \ |___| |___
# |_| |_____/_/ \_\____|_____|
#
place: $(RESULTS_DIR)/3_place.def \
$(RESULTS_DIR)/3_place.v \
$(RESULTS_DIR)/3_place.sdc
# ==============================================================================
# STEP 1: Global placement
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/3_1_place_gp.def: $(OBJECTS_DIR)/merged_padded.lef $(RESULTS_DIR)/2_floorplan.def $(RESULTS_DIR)/2_floorplan.v $(RESULTS_DIR)/2_floorplan.sdc | ./PORT9.dat ./POST9.dat ./POWV9.dat
@$(call BANNER, 3. PLACE)
rm -rf $(RESULTS_DIR)/etc/
RePlAce -bmflag etc \
-lef $(OBJECTS_DIR)/merged_padded.lef \
-def $(RESULTS_DIR)/2_floorplan.def \
-verilog $(RESULTS_DIR)/2_floorplan.v \
$(foreach file,$(LIB_FILES),-lib $(file)) \
-sdc $(RESULTS_DIR)/2_floorplan.sdc \
-output $(RESULTS_DIR)/replace \
-t 1 \
-timing \
-resPerMicron $(RES_PER_MICRON) \
-capPerMicron $(CAP_PER_MICRON) \
-skipIP \
-plot \
-experi output \
-den 0.509 \
-initCoef 0.00002 \
-onlyGP \
2>&1 | tee $(LOG_DIR)/3_1_RePlAce.log
cp $(RESULTS_DIR)/replace/etc/2_floorplan/output/2_floorplan_final.def $@
$(RESULTS_DIR)/replace.gif: $(RESULTS_DIR)/3_1_place_gp.def
convert -delay 20 $(RESULTS_DIR)/replace/etc/floorplan/output/cell/cGP2D*.jpg \
-delay 100 $(RESULTS_DIR)/replace/etc/floorplan/output/globalPlaceResult.jpg \
$@
# STEP 2: Resizing & Buffering
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/3_2_place_resized.def: $(OBJECTS_DIR)/merged.lef $(RESULTS_DIR)/3_1_place_gp.def $(RESULTS_DIR)/2_floorplan.sdc | ../etc/PORT9.dat ../etc/POST9.dat ../etc/POWV9.dat
resizer $(SCRIPTS_DIR)/resize.tcl \
2>&1 | tee $(LOG_DIR)/3_2_resizer.log
# @! grep --color "Error:" $(LOG_DIR)/3_2_resizer.log
$(RESULTS_DIR)/3_place.v: $(RESULTS_DIR)/3_2_place_resized.def
# STEP 3: Detail placement
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/3_3_place_dp.def: $(OBJECTS_DIR)/merged_padded.lef $(RESULTS_DIR)/3_2_place_resized.def
opendp -lef $(OBJECTS_DIR)/merged_padded.lef \
-def $(RESULTS_DIR)/3_2_place_resized.def \
-output_def $@ \
2>&1 | tee $(LOG_DIR)/3_3_opendp.log
$(RESULTS_DIR)/3_place.def: $(RESULTS_DIR)/3_3_place_dp.def
cp $< $@
$(RESULTS_DIR)/3_place.sdc: $(RESULTS_DIR)/2_floorplan.sdc
cp $< $@
# Clean Targets
#-------------------------------------------------------------------------------
clean_place:
rm -rf $(RESULTS_DIR)/3_*place*.def
rm -rf $(RESULTS_DIR)/3_place.v $(RESULTS_DIR)/3_place.sdc
# ==============================================================================
# ____ _____ ____
# / ___|_ _/ ___|
# | | | | \___ \
# | |___ | | ___) |
# \____| |_| |____/
#
cts: $(RESULTS_DIR)/4_cts.def \
$(RESULTS_DIR)/4_cts.v \
$(RESULTS_DIR)/4_cts.sdc
# ==============================================================================
# Prepare tritonCTS config
# ------------------------------------------------------------------------------
SKEW = 50
TOLER = 1000
PERCENTILE = 0.075
$(OBJECTS_DIR)/tritonCts.config: $(OBJECTS_DIR)/merged_padded.lef $(RESULTS_DIR)/3_place.def
@$(call BANNER, 4. CTS)
mkdir -p $(OBJECTS_DIR)
echo "lef $(OBJECTS_DIR)/merged_padded.lef" > $@
echo "path $(RESULTS_DIR)/3_place.def" >> $@
echo "verilog $(RESULTS_DIR)/3_place.v" >> $@
echo "design $(DESIGN_NAME)" >> $@
echo "target_skew $(SKEW)" >> $@
echo "width $(CORE_WIDTH)" >> $@
echo "height $(CORE_HEIGHT)" >> $@
echo "tech $(PROCESS)" >> $@
echo "ck_port $(CLOCK_PORT)" >> $@
echo "db_units 2000" >> $@
echo "root_buff $(CTS_BUF_CELL)" >> $@
echo "toler $(TOLER)" >> $@
echo "percentile $(PERCENTILE)" >> $@
# Run TritonCTS
# ------------------------------------------------------------------------------
$(RESULTS_DIR)/4_cts.v: $(OBJECTS_DIR)/tritonCts.config | ./PORT9.dat ./POST9.dat ./POWV9.dat
$(OPENROAD)/TritonCTS/runTritonCTS.tcl \
-configFilePath=$< \
-scriptsPath=$(OPENROAD)/TritonCTS/scripts \
-techFilesPath=$(CTS_TECH_DIR) \
-lefDefParserPath=$(OPENROAD)/TritonCTS/bin/lefdef2cts \
-executablePath=$(OPENROAD)/TritonCTS/bin/genHtree \
-legalizerPath=$(OPENROAD)/bin/opendp \
-outputPath=$(RESULTS_DIR)/run 2>&1 | tee $(LOG_DIR)/4_tritonCTS.log
cp $(RESULTS_DIR)/run/final.v $@
$(RESULTS_DIR)/4_cts.def: $(RESULTS_DIR)/4_cts.v
cp $(RESULTS_DIR)/run/cts_final.def $@
$(RESULTS_DIR)/4_cts.sdc: $(RESULTS_DIR)/3_place.sdc
cp $< $@
clean_cts:
rm -rf $(OBJECTS_DIR)/tritonCts.config
rm -rf $(RESULTS_DIR)/4_cts.def $(RESULTS_DIR)/4_cts.v $(RESULTS_DIR)/4_cts.sdc
# ==============================================================================
# ____ ___ _ _ _____ ___ _ _ ____
# | _ \ / _ \| | | |_ _|_ _| \ | |/ ___|
# | |_) | | | | | | | | | | || \| | | _
# | _ <| |_| | |_| | | | | || |\ | |_| |
# |_| \_\\___/ \___/ |_| |___|_| \_|\____|
#
route: $(RESULTS_DIR)/5_route.def \
$(RESULTS_DIR)/5_route.v \
$(RESULTS_DIR)/5_route.sdc
# ==============================================================================
# STEP 1: Run global route
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/route.guide: $(OBJECTS_DIR)/merged_padded.lef $(RESULTS_DIR)/4_cts.def
@$(call BANNER, 5. ROUTING)
envsubst < $(SCRIPTS_DIR)/fastroute.rsyn > $(OBJECTS_DIR)/fastroute.rsyn
FRlefdef --no-gui --script $(OBJECTS_DIR)/fastroute.rsyn 2>&1 | tee $(LOG_DIR)/5_1_FRlefdef.log
# STEP 2: Run detail route
#-------------------------------------------------------------------------------
# Generate param file for TritonRoute
#-------------------------------------------------------------------------------
$(OBJECTS_DIR)/TritonRoute.param: $(OBJECTS_DIR)/merged_padded_spacing.lef $(RESULTS_DIR)/4_cts.def $(RESULTS_DIR)/route.guide
echo "lef:$(OBJECTS_DIR)/merged_padded_spacing.lef" > $@
echo "def:$(RESULTS_DIR)/4_cts.def" >> $@
echo "guide:$(RESULTS_DIR)/route.guide" >> $@
echo "output:$(RESULTS_DIR)/5_route.def" >> $@
echo "outputTA:$(RESULTS_DIR)/5_route_TA.def" >> $@
echo "outputguide:$(RESULTS_DIR)/output_guide.mod" >> $@
echo "outputMaze:$(RESULTS_DIR)/maze.log" >> $@
echo "threads:$(NPROC)" >> $@
echo "cpxthreads:1" >> $@
echo "verbose:1" >> $@
echo "gap:0" >> $@
echo "timeout:2400" >> $@
# Run TritonRoute
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/5_route.def: $(OBJECTS_DIR)/TritonRoute.param
TritonRoute $< 2>&1 | tee $(LOG_DIR)/5_2_TritonRoute.log
$(RESULTS_DIR)/5_route.v: $(RESULTS_DIR)/4_cts.v
cp $< $@
$(RESULTS_DIR)/5_route.sdc: $(RESULTS_DIR)/4_cts.sdc
cp $< $@
clean_route:
rm -rf output*/ results*.out.dmp layer_*.mps
rm -rf *.gdid *.log *.met *.sav *.res.dmp
rm -rf $(RESULTS_DIR)/route.guide $(OBJECTS_DIR)/TritonRoute.param
rm -rf $(RESULTS_DIR)/5_route.def $(RESULTS_DIR)/5_route.v $(RESULTS_DIR)/5_2_route.sdc
# ==============================================================================
# _____ ___ _ _ ___ ____ _ _ ___ _ _ ____
# | ___|_ _| \ | |_ _/ ___|| | | |_ _| \ | |/ ___|
# | |_ | || \| || |\___ \| |_| || || \| | | _
# | _| | || |\ || | ___) | _ || || |\ | |_| |
# |_| |___|_| \_|___|____/|_| |_|___|_| \_|\____|
#
finish: $(RESULTS_DIR)/6_final.gds \
$(REPORTS_DIR)/6_final_report.rpt
# ==============================================================================
$(REPORTS_DIR)/6_final_report.rpt:
resizer $(SCRIPTS_DIR)/final_report.tcl \
2>&1 | tee $(LOG_DIR)/6_1_report.log
# Run magic
#-------------------------------------------------------------------------------
$(RESULTS_DIR)/6_final.gds: $(MAGIC_TECH_FILE) $(GDS_FILES) $(RESULTS_DIR)/5_route.def
@$(call BANNER, 6. FINISHING)
magic -dnull -noconsole -T $(MAGIC_TECH_FILE) \
$(SCRIPTS_DIR)/magic.tcl | tee $(LOG_DIR)/6_magic.log
clean_finish:
rm -rf $(RESULTS_DIR)/6_final.gds
rm -rf $(REPORTS_DIR)/6_*.rpt
# ==============================================================================
# __ __ ___ ____ ____
# | \/ |_ _/ ___| / ___|
# | |\/| || |\___ \| |
# | | | || | ___) | |___
# |_| |_|___|____/ \____|
#
# ==============================================================================
clean:
@echo
@echo "Make clean disabled."
@echo "Use make clean_all or clean individual steps:"
@echo " clean_synth clean_floorplan clean_place clean_cts clean_route clean_finish"
@echo
clean_all: clean_synth clean_floorplan clean_place clean_cts clean_route clean_finish
nuke:
rm -rf ./results ./logs ./reports ./objects
rm -rf ./POST9.dat ./PORT9.dat ./POWV9.dat
rm -rf ../etc/POST9.dat ../etc/PORT9.dat ../etc/POWV9.dat
rm -rf layer_*.mps macrocell.list *best.plt *_pdn.def dummy.guide run.param
rm -rf *.rpt *.def.v innovus.* pin_dumper.log
# Open any def file using innovus
#-------------------------------------------------------------------------------
$(foreach def,$(notdir $(wildcard $(RESULTS_DIR)/*.def)),debug_$(def)): debug_%:
innovus -execute "loadLefFile $(MERGED_LEF) ; \
loadDefFile $(RESULTS_DIR)/$* ; \
win" \
-no_logv ; stty sane
# run test using gnu parallel
#-------------------------------------------------------------------------------
TEST_SCRIPT ?= $(TEST_DIR)/core_tests.sh
run_test:
parallel --sshloginfile $(TEST_DIR)/nodes.txt \
--timeout 21600 \
--workdir `pwd` < $(TEST_SCRIPT) \
--joblog $(TEST_DIR)/parallel.log