Skip to content

Commit 092033a

Browse files
committed
sweep: cleanup
- Introduce OTHER_VARIANTS, variants that are not part of the sweep, but used for other testing purposes or from SWEEP variants. - BoomTile has pathological resource usage when not flattened regardless of MAX_UNGROUP_SIZE(we have done a sweep to drive a wooden stake through the heart of the idea that some magic value of MAX_UNGROUP_SIZE will 'fix' hiearchical synthesis for megaboom), so non-flattened synthesis is not interesting to examine in megaboom. Upcoming work in OpenROAD will probably restore the usefulness of studying hierarchical synthesis results in OpenROAD since eliminating unused logic after hierarchical synthesis is known (from naja) to reduce instances in megaboom by 50%. Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 5cf5f57 commit 092033a

File tree

1 file changed

+21
-37
lines changed

1 file changed

+21
-37
lines changed

BUILD.bazel

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,10 @@ FAST_BUILD_SETTINGS = {
349349
"TAPCELL_TCL": "",
350350
}
351351

352-
SWEEP = {
353-
"base": {
352+
OTHER_VARIANTS = {
353+
"macro": {
354354
"description": "Base settings, provides macro placement from hierarchical synthesis",
355355
"variables": {
356-
"GLOBAL_ROUTE_ARGS": "-congestion_iterations 30 -congestion_report_iter_step 5 -verbose",
357356
},
358357
},
359358
"naja": {
@@ -364,28 +363,18 @@ SWEEP = {
364363
"floorplan": "BoomTile_synth",
365364
},
366365
},
367-
"1": {
368-
"description": "Flattend, timing driven placement, CTS timing repair enabled",
369-
"variables": {
370-
"SYNTH_HIERARCHICAL": "0",
371-
"GPL_TIMING_DRIVEN": "1",
372-
"SKIP_CTS_REPAIR_TIMING": "0",
373-
"MACRO_PLACEMENT_TCL": "$(location write_macro_placement)",
374-
},
375-
"stage_sources": {"floorplan": ["write_macro_placement"]},
376-
},
377-
"2": {
378-
"description": "Flattend, timing driven placement, CTS timing repair enabled, last gasp timing repair",
366+
}
367+
368+
SWEEP = {
369+
"base": {
370+
"description": "Flattend, timing driven placement",
379371
"variables": {
380372
"SYNTH_HIERARCHICAL": "0",
381373
"GPL_TIMING_DRIVEN": "1",
382374
"SKIP_CTS_REPAIR_TIMING": "0",
383375
"MACRO_PLACEMENT_TCL": "$(location write_macro_placement)",
384376
"SKIP_LAST_GASP": "0",
385377
},
386-
"previous_stage": {
387-
"floorplan": "BoomTile_1_synth",
388-
},
389378
"stage_sources": {"floorplan": ["write_macro_placement"]},
390379
},
391380
}
@@ -411,11 +400,9 @@ BOOMTILE_VARIABLES = SKIP_REPORT_METRICS | FAST_BUILD_SETTINGS | {
411400
"HOLD_SLACK_MARGIN": "-200",
412401
}
413402

414-
WNS_REPORT_SWEEP = [variant for variant in SWEEP if "naja" not in variant]
415-
416403
SWEEP_JSON = {
417404
"base": BOOMTILE_VARIABLES,
418-
"sweep": {variant: SWEEP[variant] for variant in WNS_REPORT_SWEEP},
405+
"sweep": {variant: SWEEP[variant] for variant in SWEEP},
419406
"stage": "cts",
420407
"stages": [
421408
"floorplan",
@@ -439,39 +426,36 @@ BOOMTILE_SOURCES = {
439426

440427
boomtile_all_rams = boom_regfile_rams.keys() + all_srams.keys()
441428

429+
ALL_VARIANTS = SWEEP | OTHER_VARIANTS
430+
442431
[orfs_flow(
443432
name = "BoomTile",
444-
arguments = BOOMTILE_VARIABLES | SWEEP[variant].get("variables", {}),
433+
arguments = BOOMTILE_VARIABLES | ALL_VARIANTS[variant].get("variables", {}),
445434
macros = [
446435
":" + m + "_generate_abstract"
447436
for m in boomtile_all_rams
448-
if m not in SWEEP[variant].get("dissolve", [])
437+
if m not in ALL_VARIANTS[variant].get("dissolve", [])
449438
],
450-
previous_stage = SWEEP[variant].get("previous_stage", {}),
451-
renamed_inputs = SWEEP[variant].get("renamed_inputs", {}),
439+
previous_stage = ALL_VARIANTS[variant].get("previous_stage", {}),
440+
renamed_inputs = ALL_VARIANTS[variant].get("renamed_inputs", {}),
452441
# Explictily set arguments for a stage when stages are not listed in
453442
# variables.yaml or we want to explicitly set a multi-stage argument
454443
# for a specific stage, e.g. SETUP_SLACK_MARGIN could be useful to
455444
# have a different value for floorplan, cts and grt.
456445
stage_arguments = {
457-
"grt": {
458-
# global route is futile for now, so do a few iterations to
459-
# get a global route artifact with .odb and .rpt file
460-
"GLOBAL_ROUTE_ARGS": "-congestion_iterations 5 -congestion_report_iter_step 5 -verbose",
461-
},
462446
},
463447
# Starlark does not have sets, nor can we define functions in BUILD files
464448
# Use a dict to get a set of keys
465449
stage_sources = {
466-
key: (SWEEP[variant].get("stage_sources", {}).get(key, []) + BOOMTILE_SOURCES.get(key, []))
450+
key: (ALL_VARIANTS[variant].get("stage_sources", {}).get(key, []) + BOOMTILE_SOURCES.get(key, []))
467451
for key in {
468452
key: "dummy"
469-
for key in (BOOMTILE_SOURCES.keys() + SWEEP[variant].get("stage_sources", {}).keys())
453+
for key in (BOOMTILE_SOURCES.keys() + ALL_VARIANTS[variant].get("stage_sources", {}).keys())
470454
}.keys()
471455
},
472456
variant = variant,
473457
verilog_files = all_source_files,
474-
) for variant in SWEEP]
458+
) for variant in ALL_VARIANTS]
475459

476460
[filegroup(
477461
name = "BoomTile_" + variant + "_odb",
@@ -507,8 +491,8 @@ genrule(
507491
srcs = [
508492
"wns_report.py",
509493
"sweep.json",
510-
] + [":BoomTile_" + variant + ".txt" for variant in WNS_REPORT_SWEEP] +
511-
[":BoomTile_" + variant + "_logs" for variant in WNS_REPORT_SWEEP],
494+
] + [":BoomTile_" + variant + ".txt" for variant in SWEEP] +
495+
[":BoomTile_" + variant + "_logs" for variant in SWEEP],
512496
outs = ["BoomTile_wns_report.md"],
513497
cmd = (
514498
"$(location :wns_report.py) > $@" +
@@ -562,7 +546,7 @@ filegroup(
562546
srcs = [
563547
":BoomTile_" + ("" if variant == "base" else variant + "_") + stage
564548
for stage in SWEEP_JSON["stages"]
565-
for variant in WNS_REPORT_SWEEP
549+
for variant in SWEEP
566550
],
567551
output_group = "logs",
568552
)
@@ -581,7 +565,7 @@ genrule(
581565
# Use the macro placement from a different flow
582566
orfs_run(
583567
name = "write_macro_placement",
584-
src = ":BoomTile_floorplan",
568+
src = ":BoomTile_macro_floorplan",
585569
outs = [
586570
":macro_placement.tcl",
587571
],

0 commit comments

Comments
 (0)