From 73d5e1204c70f39c11d9b3d4e88978dcb9ca6c39 Mon Sep 17 00:00:00 2001 From: Yehowshua Immanuel Date: Fri, 7 Mar 2025 18:41:55 -0500 Subject: [PATCH] stopping point before re-factoring decoder types --- hs/Read.hs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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