saving progress for now
This commit is contained in:
parent
3573642131
commit
adc7511ca9
4 changed files with 79 additions and 25 deletions
|
@ -1,18 +1,31 @@
|
|||
module RTLILParser.AST(
|
||||
PublicId(..),
|
||||
AutogenId(..),
|
||||
AutoIdxStmt(..),
|
||||
Id(..),
|
||||
Value(..)
|
||||
AutoIdxStmt(..), ParamStmt(..), AutogenId(..),
|
||||
Constant(..), CellStmt(..), PublicId(..),
|
||||
AttrStmt(..), Value(..), Id(..),
|
||||
CellId(..), CellType(..), WireId(..),
|
||||
SigSpec(..)
|
||||
) where
|
||||
import Text.Read (Lexeme(Ident))
|
||||
import Data.Functor.Contravariant (Contravariant)
|
||||
import GHC.RTS.Flags (DoCostCentres(CostCentresAll))
|
||||
|
||||
data PublicId = PublicId String deriving (Show)
|
||||
data AutogenId = AutogenId String deriving (Show)
|
||||
data Id = Public PublicId
|
||||
| Autogen AutogenId
|
||||
deriving (Show)
|
||||
data WireId = WireId Id
|
||||
deriving (Show)
|
||||
data AutoIdxStmt = AutoIdxStmt Int deriving (Show)
|
||||
data AttrStmt = AttrStmt Id Constant deriving (Show)
|
||||
data CellStmt = CellStmt CellId CellType deriving (Show)
|
||||
data CellId = CellId Id deriving (Show)
|
||||
data CellType = CellType Id deriving (Show)
|
||||
data SigSpec = SigSpecConstant Constant
|
||||
| SigSpecWireId WireId
|
||||
| SigSpecSlice SigSpec Int (Maybe Int)
|
||||
| SigSpecConcat [SigSpec]
|
||||
deriving (Show)
|
||||
data Value = Value
|
||||
{ width :: Int
|
||||
, value :: Int
|
||||
|
@ -22,3 +35,8 @@ data Constant = ConstantValue Value
|
|||
| ConstantInteger Int
|
||||
| ConstantString String
|
||||
deriving (Show)
|
||||
data ParamStmt = ParamStmt
|
||||
{ paramId :: Id
|
||||
, paramConstant :: Maybe Constant
|
||||
}
|
||||
deriving (Show)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue