skeletons of Bus module slowly forming

This commit is contained in:
Yehowshua Immanuel 2025-04-08 23:04:30 -04:00
parent da761f6e4e
commit fe2fa21fcc
2 changed files with 17 additions and 5 deletions

View file

@ -2,11 +2,16 @@ package Bus(a) where
import Types
import BusTypes
import TagEngine
import Vector
interface (TestType :: * -> *) t = {}
-- doSomething :: t -> Action
mkTestType :: (Bits t n, Arith t, Eq t) => Module (TestType t)
mkTestType :: (
Bits t n, Arith t, Eq t
)
=> Module (TestType t)
mkTestType = do
return $ interface TestType {}
@ -16,5 +21,15 @@ mkTestTop = do
testType <- mkTestType
return $ interface Empty { }
mkBus :: Vector numClients (BusClient (UInt (TLog numClients)))
-> Vector numServers (BusServer (UInt (TLog numClients)) clientTagType)
-> Module Empty
mkBus clientVec serverVec = do
tagEngineByClient :: Vector numClients (TagEngine (TLog numClients))
tagEngineByClient <- replicateM mkTagEngine
return $ interface Empty { }
a :: UInt 5
a = 3