Giter Club home page Giter Club logo

Comments (5)

likewise avatar likewise commented on June 9, 2024 3

For user bits, I totally agree.

And yes, we have the problem that the current components are not spec compliant, so we either break old code or keep being incompatible with the spec.

I am not sure if there is a way to fix this. Maybe we can first change the implementation to deal with arbitrary user widths also, then change the API with new signatures?

I think the spec has higher priority and our implementation is incompliant.

(I have not used the SpinalHDL AXI Streaming components from the library for reasons like this.)

(I would even consider to allow for an arbitrary number of bits in the data width. For me it makes perfect sense to stream 12-bit video or image samples across AXI Stream.)

from spinalhdl.

likewise avatar likewise commented on June 9, 2024

The width of the TUSER (user) field can be any number of bits, according to the AMBA AXI 4 Stream specification.

Thus there is no implicit correlation between the data width and the user width.

Quoting the specification: TUSER width. Recommended number of bits is an integer multiple of the width of the interface in bytes.(https://documentation-service.arm.com/static/642583d7314e245d086bc8c9?token=)

The data width is typically specified in bytes; the specification requires this to be integer multiple of bytes.

In case we only want to allow the recommendation, the user width is a multiple integer number of bits for each byte in the data width.

Ideally though, we allow the number of user bits to be anything.

from spinalhdl.

oletf avatar oletf commented on June 9, 2024

ok so no I just got to an IP which has this :
image

So maybe it should be better to keep userWidth as bits,
keep the that.config.userWidth <= this.config.userWidth assert,
let the subdivideIn make slices being bits, and let the pairing make sure that.config.userWidth is a multiple of this.config.userWidth ?

from spinalhdl.

oletf avatar oletf commented on June 9, 2024

Thanks a lot for the clarification @likewise,
so as I get it,
the current choice has been to only allow the recommendation then.

Would an additional Boolean like userWidthIntMultiple true as default, to keep current code fully compatible,
but which could allow to opt-out of the recommendation for cases like the one in my first message (being 3:2),
be conceivable ?

from spinalhdl.

andreasWallner avatar andreasWallner commented on June 9, 2024

I'd be for allowing an arbitrary number of bits, I have seen a bunch of components that did not conform to the ARM recommendation.
If we allow something that is not an integer multiple of the data width then I don't see a reason why we'd limit it to bytes?

W.r.t. connecting: we could pre-pad with zeros in case the master is narrower then the slave, and create an error in case the master is too wide for the slave? (a user can then still manually resize if they know it's ok to throw bits away?)

The only question: how to do the change w/o breaking older code?

from spinalhdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.