Replies: 4 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
-
|
I like the proposal. I think a good next step could be to make a PR that just defines the new interfaces in C++ so that we can agree on them in more detail. That could be a simple PR to start. |
Beta Was this translation helpful? Give feedback.
-
|
@gadfort FYI |
Beta Was this translation helpful? Give feedback.
-
|
It might be useful to look at dpo. It has a set of transforms and a mini-language to sequence them. It also defines objective functions (evaluators). We aren't taking full advantage and just using a fixed recipe but the architecture has a somewhat similar feel. I wonder if we can generalize this mechanism enough to make it not rsz specific. I think iEDA has done a good job with separating out a library of evaluation classes. I think you should also consider that placement legalization is not part of rsz. If you want it to be undo-able you will need to rely on odb's journaling as the mechanism. I did some work on parallel transforms in the past (pick one of N trials). The db support for that gets very complex quickly and the bugs truly horrendous when it fails. I suggest we punt that for quite a while. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to suggest (and implement) a refactored architecture for the resizer
code. The proposed architecture will add significant flexibility by
easing the addition optimization moves and application of the moves in different
orders and at varying levels of perturbation (i.e. post-place, post-grt,
post-cts, post-drt).
baseMove: A baseline "move" class that implements a transform. At a minimum, a move will
contain methods to:
For example, we would have moves: resizeMove, bufferMove, cloneMove,
pinSwapMove, etc. Using a base class will easily allow extensibility and structure for
additional moves to be added, such as relocateMove which could just move a
gate. An ecoMove is also a good option to do legalization as some moves may
have reduced consideration for legalization.
moveSequence: A sequence of moves class that implements a sequence of moves, to be
applied in order to a gate/net. Currently, there is a single sequence that is hard coded but
with some options to disable steps of the sequence (e.g. skip_pin_swap,
skip_gate_cloning, etc.). For example, an early post-grt sequence could be:
[cloneMove, bufferMove, ecoMove, resizeMove]
where an early ECO may be desirable.
A later post-drt sequence could be:
[swapMove, resizeMove, ecoMove]
It is also possible just to leave out any legalization and do that after the
resizer is done in another step of the flow.
The standard move "recipes" will be typedefined but ultimately these sequence
could also be user-specified. Such capabilities would allow us to experiment
and dial-in which sequences are best through tuning and regression. It is also
realistic that some users may want to customize the resizer in arbitrary ways
for their specific design needs.
QoR: A "QoR" class would implement what measure of result will be evaluated. At a
minimum, this would be one of: WNS or TNS (for setup or hold), Area recovery,
DRV (max slew, max cap, fanout, length) but could also be a combination of the
above such as WNS with an area limit or area recovery with a positive slack
margin limit. For hold, for example, this could have
options to fix hold with or without allowing additional setup violations. By
simply changing the QoR class, both repair_timing and repair_design can be
implemented. This class may return results from a single corner of a
multi-corner STA.
moveCandidates: This class would perform selection and ordering of the
specific gates/nets to optimize. Depending on the QoR metric, you may want to
identify candidates based on DRV violation, WNS, TNS, positive slack (for area
recover), etc. There may be options for guard banding (e.g., setup_slack_margin
and hold_slack_limit_ratio). This class will also have options whether to do
path-based candidates or breadth-first based candidates. Different orders get
different results depending on the number of near-critical paths, design
structure, etc. This class may focus on candidates for selected in either a single
corner or multiple corners during timing closure. This could differ from the
QoR multi-corner settings. For example, you may want to focus on a single slow
corner but measure QoR on all the corners.
optimize (looking for better name): This class does the multiple passes and iterations
over the candidate lists. The arguments are a pass sequence, QoR metric,
candidate selection class as well as options for the number of iterations,
passes, and whether negative QoR is allowed to get out of minima. This would be
very similar to that used in the current repairSetup. Ultimately, this may be
refactored further to a single pass and multiple passes.
The current repair_timing and repair_design can easily be refactored to the
above without significantly modifying the functionality of the existing code at
first. The initial, default sequence would be taken from the existing
repairSetup.cc, repairHold.cc, and repairDesign.cc:
Setup:
Hold:
Design (DRV):
I would start by implementing the repair_timing setup and hold optimizations
only in the refactor while leaving repair_design largely alone. The same
arguments to repair_timing would update the moveSequence for the same
functionality. Once the main classes are functional, we can then augment to
include repair_design.
@maliberty
Beta Was this translation helpful? Give feedback.
All reactions