mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-08 20:21:25 +00:00
Fix generation of vlogtb output in yosys-smtbmc for "rand reg" and "rand const reg"
This commit is contained in:
parent
129984e115
commit
8f8baccfde
5 changed files with 61 additions and 4 deletions
|
@ -458,8 +458,10 @@ struct Smt2Worker
|
|||
if (cell->type.in("$anyconst", "$anyseq"))
|
||||
{
|
||||
registers.insert(cell);
|
||||
decls.push_back(stringf("; yosys-smt2-%s %s#%d %s\n", cell->type.c_str() + 1, get_id(module), idcounter,
|
||||
cell->attributes.count("\\src") ? cell->attributes.at("\\src").decode_string().c_str() : get_id(cell)));
|
||||
string infostr = cell->attributes.count("\\src") ? cell->attributes.at("\\src").decode_string().c_str() : get_id(cell);
|
||||
if (cell->attributes.count("\\reg"))
|
||||
infostr += " " + cell->attributes.at("\\reg").decode_string();
|
||||
decls.push_back(stringf("; yosys-smt2-%s %s#%d %s\n", cell->type.c_str() + 1, get_id(module), idcounter, infostr.c_str()));
|
||||
makebits(stringf("%s#%d", get_id(module), idcounter), GetSize(cell->getPort("\\Y")), log_signal(cell->getPort("\\Y")));
|
||||
register_bv(cell->getPort("\\Y"), idcounter++);
|
||||
recursive_cells.erase(cell);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue