diff --git a/hs/Read.hs b/hs/Read.hs index c4afdfc..f1f9c2f 100644 --- a/hs/Read.hs +++ b/hs/Read.hs @@ -1,6 +1,25 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE NumericUnderscores #-} -module Read(read) where +module Read(Read.read) where +import Clash.Prelude +import Types(DoubleWord, Addr) + +data RegVal = Value DoubleWord + | Borrowed + deriving (Generic, Show, Eq, NFDataX) + +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