-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Arbitrary data bundle type for Axi4Stream #1254
Comments
Hi, Idea is that you can create it and fill it with NamedType a bit like a hash map. |
This looks interesting. So I imagine one would put this into the |
Something around that : case class MyBus(things : Seq[NamedType[_ <: Data]]) extends Bundle{
val hm = new HardMap()
things.foreach(e => hm.add(e))
}
val CTX_A = NamedType(Bool())
val CTX_B = NamedType(Bool())
val bus = MyBus(Seq(CTX_A, CTX_B)) |
Since |
How do you mean it ? (for me to understand) |
https://fars.ee/Co-Z/scala @Dolu1990 I have something like this that works quite well for my use case. But this is not the same thing as the HardMap solution you proposed since I pass in a |
To have the payload as a generic type, just like the Stream has it, i.e. |
Yes it is also a good solution, [T <: Data] ... payloadType[HardType[T]] I'm not sure what is the best between having a ArrayBuffer[NamedType] vs payloadType[HardType[T]] Maybe i'm bing too much into the HardMap thing because of composability in CPU design, which isn't the rule in general design
Ahhh i would say it would be kinda too much away from the the Axi4stream spec usage. |
@Dolu1990 I'm trying to build something else with the HardMap as the USER field; would you mind upstreaming it into SpinalHDL (from VexiiRiscv)? Thanks :) |
@KireinaHoro Pused to SpinalHDL dev branch :) |
Keep in mind, not sure what is the best overall :
I'm thinking that maybe the best is just Bits, as when you have a Axi4Stream interconnect, you realy don't care about the meaning of the data. |
I agree about the Bits option; we can probably use HardMap to wrap another layer for such a use-case. However, the current implementation enforces a Byte interface as required by the standard; allowing Bits means deviation. |
I'm trying to translate a Verilog IP for AXI DMA into a BlackBox and find that it would be nice if the
Axi4Stream
fromamba4.axis
supported arbitrary bundles asdata
, instead of only with Bits. An example looks like the following:I'm thinking of using it approximately like this:
Here
addr
,len
, andtag
together would consist of thedata
component in the Axi4StreamBundle. Is it possible that such a use-case could be supported?The text was updated successfully, but these errors were encountered: