mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-08 20:21:25 +00:00
Add support for overflow using pattern detector
This commit is contained in:
parent
0932e23dff
commit
1f18736d20
2 changed files with 31 additions and 1 deletions
|
@ -264,7 +264,6 @@ match postAdd
|
|||
|
||||
select postAdd->type.in($add)
|
||||
select GetSize(port(postAdd, \Y)) <= 48
|
||||
select nusers(port(postAdd, \Y)) == 2
|
||||
choice <IdString> AB {\A, \B}
|
||||
select nusers(port(postAdd, AB)) <= 3
|
||||
filter ffMcemux || nusers(port(postAdd, AB)) == 2
|
||||
|
@ -356,6 +355,18 @@ code argQ ffC ffCcemux ffCrstmux ffCcepol ffCrstpol sigC clock
|
|||
}
|
||||
endcode
|
||||
|
||||
match overflow
|
||||
if ffP
|
||||
if dsp->parameters.at(\USE_PATTERN_DETECT, Const("NO_PATDET")).decode_string() == "NO_PATDET"
|
||||
select overflow->type.in($ge)
|
||||
select GetSize(port(overflow, \Y)) <= 48
|
||||
select port(overflow, \B).is_fully_const()
|
||||
// Check is exact power of 2
|
||||
select (port(overflow, \B).as_int() & (port(overflow, \B).as_int()-1)) == 0
|
||||
index <SigSpec> port(overflow, \A) === sigP
|
||||
optional
|
||||
endmatch
|
||||
|
||||
code
|
||||
accept;
|
||||
endcode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue