diff --git a/bs/BusTypes.bs b/bs/BusTypes.bs index 422ed9e..d633ee6 100644 --- a/bs/BusTypes.bs +++ b/bs/BusTypes.bs @@ -49,15 +49,15 @@ data BusResponse deriving (Bits, Eq, FShow) interface BusMaster = - -- The Bus arbiter will call the Bus Client's request method - -- if and only if it's the Bus Client's turn to make a request, and the Bus Client + -- The Bus arbiter will call the Bus Master's request method + -- if and only if it's the Bus Master's turn to make a request, and the Bus Master -- has a request to make. -- 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. -- This has implications about for the implementor of BusMaster, namely, that it -- should hold its request until it's request method gets called. 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 -- should be guarded by the client. response :: BusResponse -> Action diff --git a/bs/TagEngine.bs b/bs/TagEngine.bs new file mode 100644 index 0000000..d168ed4 --- /dev/null +++ b/bs/TagEngine.bs @@ -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 \ No newline at end of file diff --git a/bs/Top.bs b/bs/Top.bs index 5efb1d4..efddd18 100644 --- a/bs/Top.bs +++ b/bs/Top.bs @@ -6,6 +6,7 @@ import Serializer import BRAM import CBindings import Bus +import TagEngine import List type FCLK = 25000000 diff --git a/bs/Util.bs b/bs/Util.bs new file mode 100644 index 0000000..1057087 --- /dev/null +++ b/bs/Util.bs @@ -0,0 +1,4 @@ +package Util((|>)) where + +(|>) :: (a -> b) -> a -> b +f |> x = f x; \ No newline at end of file