mirror of https://github.com/YosysHQ/yosys.git
Pullup/pulldown primitives
This commit is contained in:
parent
3fe2cf32dd
commit
89d56882ba
|
|
@ -753,6 +753,16 @@ bool VerificImporter::import_netlist_instance_gates(Instance *inst, RTLIL::IdStr
|
|||
return true;
|
||||
}
|
||||
|
||||
if (inst->Type() == PRIM_PULLUP) {
|
||||
module->connect(net_map_at(inst->GetOutput()), RTLIL::State::S1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (inst->Type() == PRIM_PULLDOWN) {
|
||||
module->connect(net_map_at(inst->GetOutput()), RTLIL::State::S0);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (inst->Type() == PRIM_MUX) {
|
||||
module->addMuxGate(inst_name, net_map_at(inst->GetInput1()), net_map_at(inst->GetInput2()), net_map_at(inst->GetControl()), net_map_at(inst->GetOutput()));
|
||||
return true;
|
||||
|
|
@ -889,6 +899,16 @@ bool VerificImporter::import_netlist_instance_cells(Instance *inst, RTLIL::IdStr
|
|||
return true;
|
||||
}
|
||||
|
||||
if (inst->Type() == PRIM_PULLUP) {
|
||||
module->connect(net_map_at(inst->GetOutput()), RTLIL::State::S1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (inst->Type() == PRIM_PULLDOWN) {
|
||||
module->connect(net_map_at(inst->GetOutput()), RTLIL::State::S0);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (inst->Type() == PRIM_MUX) {
|
||||
cell = module->addMux(inst_name, net_map_at(inst->GetInput1()), net_map_at(inst->GetInput2()), net_map_at(inst->GetControl()), net_map_at(inst->GetOutput()));
|
||||
import_attributes(cell->attributes, inst);
|
||||
|
|
|
|||
Loading…
Reference in New Issue