mirror of https://github.com/zachjs/sv2v.git
remove duplicate always_comb sensitivities
This commit is contained in:
parent
d30c7e7f4e
commit
380c2b978a
|
|
@ -1,3 +1,10 @@
|
|||
## Unreleased
|
||||
|
||||
### Other Enhancements
|
||||
|
||||
* `always_comb` blocks with sensitivities inherited from called functions or
|
||||
tasks are no longer converted with duplicate expressions
|
||||
|
||||
## v0.0.13
|
||||
|
||||
### New Features
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ module Convert.AlwaysKW (convert) where
|
|||
import Control.Monad (when, zipWithM, (>=>))
|
||||
import Control.Monad.State.Strict
|
||||
import Control.Monad.Writer.Strict
|
||||
import Data.List (nub)
|
||||
import Data.Maybe (fromMaybe, mapMaybe)
|
||||
import Data.Monoid (Any(Any), getAny)
|
||||
|
||||
|
|
@ -234,7 +235,7 @@ findNonLocals item = do
|
|||
_ <- scoper item
|
||||
(anys, exprs) <- lift get
|
||||
lift $ put prev
|
||||
let nonLocals = mapMaybe (longestStaticPrefix scopes) exprs
|
||||
let nonLocals = mapMaybe (longestStaticPrefix scopes) $ nub exprs
|
||||
return (getAny anys, nonLocals)
|
||||
|
||||
triggerIdent :: Identifier
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
affirm always @(never or x1 or _sv2v_0)
|
||||
affirm always @(never or x2 or _sv2v_0)
|
||||
|
|
@ -3,7 +3,7 @@ reg never;
|
|||
reg x``num, y``num, z``num; \
|
||||
function automatic t``num; \
|
||||
input inp; \
|
||||
t``num = x``num; \
|
||||
t``num = x``num + x``num; \
|
||||
endfunction \
|
||||
always``sense begin \
|
||||
y``num = 0; \
|
||||
|
|
|
|||
Loading…
Reference in New Issue