diff --git a/BUILD.bazel b/BUILD.bazel index 994328b..1d7ea94 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -377,6 +377,13 @@ SWEEP = { }, "stage_sources": {"floorplan": ["write_macro_placement"]}, }, + "1": { + "description": "Hierarchical, branch predictors as macros", + "variables": { + "HOLD_SLACK_MARGIN": "-900", + }, + "macros": ["ComposedBranchPredictorBank_generate_abstract"], + }, } BOOMTILE_VARIABLES = SKIP_REPORT_METRICS | FAST_BUILD_SETTINGS | { @@ -428,6 +435,36 @@ boomtile_all_rams = boom_regfile_rams.keys() + all_srams.keys() ALL_VARIANTS = SWEEP | OTHER_VARIANTS +BRANCH_PREDICTOR_VARIABLES = SKIP_REPORT_METRICS | FAST_BUILD_SETTINGS | BLOCK_FLOORPLAN | { + "IO_CONSTRAINTS": "$(location :io-boomtile)", + "PLACE_DENSITY": "0.24", + # We only need hierarchical synthesis when we are running through floorplan + # write_macro_placement macros.tcl + "SYNTH_HIERARCHICAL": "1", + "SDC_FILE": "$(location :constraints-boomtile)", + "MACRO_PLACE_HALO": "19 19", + "PLACE_PINS_ARGS": "-annealing", + "DIE_AREA": "0 0 500 500", + "CORE_AREA": "0 0 498 498", + # Saves hours of build time, specific to BoomTile + "SKIP_LAST_GASP": "1", + "SETUP_SLACK_MARGIN": "-1300", + "HOLD_SLACK_MARGIN": "-200", +} + +orfs_flow( + name = "ComposedBranchPredictorBank", + abstract_stage = "cts", + arguments = BRANCH_PREDICTOR_VARIABLES, + macros = [ + ":" + m + "_generate_abstract" + for m in boomtile_all_rams + ], + mock_area = 0.5, + stage_sources = BOOMTILE_SOURCES, + verilog_files = all_source_files, +) + [orfs_flow( name = "BoomTile", arguments = BOOMTILE_VARIABLES | ALL_VARIANTS[variant].get("variables", {}), @@ -435,7 +472,7 @@ ALL_VARIANTS = SWEEP | OTHER_VARIANTS ":" + m + "_generate_abstract" for m in boomtile_all_rams if m not in ALL_VARIANTS[variant].get("dissolve", []) - ], + ] + ALL_VARIANTS[variant].get("macros", []), previous_stage = ALL_VARIANTS[variant].get("previous_stage", {}), renamed_inputs = ALL_VARIANTS[variant].get("renamed_inputs", {}), # Explictily set arguments for a stage when stages are not listed in diff --git a/constraints-boomtile.sdc b/constraints-boomtile.sdc index a0c10d0..838d1ab 100644 --- a/constraints-boomtile.sdc +++ b/constraints-boomtile.sdc @@ -11,4 +11,20 @@ set clk_port_name clock # Ignore synchronous reset for now. set_false_path -from [get_ports reset] -source $env(PLATFORM_DIR)/constraints.sdc +set clk_port [get_ports $clk_port_name] +create_clock -period $clk_period -waveform [list 0 [expr $clk_period / 2]] -name $clk_name $clk_port + +set non_clk_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port] + +if {[llength [all_registers]] > 0} { + set all_register_outputs [get_pins -of_objects [all_registers] -filter {direction == output}] + set_max_delay [expr {[info exists in2reg_max] ? $in2reg_max : 80}] -from $non_clk_inputs -to [all_registers] + set_max_delay [expr {[info exists reg2out_max] ? $reg2out_max : 80}] -from $all_register_outputs -to [all_outputs] + + group_path -name in2reg -from $non_clk_inputs -to [all_registers] + group_path -name reg2out -from [all_registers] -to [all_outputs] + group_path -name reg2reg -from [all_registers] -to [all_registers] +} + +set_max_delay [expr {[info exists in2out_max] ? $in2out_max : 80}] -from $non_clk_inputs -to [all_outputs] +group_path -name in2out -from $non_clk_inputs -to [all_outputs]