dc allocate budget
TRANSCRIPT
-
8/11/2019 Dc Allocate Budget
1/7
-
8/11/2019 Dc Allocate Budget
2/7
-
8/11/2019 Dc Allocate Budget
3/7
four report files:
tim.rpt - Timing report for both the negative-slack path and the
positive-slack path
default.rpt - Budget report for both the negative-slack path and the
positive-slack path after dc_allocate_budgets
no_interblock_logic.rpt - Budget report for both the negative-slack path
and the positive-slack path after dc_allocate_budgets -no_interblock_logic
positive_slack_only.rpt - Budget report for both the negative-slack path
and the positive-slack path after dc_allocate_budgets -positive_slack_only
The run.dc script also produces six constraint files, three for each block, whenthe -write_script option of dc_allocate_budgets is used:
BlkA_default.tcl BlkB_default.tcl
BlkA_no_interblock_logic.tcl BlkB_no_interblock_logic.tclBlkA_positive_slack_only.tcl BlkB_positive_slack_only.tcl
To calculate values, use the following equations (both explicit and implied)from the Budgeting for Synthesis User Guide.
total_path_delay = delay_from_clock_at_startpoint_flop_to_data_at_endpoint_flop - fixed_delay
path_constraint = clock_period + (clock_network_delay_at_endpoint_flop - \
clock_network_delay_at_startpoint_flop) - setup_time_at_endpoint_flop - \
fixed_delay
path_budget_for_a_block =
(path_delay_within_block / total_path_delay) * path_constraint
output_delay =
path_budget_external_to_block + fixed_delay + setup_at_endpoint_flop - \
clock_network_delay_at_endpoint_flop
input_delay =
clock_network_delay_at_startpoint_flop + path_budget_external_to_block + \
-
8/11/2019 Dc Allocate Budget
4/7
fixed_delay - transition_time_of_input_driver
The scenarios described below should solidify the meaning of most of theseterms. There are, however, two terms that warrant special mention: fixed_delayand transition_time_of_input_driver.
fixed_delay - This term describes the delay of a cell that for a number of
reasons is unable to be budgeted. For example, a cell with either an explicit
or an implicit dont_touch attribute is considered fixed for budgeting. Also,
you will see that cells affected by the -no_interblock_logic option are also
considered fixed for budgeting. Cells that are fixed are designated with an F
in the report created by report_path_budgets. Cells that are not fixed are
designated with an A, indicating that they are automatically budgeted.
transition_time_of_input_driver - The transition time on a cell's
output is included in the cell's delay increment in the timing report (the report_timing -transition_time option displays the transition time
component of a cell's delay increment). Transition time is based on
interconnect capacitance plus pin capacitance of the next stage. Since
the interconnect load and pin capacitances are expected to change when a
budgeted block is resynthesized, transition time is not known at the time
an input_delay value is calculated. Therefore dc_allocate_budgets must
subtract this transition time from the delay of the cell that drives an
input port on a budgeted block. This transition time is accounted for in
the budgeted constraint script by set_driving_cell on the input port.
DEFAULT SCENARIO (dc_allocate_budgets)
In the default.rpt file, see the Delay column in the budget reportfor both the negative- and positive-slack paths. Verify these numbersdirectly against those in the timing report (the tim.rpt file) for each path.The budget report is organized in the same manner as the timing report
(arrival time followed by required time), so this should be straightforward.Note the A designation in the Type column, indicating that both the negative-slack path and the interblock logic have been budgeted.
Next, plug values into the above equations to validate the Budget columnfor both the negative- and the positive-slack path in default.rpt. Further,validate the BlkA output_delay values and the BlkB input_delay valuesfor both the positive- and the negative-slack paths.
Negative-slack pathtotal_path_delay = (1.4223 + 0.7223 + 0.7223) - 0 = 2.8669path_constraint = 2.5000 + (1.6815 - 0.9129) - 0.8000 - 0 = 2.4686block A budget (BlkA/ff1/Q) = (1.4223/2.8669) * 2.4686 = 1.2247
interblock budget (BlkB/in1) = (0.7223/2.8669) * 2.4686 = 0.6220block B budget (BlkB/ff1/D) = (0.7223/2.8669) * 2.4686 = 0.6220output_delay for A/out1 = (0.6220 + 0.6220) + 0 + 0.8000 - 1.6815 = 0.3625input_delay for B/in1 = 0.9129 + (1.2247 + 0.6220) + 0 - 0.0523 = 2.7073
Positive-slack pathtotal_path_delay = (1.4223 + 0.7223) - 0 = 2.1446path_constraint = 2.5000 + (1.6815 - 0.9129) - 0.8000 - 0 = 2.4686
-
8/11/2019 Dc Allocate Budget
5/7
block A budget (BlkA/ff2/Q) = (1.4223/2.1446) * 2.4686 = 1.6372interblock budget (BlkB/in2) = (0.7223/2.1446) * 2.4686 = 0.8314block B budget (BlkB/ff2/D) = (0/2.1446) * 1.7463 = 0
output_delay for A/out2 = 0.8314 + 0 + 0.8000 - 1.6815 =-0.0501input_delay for B/in2 = 0.9129 + (1.6372 + 0.8314) + 0 - 0.0523 = 3.3292
As you can see, these budget calculations produce the same values as reported
in the Budget column for each of the two paths. Totaled, these budget values
equal the path constraint, which is the goal of budgeting. Further, theseoutput_delay calculations for BlkA yield the same values as those producedby dc_allocate_budgets -write_script in BlkA_default.tcl. Similarly, the
calculations for BlkB input_delay values match those in BlkB_default.tcl.Additionally, the max_delay timing report indicates the fall transit ion onthese ports (denoted by the f designation for BlkA/out1 and BlkA/out2path delay increments in tim.rpt), so input_delay and output_delay
calculations are performed, here, only for the fall transition. Also,note that negative values are possible for very short paths with positiveslack (as in the case of this simple example).
NO INTERBLOCK LOGIC SCENARIO (dc_allocate_budgets -no_interblock_logic)
In the no_interblock_logic.rpt file, note the F designation in the Typecolumn, indicating that the interblock logic (BlkB/in1, BlkB/in2) for both thenegative- and the positive-slack paths is considered fixed and has not been
budgeted.
Negative-slack pathtotal_path_delay = (1.4223 + 0.7233 + 0.7223) - 0.7233 = 2.1446
path_constraint = 2.5000 + (1.6815 - 0.9129) - 0.8000 - 0.7223 = 1.7463block A budget (BlkA/ff1/Q) = (1.4223/2.1446) * 1.7463 = 1.1581block B budget (BlkB/ff1/D) = (0.7223/2.1446) * 1.7463 = 0.5882output_delay for A/out1 = 0.5882 + 0.7223 + 0.8000 - 1.6815 = 0.4290
input_delay for B/in1 = 0.9129 + 1.1581 + 0.7223 - 0.0523 = 2.7410
Positive-slack pathtotal_path_delay = (1.4223 + 0.7223) - 0.7223 = 1.4223path_constraint = 2.5000 + (1.6815 - 0.9129) - 0.8000 - 0.7223 = 1.7463
block A budget (BlkA/ff2/Q) = (1.4223/1.4223) * 1.7463 = 1.7463block B budget (BlkB/ff2/D) = (0/2.1446) * 1.7463 = 0output_delay for A/out2 = 0 + 0.7223 + 0.8000 - 1.6815 =-0.1592input_delay for B/in2 = 0.9129 + 1.7463 + 0.7223 - 0.0523 = 3.3292
As you can see, these budget calculations produce the same values asreported in the Budget column for each of the paths. Note that forthe interblock logic path segments (BlkB/in1, BlkB/in2), the values
in the Budget column match those in the Delay column, confirming thatno budgeting was performed on the interblock logic (considered fixed).Further, these output_delay calculations for BlkA yield the same valuesas those produced by dc_allocate_budgets -write_script inBlkA_no_interblock_logic.tcl. Similarly, these calculations for BlkB
input_delay values match those in BlkB_no_interblock_logic.tcl.
POSITIVE SLACK ONLY SCENARIO (dc_allocate_budgets -positive_slack_only)
In the positive_slack_only.rpt file, note the F designation in the Type column,indicating that the negative-slack path (BlkA/ff1/Q, BlkB/in1) is consideredfixed and has not been budgeted.
Negative-slack path(path is not budgeted so no budget calculations are performed)output_delay for A/out1 = (0.7223 + 0.7223) + 0.8000 - 1.6815 = 0.5631
input_delay for B/in1 = 0.9129 + (1.4223 + 0.7223) - 0.0523 = 3.0052
Positive-slack path (same as default)total_path_delay = (1.4223 + 0.7223) - 0 = 2.1446path_constraint = 2.5000 + (1.6815 - 0.9129) - 0.8000 - 0 = 2.4686
-
8/11/2019 Dc Allocate Budget
6/7
block A budget (BlkA/ff2/Q) = (1.4223/2.1446) * 2.4686 = 1.6372interblock budget (BlkB/in2) = (0.7223/2.1446) * 2.4686 = 0.8314block B budget (BlkB/ff2/D) = (0/2.1446) * 1.7463 = 0
output_delay for A/out2 = 0.8314 + 0 + 0.8000 - 1.6815 =-0.0501input_delay for B/in2 = 0.9129 + (1.6372 + 0.8314) + 0 - 0.0523 = 3.3292
As you can see, these budget calculations produce the same values as reported
in the Budget column for each of the paths. Note that for the negative-slack
path, the values in the Budget column match those in the Delay column,confirming that no budgeting was performed on this path (all path segments areconsidered fixed). Further, these output_delay calculations for BlkA yield
the same values as those produced by dc_allocate_budgets -write_script inBlkA_positive_slack_only.tcl. Similarly, these calculations for BlkBinput_delay values match those in BlkB_positive_slack_only.tcl.
SCRIPTS
all.vmodule a(in1,in2,clk,out1,out2);input in1,in2,clk;
output out1,out2;FD1 ff1 (.D(in1),.CP(clk),.Q(out1));FD1 ff2 (.D(in2),.CP(clk),.Q(out2));endmodule
module b(in1,in2,clk,out1,out2);input in1,in2,clk;output out1,out2;
IVDA U1 (.A(in1),.Z(int1));IVDA U2 (.A(clk),.Z(clkint));FD1 ff1 (.D(int1),.CP(clkint),.Q(out1));FD1 ff2 (.D(in2),.CP(clkint),.Q(out2));
endmodule
module top(in1,in2,clk,out1,out2);input in1,in2,clk;output out1,out2;
IVDA U0 (.A(clk),.Z(clkint));IVDA U1 (.A(int1),.Z(glue1));IVDA U2 (.A(int2),.Z(glue2));a BlkA (.in1(in1),.in2(in2),.clk(clkint),.out1(int1),.out2(int2));
b BlkB (.in1(glue1),.in2(glue2),.clk(clkint),.out1(out1),.out2(out2));endmodule
run.dc
set target_library "lsi_10k.db"set link_library "*"set search_path ". $synopsys_root/libraries/syn"set link_library [concat $link_library $target_library]
read_verilog {all.v}current_design toplinkcreate_clock -p 2.5 clk
set_propagated_clock clk
set_input_delay 1 {in1 in2} -clock clkset_output_delay 1 {out1 out2} -clock clkcheck_timing
write_file -format db -hier -output all.db
echo " " > tim.rptecho "############################################" >> tim.rpt
echo "# Timing report for path with negative slack" >> tim.rptecho "# " >> tim.rptreport_timing -from [get_pins "BlkA/ff1/CP"] -to [get_pins "BlkB/ff1/D"] -sig 4 >> tim.rpt
echo " " >> tim.rpt
-
8/11/2019 Dc Allocate Budget
7/7
echo "############################################" >> tim.rptecho "# Timing report for path with positive slack" >> tim.rptecho "# " >> tim.rpt
report_timing -trans -from [get_pins "BlkA/ff2/CP"] -to [get_pins "BlkB/ff2/D"] \-sig 4 >> tim.rpt
dc_allocate_budgets -write_script -file_format_spec ./%C_default.tcl
echo " " > default.rptecho "############################################" >> default.rptecho "# dc_allocate_budgets " >> default.rpt
echo "# Budget report for path with negative slack" >> default.rptecho "# " >> default.rptreport_path_budget -from [get_pins "BlkA/ff1/CP"] -to [get_pins "BlkB/ff1/D"] \-sig 4 >> default.rpt
echo " " >> default.rptecho "############################################" >> default.rptecho "# dc_allocate_budgets " >> default.rptecho "# Budget report for path with positive slack" >> default.rpt
echo "# " >> default.rptreport_path_budget -from [get_pins "BlkA/ff2/CP"] -to [get_pins "BlkB/ff2/D"] \-sig 4 >> default.rpt
read_db all.dbdc_allocate_budgets -no_interblock_logic -write_script -file_format_spec \./%C_no_interblock_logic.tcl
echo " " > no_interblock_logic.rptecho "############################################" >> no_interblock_logic.rptecho "# dc_allocate_budgets -no_interblock_logic " >> no_interblock_logic.rptecho "# Budget report for path with negative slack" >> no_interblock_logic.rpt
echo "# " >> no_interblock_logic.rptreport_path_budget -from [get_pins "BlkA/ff1/CP"] -to [get_pins "BlkB/ff1/D"] \-sig 4 >> no_interblock_logic.rpt
echo " " >> no_interblock_logic.rpt
echo "############################################" >> no_interblock_logic.rptecho "# dc_allocate_budgets -no_interblock_logic " >> no_interblock_logic.rptecho "# Budget report for path with positive slack" >> no_interblock_logic.rptecho "# " >> no_interblock_logic.rpt
report_path_budget -from [get_pins "BlkA/ff2/CP"] -to [get_pins "BlkB/ff2/D"] \-sig 4 >> no_interblock_logic.rpt
read_db all.db
dc_allocate_budgets -positive_slack_only -write_script -file_format_spec \./%C_positive_slack_only.tcl
echo " " > positive_slack_only.rptecho "############################################" >> positive_slack_only.rpt
echo "# dc_allocate_budgets -positive_slack_only " >> positive_slack_only.rptecho "# Budget report for path with negative slack" >> positive_slack_only.rptecho "# " >> positive_slack_only.rptreport_path_budget -from [get_pins "BlkA/ff1/CP"] -to [get_pins "BlkB/ff1/D"] \
-sig 4 >> positive_slack_only.rpt
echo " " >> positive_slack_only.rptecho "############################################" >> positive_slack_only.rpt
echo "# dc_allocate_budgets -positive_slack_only " >> positive_slack_only.rptecho "# Budget report for path with positive slack" >> positive_slack_only.rptecho "# " >> positive_slack_only.rptreport_path_budget -from [get_pins "BlkA/ff2/CP"] -to [get_pins "BlkB/ff2/D"] \
-sig 4 >> positive_slack_only.rpt