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 version of tdpbram #472

Open
martijnbastiaan opened this issue Mar 1, 2024 · 0 comments
Open

Add Wishbone version of tdpbram #472

martijnbastiaan opened this issue Mar 1, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@martijnbastiaan
Copy link
Contributor

martijnbastiaan commented Mar 1, 2024

We have a true dual port block ram in clash-cores specific for Xilinx:

https://github.com/clash-lang/clash-compiler/blob/c3d197f4d9ecfb34799e22970b1078ffdd773c53/clash-cores/src/Clash/Cores/Xilinx/BlockRam.hs#L22-L63

We'd like to have a Wishbone Classic wrapper around that:

tdpbramWb ::
  forall nAddrs domA domB nBytes a .
  ( HasCallStack
  , KnownNat nAddrs
  , KnownDomain domA
  , KnownDomain domB
  , KnownNat nBytes
  , BitSize a ~ (8 * nBytes)
  , NFDataX a
  , BitPack a
  ) =>

  Clock domA ->
  -- | Port enable
  Enable domA ->

  Signal domA (WishboneM2S .....) ->
  Signal domB (WishboneM2S .....) ->

  ( Signal domA (WishboneS2M .....)
  , Signal domB (WishboneS2M .....)
  )

and (optionally) a circuit wrapper around that:

tdpbramWbC ::
  forall nAddrs domA domB nBytes a .
  ( HasCallStack
  , KnownNat nAddrs
  , KnownDomain domA
  , KnownDomain domB
  , KnownNat nBytes
  , BitSize a ~ (8 * nBytes)
  , NFDataX a
  , BitPack a
  ) =>

  Clock domA ->
  -- | Port enable
  Enable domA ->

  Circuit (Wishbone domA ..., Wishbone domB ...) ()

@Losiek This is a sparsely written issue; make sure to ask questions on #bittide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants