Unique.hs 724 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 18
convert :: [AST] -> [AST]
convert =
    map $ traverseDescriptions $ traverseModuleItems $ traverseStmts convertStmt
19 20

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