mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-22 22:03:40 +00:00
Moved some stuff to kernel/yosys.{h,cc}, using Yosys:: namespace
This commit is contained in:
parent
1202f7aa4b
commit
1cb25c05b3
41 changed files with 790 additions and 665 deletions
|
@ -122,7 +122,7 @@ static void gen_dffsr_complex(RTLIL::Module *mod, RTLIL::SigSpec sig_d, RTLIL::S
|
|||
}
|
||||
|
||||
std::stringstream sstr;
|
||||
sstr << "$procdff$" << (RTLIL::autoidx++);
|
||||
sstr << "$procdff$" << (autoidx++);
|
||||
|
||||
RTLIL::Cell *cell = mod->addCell(sstr.str(), "$dffsr");
|
||||
cell->attributes = proc->attributes;
|
||||
|
@ -144,7 +144,7 @@ static void gen_dffsr(RTLIL::Module *mod, RTLIL::SigSpec sig_in, RTLIL::SigSpec
|
|||
bool clk_polarity, bool set_polarity, RTLIL::SigSpec clk, RTLIL::SigSpec set, RTLIL::Process *proc)
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << "$procdff$" << (RTLIL::autoidx++);
|
||||
sstr << "$procdff$" << (autoidx++);
|
||||
|
||||
RTLIL::SigSpec sig_set_inv = mod->addWire(NEW_ID, sig_in.size());
|
||||
RTLIL::SigSpec sig_sr_set = mod->addWire(NEW_ID, sig_in.size());
|
||||
|
@ -191,7 +191,7 @@ static void gen_dff(RTLIL::Module *mod, RTLIL::SigSpec sig_in, RTLIL::Const val_
|
|||
bool clk_polarity, bool arst_polarity, RTLIL::SigSpec clk, RTLIL::SigSpec *arst, RTLIL::Process *proc)
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << "$procdff$" << (RTLIL::autoidx++);
|
||||
sstr << "$procdff$" << (autoidx++);
|
||||
|
||||
RTLIL::Cell *cell = mod->addCell(sstr.str(), arst ? "$adff" : "$dff");
|
||||
cell->attributes = proc->attributes;
|
||||
|
|
|
@ -57,7 +57,7 @@ static void extract_core_signal(const RTLIL::CaseRule *cs, RTLIL::SigSpec &sig)
|
|||
static RTLIL::SigSpec gen_cmp(RTLIL::Module *mod, const RTLIL::SigSpec &signal, const std::vector<RTLIL::SigSpec> &compare, RTLIL::SwitchRule *sw)
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << "$procmux$" << (RTLIL::autoidx++);
|
||||
sstr << "$procmux$" << (autoidx++);
|
||||
|
||||
RTLIL::Wire *cmp_wire = mod->addWire(sstr.str() + "_CMP", 0);
|
||||
|
||||
|
@ -127,7 +127,7 @@ static RTLIL::SigSpec gen_mux(RTLIL::Module *mod, const RTLIL::SigSpec &signal,
|
|||
log_assert(when_signal.size() == else_signal.size());
|
||||
|
||||
std::stringstream sstr;
|
||||
sstr << "$procmux$" << (RTLIL::autoidx++);
|
||||
sstr << "$procmux$" << (autoidx++);
|
||||
|
||||
// the trivial cases
|
||||
if (compare.size() == 0 || when_signal == else_signal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue