diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-01-03 02:43:31 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-01-03 02:43:31 +0100 |
commit | eec2cd1e7850133302654ae8985d8ede9954a569 (patch) | |
tree | f85d3a22d219a00fca9915e2594c637419155ada /kernel | |
parent | fb2bf934dc6d2c969906b350c9a1b09a972bfdd7 (diff) | |
download | yosys-eec2cd1e7850133302654ae8985d8ede9954a569.tar.gz yosys-eec2cd1e7850133302654ae8985d8ede9954a569.tar.bz2 yosys-eec2cd1e7850133302654ae8985d8ede9954a569.zip |
Added RTLIL::SigSpec::optimized() API
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rtlil.cc | 7 | ||||
-rw-r--r-- | kernel/rtlil.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 1311f31cc..661525735 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1024,6 +1024,13 @@ void RTLIL::SigSpec::optimize() check(); } +RTLIL::SigSpec RTLIL::SigSpec::optimized() const +{ + RTLIL::SigSpec ret = *this; + ret.optimize(); + return ret; +} + bool RTLIL::SigChunk::compare(const RTLIL::SigChunk &a, const RTLIL::SigChunk &b) { if (a.wire != b.wire) { diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 8e3b78eef..504fdbbdc 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -373,6 +373,7 @@ struct RTLIL::SigSpec { SigSpec(std::vector<RTLIL::SigBit> bits); void expand(); void optimize(); + RTLIL::SigSpec optimized() const; void sort(); void sort_and_unify(); void replace(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec &with); |