mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
eliminate pmux in functional backend
This commit is contained in:
parent
c0c90c2c31
commit
13bacc5c8f
5 changed files with 9 additions and 40 deletions
|
@ -368,25 +368,6 @@ public:
|
|||
return ret;
|
||||
}
|
||||
|
||||
template<size_t ns>
|
||||
Signal<n> pmux(Signal<n*ns> const &b, Signal<ns> const &s) const
|
||||
{
|
||||
bool found;
|
||||
Signal<n> ret;
|
||||
|
||||
found = false;
|
||||
ret = *this;
|
||||
for(size_t i = 0; i < ns; i++){
|
||||
if(s._bits[i]){
|
||||
if(found)
|
||||
return 0;
|
||||
found = true;
|
||||
ret = b.template slice<n>(n * i);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<size_t m>
|
||||
Signal<n+m> concat(Signal<m> const& b) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue