riscv-bluespec-classic/bs/Bus.bs

36 lines
822 B
Haskell

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 = do
return $ interface TestType {}
mkTestTop :: Module Empty
mkTestTop = do
testType :: TestType (UInt 5)
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