Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Arc] Infer StateOp reset from CompReg #4997

Merged
merged 10 commits into from
Apr 14, 2023
Prev Previous commit
Next Next commit
Update comments
  • Loading branch information
TaoBi22 committed Apr 11, 2023
commit 08ca1c34875e89d43d0f1e9b33adf0571ee0c4b6
4 changes: 2 additions & 2 deletions lib/Conversion/ConvertToArcs/ConvertToArcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ LogicalResult Converter::absorbRegs(HWModuleOp module) {
clock = regOp.getClk();
reset = regOp.getReset();

// Check that if there is a reset, it is to a constant zero
// Check that if the register has a reset, it is to a constant zero
if (reset) {
Value resetValue = regOp.getResetValue();
Operation *op = resetValue.getDefiningOp();
Expand Down Expand Up @@ -316,7 +316,7 @@ LogicalResult Converter::absorbRegs(HWModuleOp module) {
++numTrivialRegs;

// Set the arc's clock to the clock of the registers we've absorbed, bump
// the latency up by one to account for the registers, add the reset and
// the latency up by one to account for the registers, add the reset if present and
// update the output names. Then replace the registers.
arc.getClockMutable().assign(clock);
arc.setLatency(arc.getLatency() + 1);
Expand Down