-
-
Notifications
You must be signed in to change notification settings - Fork 315
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 AvalonST basic support #791
Conversation
Cool ^^ |
Error bits are user defined so that cares the bit descriptions with the bus. Although maybe it's best not to do that for simplicity. |
} | ||
|
||
case class AvalonSTPayload(config: AvalonSTConfig) extends Bundle { | ||
val data: Bits = if (config.useData) Bits(config.dataWidth bit) else null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An shorter way is :
val data = config.useData generate Bits(config.dataWidth bits) //:)
val valid: Bool = if (config.useValid) Bool() else null | ||
val payload: AvalonSTPayload = AvalonSTPayload(config) | ||
|
||
lazy val latencyDelay: Bool = Delay(this.ready, config.readyLatency) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm lazy val in a bundle, i'm realy not sure SpinalHDL will like it.
The goal of those signals is just to cache some values if used right ? Not realy to carry them along the bundle right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this. Yeah those are internal for ready tracking. Avalon as some weird timing relationships. I can un-lazy them if you think there might be problems.
Completely forgot up to now that I was working in a Bundle. XP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi ^^
There is still some lazy val, can you un-lazy them ?
If you want, there is the "signalCache" API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally done. Let me know if I'm using signalCache right.
I think this is ready. I don't personally use Avalon streams but Intel IP prefers Avalon so I think this is a nice to have as a start. |
Good to me ^^ |
Will do. Thanks! |
Avalon Streaming has special timing requirements and allowances which make it incompatible with Spinal streams. This PR will provide a way to model and adapt Avalon-ST between IP and Spinal streams.