mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 01:54:10 +00:00
Added RTLIL::SigSpec::optimized() API
This commit is contained in:
parent
fb2bf934dc
commit
eec2cd1e78
|
@ -1024,6 +1024,13 @@ void RTLIL::SigSpec::optimize()
|
||||||
check();
|
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)
|
bool RTLIL::SigChunk::compare(const RTLIL::SigChunk &a, const RTLIL::SigChunk &b)
|
||||||
{
|
{
|
||||||
if (a.wire != b.wire) {
|
if (a.wire != b.wire) {
|
||||||
|
|
|
@ -373,6 +373,7 @@ struct RTLIL::SigSpec {
|
||||||
SigSpec(std::vector<RTLIL::SigBit> bits);
|
SigSpec(std::vector<RTLIL::SigBit> bits);
|
||||||
void expand();
|
void expand();
|
||||||
void optimize();
|
void optimize();
|
||||||
|
RTLIL::SigSpec optimized() const;
|
||||||
void sort();
|
void sort();
|
||||||
void sort_and_unify();
|
void sort_and_unify();
|
||||||
void replace(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec &with);
|
void replace(const RTLIL::SigSpec &pattern, const RTLIL::SigSpec &with);
|
||||||
|
|
Loading…
Reference in a new issue