IntTypes.hs 551 Bytes
Newer Older
1 2 3
{- sv2v
 - Author: Zachary Snow <zach@zachjs.com>
 -
4
 - Conversion for `bit`, `int`, `shortint`, `longint`, and `byte`
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 -}

module Convert.IntTypes (convert) where

import Convert.Traverse
import Language.SystemVerilog.AST

convert :: [AST] -> [AST]
convert =
    map $
    traverseDescriptions $
    traverseModuleItems $
    traverseTypes convertType

convertType :: Type -> Type
20
convertType (IntegerAtom kw sg) = elaborateIntegerAtom $ IntegerAtom kw sg
21
convertType (IntegerVector TBit sg rs) = IntegerVector TLogic sg rs
22
convertType other = other