mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Use State::S{0,1}
This commit is contained in:
parent
3486235338
commit
046e1a5214
10 changed files with 19 additions and 19 deletions
|
@ -616,8 +616,8 @@ struct BtorWorker
|
|||
if (initstate_nid < 0)
|
||||
{
|
||||
int sid = get_bv_sid(1);
|
||||
int one_nid = get_sig_nid(Const(1, 1));
|
||||
int zero_nid = get_sig_nid(Const(0, 1));
|
||||
int one_nid = get_sig_nid(State::S1);
|
||||
int zero_nid = get_sig_nid(State::S0);
|
||||
initstate_nid = next_nid++;
|
||||
btorf("%d state %d\n", initstate_nid, sid);
|
||||
btorf("%d init %d %d %d\n", next_nid++, sid, initstate_nid, one_nid);
|
||||
|
|
|
@ -122,9 +122,9 @@ struct FirrtlWorker
|
|||
// Current (3/13/2019) conventions:
|
||||
// generate a constant 0 for clock and a constant 1 for enable if they are undefined.
|
||||
if (!clk.is_fully_def())
|
||||
this->clk = SigSpec(RTLIL::Const(0, 1));
|
||||
this->clk = SigSpec(State::S0);
|
||||
if (!ena.is_fully_def())
|
||||
this->ena = SigSpec(RTLIL::Const(1, 1));
|
||||
this->ena = SigSpec(State::S1);
|
||||
}
|
||||
string gen_read(const char * indent) {
|
||||
string addr_expr = make_expr(addr);
|
||||
|
|
|
@ -380,9 +380,9 @@ void dump_attributes(std::ostream &f, std::string indent, dict<RTLIL::IdString,
|
|||
for (auto it = attributes.begin(); it != attributes.end(); ++it) {
|
||||
f << stringf("%s" "%s %s", indent.c_str(), as_comment ? "/*" : "(*", id(it->first).c_str());
|
||||
f << stringf(" = ");
|
||||
if (modattr && (it->second == Const(0, 1) || it->second == Const(0)))
|
||||
if (modattr && (it->second == State::S0 || it->second == Const(0)))
|
||||
f << stringf(" 0 ");
|
||||
else if (modattr && (it->second == Const(1, 1) || it->second == Const(1)))
|
||||
else if (modattr && (it->second == State::S1 || it->second == Const(1)))
|
||||
f << stringf(" 1 ");
|
||||
else
|
||||
dump_const(f, it->second, -1, 0, false, as_comment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue