mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-08 12:11:24 +00:00
Added $anyconst support to yosys-smtbmc
This commit is contained in:
parent
6f41e5277d
commit
aa25a4cec6
7 changed files with 58 additions and 2 deletions
|
@ -420,6 +420,8 @@ struct Smt2Worker
|
|||
if (cell->type == "$anyconst")
|
||||
{
|
||||
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)));
|
||||
decls.push_back(stringf("(declare-fun |%s#%d| (|%s_s|) (_ BitVec %d)) ; %s\n",
|
||||
get_id(module), idcounter, get_id(module), GetSize(cell->getPort("\\Y")), log_signal(cell->getPort("\\Y"))));
|
||||
register_bv(cell->getPort("\\Y"), idcounter++);
|
||||
|
@ -669,7 +671,7 @@ struct Smt2Worker
|
|||
string name_a = get_bool(cell->getPort("\\A"));
|
||||
string name_en = get_bool(cell->getPort("\\EN"));
|
||||
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)));
|
||||
cell->attributes.count("\\src") ? cell->attributes.at("\\src").decode_string().c_str() : get_id(cell)));
|
||||
decls.push_back(stringf("(define-fun |%s#%d| ((state |%s_s|)) Bool (or %s (not %s))) ; %s\n",
|
||||
get_id(module), idcounter, get_id(module), name_a.c_str(), name_en.c_str(), get_id(cell)));
|
||||
if (cell->type == "$assert")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue