From 8c1ce275065ea649b06a21e0436696b256038b37 Mon Sep 17 00:00:00 2001 From: dopamane Date: Wed, 24 Jul 2024 02:13:27 -0700 Subject: [PATCH] Add `memInitV2C` cell --- lib/Bayeux/Rtl.hs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/Bayeux/Rtl.hs b/lib/Bayeux/Rtl.hs index 7e76eae..3e88c69 100644 --- a/lib/Bayeux/Rtl.hs +++ b/lib/Bayeux/Rtl.hs @@ -90,6 +90,8 @@ module Bayeux.Rtl , modFloorC , -- *** Multiplexers muxC + , -- *** Memories + memInitV2C , -- ** Processes Process(..) , ProcStmt(..) @@ -547,6 +549,29 @@ muxC cellId w a b s y = Cell ] CellEndStmt +memInitV2C + :: CellId + -> Constant -- ^ MEMID + -> Constant -- ^ ABITS + -> Constant -- ^ WIDTH + -> Constant -- ^ WORDS + -> Constant -- ^ PRIORITY + -> SigSpec -- ^ ADDR + -> SigSpec -- ^ DATA + -> Cell +memInitV2C cellId memId aBits w wrds p a d= Cell + [] + (CellStmt "$meminit_v2" cellId) + [ CellParameter Nothing "\\MEMID" memId + , CellParameter Nothing "\\ABITS" aBits + , CellParameter Nothing "\\WIDTH" w + , CellParameter Nothing "\\WORDS" wrds + , CellParameter Nothing "\\PRIORITY" p + , CellConnect "\\ADDR" a + , CellConnect "\\DATA" d + ] + CellEndStmt + data Process = Process [AttrStmt] ProcStmt ProcessBody ProcEndStmt deriving (Eq, Read, Show)