Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wishbone fifo's #36

Open
christiaanb opened this issue May 24, 2022 · 0 comments
Open

Add wishbone fifo's #36

christiaanb opened this issue May 24, 2022 · 0 comments

Comments

@christiaanb
Copy link
Member

christiaanb commented May 24, 2022

Add the following circuits:

-- | Wishbone to Df source 
-- 
-- * Writing to the given address, pushes an item onto the fifo
-- * Reading always returns zero
-- * Writing to other addresses are acknowledged, but ignored
-- * Asserts stall when the FIFO is full
wishboneSource ::
  -- | Address to respond to
  BitVector addressWidth ->
  -- | Depth of the FIFO
  SNat depth
  -- |
  (Signal dom (WishboneM2S bytes), Signal dom Ack) ->
  -- |
  (Signal dom (WisboneS2M bytes addressWidth, Signal dom (Data (BitVector (8 * bytes)))

-- | Wishbone to Df sink
--
-- * Reading from the given address, pops an item from the fifo
-- * Writes are acknowledged, but ignored
-- * Reads from any other address are acknowledged, but the fifo element is not popped.
-- * Asserts stall when the FIFO is empty
wishboneSink :: 
  -- | Address to respond to
  BitVector addressWidth ->
  -- | Depth of the FIFO
  SNat depth
  -- | 
  (Signal dom (WishboneM2S bytes), Signal dom (Data (BitVector (8 * bytes))) ->
  -- |
  (Signal dom (WisboneS2M bytes addressWidth, Signal dom Ack)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant