|
| 1 | +set sdc_version 2.0 |
| 2 | + |
| 3 | +set cols [expr {[info exists ::env(MOCK_ARRAY_WIDTH)] ? $::env(MOCK_ARRAY_WIDTH) : 8}] |
| 4 | + |
| 5 | +set clk_name clock |
| 6 | +set clk_port_name clock |
| 7 | +set clk_period 8000 |
| 8 | + |
| 9 | +set clk_port [get_ports $clk_port_name] |
| 10 | +create_clock -period $clk_period -waveform [list 0 [expr $clk_period / 2]] -name $clk_name $clk_port |
| 11 | + |
| 12 | +# io_ins_x -> REG_x |
| 13 | +set_input_delay -clock $clk_name -min [expr $clk_period / 2] [get_ports {io_ins_*}] |
| 14 | +set_input_delay -clock $clk_name -max [expr $clk_period / 2] [get_ports {io_ins_*}] |
| 15 | + |
| 16 | +# REG_x -> io_outs_x |
| 17 | +set_output_delay -clock $clk_name -min [expr $clk_period / 2] [get_ports {io_outs_*}] |
| 18 | +set_output_delay -clock $clk_name -max [expr $clk_period / 2] [get_ports {io_outs_*}] |
| 19 | + |
| 20 | +# For combinational buses routed through the elements, IO delays need to be set to accomodate requirements |
| 21 | +# for each instance's position across the entire array. For simplicity, we budget the clock period evenly |
| 22 | +# between all elements (with some headroom). |
| 23 | +set budget_per_element [expr $clk_period / $cols] |
| 24 | +set headroom [expr $budget_per_element * .2] |
| 25 | +# For in -> reg and reg -> out paths, min delay captures the case where a signal hasn't flowed through any |
| 26 | +# other element before this one |
| 27 | +set min_delay $headroom |
| 28 | +# For in -> reg and reg -> out paths, max delay captures the case where a signal has flowed through all |
| 29 | +# other elements before this one |
| 30 | +set max_delay [expr $budget_per_element * ($cols - 1) + $headroom] |
| 31 | + |
| 32 | +# REG[0] (io_outs_left[0] in the source) -> io_lsbOuts_7 |
| 33 | +set_output_delay -clock $clk_name -min $min_delay [get_ports {io_lsbOuts_7}] |
| 34 | +set_output_delay -clock $clk_name -max $max_delay [get_ports {io_lsbOuts_7}] |
| 35 | + |
| 36 | +# All remaining non-clock IOs are only connected to one another without going through any |
| 37 | +# registers (in -> out paths). Such paths should not be checked for setup/hold violations |
| 38 | +# and do not need to be constrained. |
| 39 | +set non_clk_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port] |
| 40 | +set_false_path -from $non_clk_inputs -to [all_outputs] |
0 commit comments