mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-14 01:46:16 +00:00
small whitespace cleanup (#5119)
This commit is contained in:
parent
e3ae7b1400
commit
748600c167
2 changed files with 6 additions and 6 deletions
|
@ -1182,7 +1182,7 @@ struct RTLIL::Selection
|
||||||
bool boxes = false,
|
bool boxes = false,
|
||||||
// the design to select from
|
// the design to select from
|
||||||
RTLIL::Design *design = nullptr
|
RTLIL::Design *design = nullptr
|
||||||
) :
|
) :
|
||||||
selects_boxes(boxes), complete_selection(full && boxes), full_selection(full && !boxes), current_design(design) { }
|
selects_boxes(boxes), complete_selection(full && boxes), full_selection(full && !boxes), current_design(design) { }
|
||||||
|
|
||||||
// checks if the given module exists in the current design and is a
|
// checks if the given module exists in the current design and is a
|
||||||
|
|
|
@ -487,7 +487,7 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons
|
||||||
|
|
||||||
handle_clkpol_celltype_swap(cell, "$_DLATCHSR_N??_", "$_DLATCHSR_P??_", ID::E, assign_map, invert_map);
|
handle_clkpol_celltype_swap(cell, "$_DLATCHSR_N??_", "$_DLATCHSR_P??_", ID::E, assign_map, invert_map);
|
||||||
handle_clkpol_celltype_swap(cell, "$_DLATCHSR_?N?_", "$_DLATCHSR_?P?_", ID::S, assign_map, invert_map);
|
handle_clkpol_celltype_swap(cell, "$_DLATCHSR_?N?_", "$_DLATCHSR_?P?_", ID::S, assign_map, invert_map);
|
||||||
handle_clkpol_celltype_swap(cell, "$_DLATCHSR_??N_", "$_DLATCHSR_??P_", ID::R, assign_map, invert_map);
|
handle_clkpol_celltype_swap(cell, "$_DLATCHSR_??N_", "$_DLATCHSR_??P_", ID::R, assign_map, invert_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
TopoSort<RTLIL::Cell*, RTLIL::IdString::compare_ptr_by_name<RTLIL::Cell>> cells;
|
TopoSort<RTLIL::Cell*, RTLIL::IdString::compare_ptr_by_name<RTLIL::Cell>> cells;
|
||||||
|
@ -1715,22 +1715,22 @@ skip_identity:
|
||||||
|
|
||||||
if (onehot) {
|
if (onehot) {
|
||||||
if (bit_idx == 1) {
|
if (bit_idx == 1) {
|
||||||
log_debug("Replacing pow cell `%s' in module `%s' with left-shift\n",
|
log_debug("Replacing pow cell `%s' in module `%s' with left-shift\n",
|
||||||
cell->name.c_str(), module->name.c_str());
|
cell->name.c_str(), module->name.c_str());
|
||||||
cell->type = ID($shl);
|
cell->type = ID($shl);
|
||||||
cell->parameters[ID::A_WIDTH] = 1;
|
cell->parameters[ID::A_WIDTH] = 1;
|
||||||
cell->setPort(ID::A, Const(State::S1, 1));
|
cell->setPort(ID::A, Const(State::S1, 1));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log_debug("Replacing pow cell `%s' in module `%s' with multiply and left-shift\n",
|
log_debug("Replacing pow cell `%s' in module `%s' with multiply and left-shift\n",
|
||||||
cell->name.c_str(), module->name.c_str());
|
cell->name.c_str(), module->name.c_str());
|
||||||
cell->type = ID($mul);
|
cell->type = ID($mul);
|
||||||
cell->parameters[ID::A_SIGNED] = 0;
|
cell->parameters[ID::A_SIGNED] = 0;
|
||||||
cell->setPort(ID::A, Const(bit_idx, cell->parameters[ID::A_WIDTH].as_int()));
|
cell->setPort(ID::A, Const(bit_idx, cell->parameters[ID::A_WIDTH].as_int()));
|
||||||
|
|
||||||
SigSpec y_wire = module->addWire(NEW_ID, y_size);
|
SigSpec y_wire = module->addWire(NEW_ID, y_size);
|
||||||
cell->setPort(ID::Y, y_wire);
|
cell->setPort(ID::Y, y_wire);
|
||||||
|
|
||||||
module->addShl(NEW_ID, Const(State::S1, 1), y_wire, sig_y);
|
module->addShl(NEW_ID, Const(State::S1, 1), y_wire, sig_y);
|
||||||
}
|
}
|
||||||
did_something = true;
|
did_something = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue