From: Clifford Wolf Date: Fri, 19 Jun 2015 14:43:02 +0000 (+0200) Subject: Added init support to SMV back-end X-Git-Tag: yosys-0.6~243 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3123c454153f1d40a3839ffe1791de5c2d048693;p=yosys.git Added init support to SMV back-end --- diff --git a/backends/smv/smv.cc b/backends/smv/smv.cc index 9db3d3a6e..9e304daef 100644 --- a/backends/smv/smv.cc +++ b/backends/smv/smv.cc @@ -218,6 +218,9 @@ struct SmvWorker partial_assignment_wires.insert(wire); f << stringf(" %s : unsigned word[%d]; -- %s\n", cid(wire->name), wire->width, log_id(wire)); + + if (wire->attributes.count("\\init")) + assignments.push_back(stringf("init(%s) := %s;", lvalue(wire), rvalue(wire->attributes.at("\\init")))); } for (auto cell : module->cells()) @@ -483,7 +486,6 @@ struct SmvWorker if (cell->type == "$dff") { - // FIXME: use init property assignments.push_back(stringf("next(%s) := %s;", lvalue(cell->getPort("\\Q")), rvalue(cell->getPort("\\D")))); continue; }