Unique.hs 754 Bytes
Newer Older
1 2 3
{- sv2v
 - Author: Zachary Snow <zach@zachjs.com>
 -
4
 - Conversion for `unique`, `unique0`, and `priority` (verification checks)
5
 -
6 7 8
 - This conversion simply drops these keywords, as they are only used for
 - optimization and verification. There may be ways to communicate these
 - attributes to certain downstream toolchains.
9 10 11 12 13 14 15
 -}

module Convert.Unique (convert) where

import Convert.Traverse
import Language.SystemVerilog.AST

16 17
convert :: [AST] -> [AST]
convert =
18 19
    map $ traverseDescriptions $ traverseModuleItems $ traverseStmts $
        traverseNestedStmts convertStmt
20 21

convertStmt :: Stmt -> Stmt
22 23 24 25
convertStmt (If _ cc s1 s2) =
    If NoCheck cc s1 s2
convertStmt (Case _ kw expr cases) =
    Case NoCheck kw expr cases
26
convertStmt other = other