mirror of https://github.com/zachjs/sv2v.git
26 lines
716 B
Haskell
26 lines
716 B
Haskell
{- sv2v
|
|
- Author: Zachary Snow <zach@zachjs.com>
|
|
-
|
|
- Conversion for `unique`, `unique0`, and `priority`
|
|
-
|
|
- This conversion simply drops the keywords, as it is used only for
|
|
- optimization. There is no way to force toolchains which don't support
|
|
- the keyword to perform such optimization.
|
|
-}
|
|
|
|
module Convert.Unique (convert) where
|
|
|
|
import Convert.Traverse
|
|
import Language.SystemVerilog.AST
|
|
|
|
convert :: [AST] -> [AST]
|
|
convert =
|
|
map $ traverseDescriptions $ traverseModuleItems $ traverseStmts convertStmt
|
|
|
|
convertStmt :: Stmt -> Stmt
|
|
convertStmt (If (Just _) cc s1 s2) =
|
|
If Nothing cc s1 s2
|
|
convertStmt (Case (Just _) kw expr cases def) =
|
|
Case Nothing kw expr cases def
|
|
convertStmt other = other
|