begun work on tag engine
This commit is contained in:
parent
550b3731b4
commit
a3afd66715
|
@ -49,15 +49,15 @@ data BusResponse
|
||||||
deriving (Bits, Eq, FShow)
|
deriving (Bits, Eq, FShow)
|
||||||
|
|
||||||
interface BusMaster =
|
interface BusMaster =
|
||||||
-- The Bus arbiter will call the Bus Client's request method
|
-- The Bus arbiter will call the Bus Master's request method
|
||||||
-- if and only if it's the Bus Client's turn to make a request, and the Bus Client
|
-- if and only if it's the Bus Master's turn to make a request, and the Bus Master
|
||||||
-- has a request to make.
|
-- has a request to make.
|
||||||
-- It is up to the BusMaster to guard it's request method such that calling
|
-- It is up to the BusMaster to guard it's request method such that calling
|
||||||
-- it's request method is only valid when the BusMaster has a request to make.
|
-- it's request method is only valid when the BusMaster has a request to make.
|
||||||
-- This has implications about for the implementor of BusMaster, namely, that it
|
-- This has implications about for the implementor of BusMaster, namely, that it
|
||||||
-- should hold its request until it's request method gets called.
|
-- should hold its request until it's request method gets called.
|
||||||
request :: BusRequest
|
request :: BusRequest
|
||||||
-- From the client's perspective, the response should not be called until
|
-- From the masters's perspective, the response should not be called until
|
||||||
-- the client is ready to accept the response. In other words, response
|
-- the client is ready to accept the response. In other words, response
|
||||||
-- should be guarded by the client.
|
-- should be guarded by the client.
|
||||||
response :: BusResponse -> Action
|
response :: BusResponse -> Action
|
||||||
|
|
10
bs/TagEngine.bs
Normal file
10
bs/TagEngine.bs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
package TagEngine() where
|
||||||
|
|
||||||
|
import Util
|
||||||
|
|
||||||
|
interface (TagEngine :: # -> *) numTags =
|
||||||
|
requestTag :: ActionValue (UInt (TLog numTags))
|
||||||
|
retireTag :: UInt (TLog numTags) -> Action
|
||||||
|
|
||||||
|
a :: Integer
|
||||||
|
a = 3
|
|
@ -6,6 +6,7 @@ import Serializer
|
||||||
import BRAM
|
import BRAM
|
||||||
import CBindings
|
import CBindings
|
||||||
import Bus
|
import Bus
|
||||||
|
import TagEngine
|
||||||
import List
|
import List
|
||||||
|
|
||||||
type FCLK = 25000000
|
type FCLK = 25000000
|
||||||
|
|
4
bs/Util.bs
Normal file
4
bs/Util.bs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
package Util((|>)) where
|
||||||
|
|
||||||
|
(|>) :: (a -> b) -> a -> b
|
||||||
|
f |> x = f x;
|
Loading…
Reference in a new issue