diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-02-04 14:14:26 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-02-04 14:14:26 +0100 |
commit | 3928482a3c4fb71b8e6ccdcb362c030eef34a479 (patch) | |
tree | 482ea8a72c3bae5bafc377136d10426898cb8ac5 /kernel/rtlil.cc | |
parent | 911c44d164e04026bd3a3a2eb1bf0c5d9cca5c19 (diff) | |
download | yosys-3928482a3c4fb71b8e6ccdcb362c030eef34a479.tar.gz yosys-3928482a3c4fb71b8e6ccdcb362c030eef34a479.tar.bz2 yosys-3928482a3c4fb71b8e6ccdcb362c030eef34a479.zip |
Add $cover cell type and SVA cover() support
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 365bfd9f8..978a7a537 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1026,7 +1026,7 @@ namespace { return; } - if (cell->type.in("$assert", "$assume")) { + if (cell->type.in("$assert", "$assume", "$cover")) { port("\\A", 1); port("\\EN", 1); check_expected(); @@ -1819,6 +1819,14 @@ RTLIL::Cell* RTLIL::Module::addAssume(RTLIL::IdString name, RTLIL::SigSpec sig_a return cell; } +RTLIL::Cell* RTLIL::Module::addCover(RTLIL::IdString name, RTLIL::SigSpec sig_a, RTLIL::SigSpec sig_en) +{ + RTLIL::Cell *cell = addCell(name, "$cover"); + cell->setPort("\\A", sig_a); + cell->setPort("\\EN", sig_en); + return cell; +} + RTLIL::Cell* RTLIL::Module::addEquiv(RTLIL::IdString name, RTLIL::SigSpec sig_a, RTLIL::SigSpec sig_b, RTLIL::SigSpec sig_y) { RTLIL::Cell *cell = addCell(name, "$equiv"); |