Skip to content

Commit

Permalink
pack.cc: fix wrong attribute name for negedge FFs
Browse files Browse the repository at this point in the history
  • Loading branch information
hansfbaier committed Jan 31, 2024
1 parent f793875 commit de774e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion xilinx/constids.inc
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ X(IS_CE1_INVERTED)
X(IS_CLKINSEL_INVERTED)
X(IS_CLK_INVERTED)
X(IS_CLR_INVERTED)
X(IS_C_INVERTED)
X(IS_DATAIN_INVERTED)
X(IS_D_INVERTED)
X(IS_IDATAIN_INVERTED)
Expand Down
2 changes: 1 addition & 1 deletion xilinx/fasm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ struct FasmBackend

pop();
if (negedge_ff) SET_CHECK(is_clkinv, true);
else SET_CHECK(is_clkinv, int_or_default(ff->params, id_IS_C_INVERTED) == 1);
else SET_CHECK(is_clkinv, int_or_default(ff->params, id_IS_CLK_INVERTED) == 1);

NetInfo *sr = ff->getPort(id_SR), *ce = ff->getPort(id_CE);

Expand Down
8 changes: 4 additions & 4 deletions xilinx/pack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,16 @@ void XilinxPacker::pack_ffs()
// ff_rules[id_FDSE].param_xform[id_IS_S_INVERTED] = id_IS_SR_INVERTED;

ff_rules[id_FDCE_1] = XFormRule(ff_rules[id_FDCE]);
ff_rules[id_FDCE_1].set_params.emplace_back(id_IS_C_INVERTED, 1);
ff_rules[id_FDCE_1].set_params.emplace_back(id_IS_CLK_INVERTED, 1);

ff_rules[id_FDPE_1] = XFormRule(ff_rules[id_FDPE]);
ff_rules[id_FDPE_1].set_params.emplace_back(id_IS_C_INVERTED, 1);
ff_rules[id_FDPE_1].set_params.emplace_back(id_IS_CLK_INVERTED, 1);

ff_rules[id_FDRE_1] = XFormRule(ff_rules[id_FDRE]);
ff_rules[id_FDRE_1].set_params.emplace_back(id_IS_C_INVERTED, 1);
ff_rules[id_FDRE_1].set_params.emplace_back(id_IS_CLK_INVERTED, 1);

ff_rules[id_FDSE_1] = XFormRule(ff_rules[id_FDSE]);
ff_rules[id_FDSE_1].set_params.emplace_back(id_IS_C_INVERTED, 1);
ff_rules[id_FDSE_1].set_params.emplace_back(id_IS_CLK_INVERTED, 1);

generic_xform(ff_rules, true);
}
Expand Down

0 comments on commit de774e4

Please sign in to comment.