Repository navigation
Conversation
At 950 ps every configuration of riscv32i measured closed at the clock, so WNS could not tell two of them apart. At 780 ps it does, and with the input and output budgets at 2 % of the period instead of 12.5 % WNS is a register-to-register path: an input-to-register path (instr through the decoder into the register file) set it at 12.5 %. No hold buffers are inserted, and the worst hold slack is +35 ps. riscv32i-mock-sram includes riscv32i's config.mk and was tuned at 950 ps; it gets a copy of today's constraint.sdc and is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
riscv32i already swaps adder architectures during repair. Measured at the new 780 ps clock, to global route: the reg2reg period is 835.6 ps with it and 943.4 ps without, 11 % shorter; with flat synthesis 791.8 and 895.7 ps. The comment records it beside the setting, so the next change to it starts from the number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
SYNTH_MINIMUM_KEEP_SIZE=10000 kept one module, dmem: four SRAM macros (1,376 um^2 of liberty area) and 56 um^2 of address decode. The rule counts the macros' area, so it kept the wrapper, and the boundary sat on the worst path, between the ALU's address adder and the SRAMs' chip-enable decode, which synthesis then optimised apart. Flat, at 780 ps to global route: the reg2reg period is 791.8 ps against 835.6 (5.2 % shorter); of the reg2reg endpoints within 10 % of the period, 995 are faster and 3 slower. WNS is -11.8 ps, a reg2reg path. riscv32i-mock-sram hardens the SRAM as a block and keeps hierarchical synthesis and the size rule as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
There was a problem hiding this comment.
Code Review
This pull request updates the synthesis and timing configurations for the riscv32i and riscv32i-mock-sram designs, including tuning the clock period and IO percentages, conditionalizing hierarchical synthesis parameters, and adding a dedicated SDC constraint file for the mock SRAM design. The review feedback suggests making the SDC_FILE path generic by using $(DESIGN_NICKNAME) in the base configuration, which would eliminate the need for a redundant override in the mock SRAM configuration. Additionally, it is recommended to brace expressions passed to expr in the Tcl SDC file to prevent double-evaluation and improve performance.
A design that includes riscv32i's config.mk now finds its own constraint.sdc as it finds its own io.tcl, so riscv32i-mock-sram no longer names it. Both designs resolve the same files as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
|
@maliberty Just FYI: riscv32i can be faster with some different options. |
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 1 with regression(s), 0 without a comparable baseline. ❌ asap7/riscv32i base — 3 failing metric(s)
|
riscv32i synthesises with
SYNTH_MINIMUM_KEEP_SIZE=10000, which keeps one module:dmem, four SRAM macros (1,376 µm²) and 56 µm² of address decode. The size rule counts the macros' area, so it keeps the wrapper, and the boundary sits on the worst path, between the ALU's address adder and the SRAMs' chip-enable decode. Flat synthesis gives a 5.2 % shorter reg2reg period.At global route, asap7, 780 ps, measured as #4583 proposes (the clock period minus the reg2reg worst slack, and the reg2reg endpoints within 10 % of the period):
dmemSWAP_ARITH_OPERATORSoffSWAP_ARITH_OPERATORSoffCommits:
instrthrough the decoder into the register file) set WNS at every clock tried. riscv32i-mock-sram, which includes riscv32i'sconfig.mk, gets a copy of today'sconstraint.sdcand is unchanged.SWAP_ARITH_OPERATORS: no change to the setting; its measured effect, 11 % on the reg2reg period, is now a comment beside it.BLOCKSbranch, which riscv32i-mock-sram takes; riscv32i synthesises flat.How it was found
A search over which modules synthesis keeps, in bazel-orfs (The-OpenROAD-Project/bazel-orfs#1371): 40 keep sets, each synthesised and floorplanned in about a minute, and a census on each floorplan of where a kept boundary cuts a path between two logic cells.
dmem's boundary was the only one on the worst path, and dropping it the only change the census predicted a gain for. The best keep sets were then built through global route. Two things the search taught:What may generalise
Measured on this design only:
BLOCKS: a module kept for a memory should hold only the memory, the principle of AUTO_MEMORIES: convert only a memory that is its own module; read firtool memory modules #4618 seen from the other side.Also measured, not proposed
The comparator (
magcompare32, a tree of 2-bit compare cells) rewritten asA < Bbefore synthesis, checked equivalent by LEC: 0.6 % shorter than today at 750 ps, longer than flat. The hand-built tree is the better structure here.The numbers are from Bazel builds of these files with ORFS's own settings (yosys's
read_verilog, OpenROAD hierarchical asconfig.mksets), one build each; the flow is deterministic.Claude made the changes and stared at paint drying.
🤖 Generated with Claude Code