syn: Add gate remapping by Ashenhurst-Curtis decomposition with shared set#10906
syn: Add gate remapping by Ashenhurst-Curtis decomposition with shared set#10906povik wants to merge 10 commits into
Conversation
Signed-off-by: Martin Povišer <povik@cutebit.org>
Assisted-by: Claude (various models) Signed-off-by: Martin Povišer <povik@cutebit.org>
There was a problem hiding this comment.
Code Review
This pull request introduces the Ashenhurst-Curtis decomposition (ACD) flow for gate-level resynthesis, adding new files for ACD synthesis, timing, and target indexing, while refactoring the combinational mapper to use the new target index. The review feedback highlights several critical issues and improvements: potential out-of-bounds memory accesses in ArrivalSet::atExit (when outputs exceed two) and outputArrival (when a port is not found), an unconditional overwrite of the budget parameter that ignores caller-specified limits, a redundant null check for sta in populateCutTiming, and a missing continue statement in buildIndex when handling tie cells with zero inputs.
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
When inputs.empty() is true, tie cells are identified and stored in index.tie_low / index.tie_high. However, the loop does not continue afterward, meaning the code will proceed to evaluate fexprEval and npnSemiclassAllRepr with 0 inputs, which is buggy and redundant. Adding a continue avoids this.
| } | |
| } | |
| } | |
| index.tie_high = {cell, 0}; | |
| } | |
| } | |
| continue; | |
| } |
Assisted-by: Claude (various models) Signed-off-by: Martin Povišer <povik@cutebit.org>
Assisted-by: Claude (various models) Signed-off-by: Martin Povišer <povik@cutebit.org>
Assisted-by: Claude (various models) Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Martin Povišer <povik@cutebit.org>
Assisted-by: Claude (various models) Signed-off-by: Martin Povišer <povik@cutebit.org>
Assisted-by: Claude (various models) Signed-off-by: Martin Povišer <povik@cutebit.org>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 138ac4b393
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const float cand_slack | ||
| = networkSlack(logger_, problem, cand, corner_, fixed_slew_); | ||
|
|
||
| if (cand_slack <= slack + epsilon_) { |
There was a problem hiding this comment.
Require per-output slack before accepting cuts
For a two-output cut, this accepts a replacement solely because the cut-wide worst slack improves. If the original roots have slacks like -100ps and -20ps, a candidate with -50ps and -80ps passes this check because the minimum improved from -100ps to -80ps, even though the second endpoint lost 60ps; the same can turn a previously positive side output negative. Since commit() rewires all roots of the substitution, the acceptance test should also enforce per-root no-regression/non-violation, not just WNS improvement.
Useful? React with 👍 / 👎.
| odb::dbInst* inst | ||
| = odb::dbInst::create(block, | ||
| db_network_->staToDb(cell), | ||
| ("remap" + std::to_string(made_++)).c_str()); |
There was a problem hiding this comment.
Use unique remap instance names
When the input design already contains an instance named remap0/remapN (or a netlist from a previous run is reloaded), this raw dbInst::create returns nullptr on duplicate names in ODB, and the following inst->getITerm(...) dereferences it. Use ODB's uniquifying create/helper for generated remap objects so acd_resynth -apply cannot crash on ordinary name collisions.
Useful? React with 👍 / 👎.
Summary
[Describe your changes here]
Type of Change
Impact
New
syn::acd_resynthcommand for invoking timing-oriented ACD resynthesis. This has the form of an undocumented developer command in the interim before we get SDC propagation infrastructure which will allow us to fold this optimization step directly intosynthesize.Verification
./etc/Build.sh).Related Issues
[Link issues here]