forked from Yehowshua/RiscV-Formal
35 lines
808 B
Haskell
35 lines
808 B
Haskell
{-# LANGUAGE DataKinds #-}
|
|
{-# LANGUAGE NumericUnderscores #-}
|
|
|
|
module Read(Read.read) where
|
|
import DecodeTypes(
|
|
Opcode(..),
|
|
|
|
RTypeFields(..), ITypeFields(..), STypeFields(..),
|
|
BTypeFields(..), UTypeFields(..), JTypeFields(..),
|
|
|
|
)
|
|
import Clash.Prelude
|
|
import Decode(DecodeResult)
|
|
-- import Types(DoubleWord, RegFileIdx, Addr)
|
|
|
|
|
|
-- data SRC = GPR RegVal
|
|
-- | FPR RegVal
|
|
-- | CSR RegVal
|
|
-- | PC Addr
|
|
-- deriving (Generic, Show, Eq, NFDataX)
|
|
|
|
-- data ReadResult = ReadResult
|
|
-- { src1 :: SRC,
|
|
-- src2 :: SRC,
|
|
-- src3 :: SRC
|
|
-- }
|
|
-- deriving (Generic, Show, Eq, NFDataX)
|
|
|
|
read = 2
|
|
|
|
-- opcodeToReadResult :: Opcode -> ReadResult
|
|
-- opcodeToReadResult (ADD (RTypeFields _ rd funct3 rs1 rs2 funct7)) = undefined
|
|
-- opcodeToReadResult _ = undefined
|