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
Support assignment of slices of multidimensional arrays #170
Comments
Original Redmine Comment This is a fairly easy starter project, let me know if you'd like to get started and I'll give pointers. |
Original Redmine Comment First, there's the parsing. [bit] and [vector_select] are the same in the early Then to get rid of the slice... There's non-blocking and blocking. Blocking assignments it's just an unroll. There's two schemes, using a
becomes: Skip the IF if a & b are different variables. If x/y are constants normal That seems somewhat ugly. Maybe if a&b are the same variable don't bother You'll need to do whatever algorithm recusively bottom-up in case it's For <= assignments the complicated assignment could be moved to the For <= assignments the complicated assignment could be moved to the Where to do all this... It has to be after V3Inst (assuming you want to It's probably obvious but do this on another checkout so the changes can Thanks again for your work on this and the interfaces. |
Original Redmine Comment It occurs to me that the IF scheme goes O(n^2) with the number of dimensions; so go with the temp's when needed. |
Original Redmine Comment Thanks Wilson, that was really helpful. I have this working for slices where the I'm also handling the case where you can assign one array directly to another,
This case is a bit more complicated because of the AstCond node under the
VCS doesn't build with (1) but does with (2), but to me it feels like (1) should |
Original Redmine Comment A patch to support slices is attached. There are a few unsupported features but they are detected and print a suitable error message:
|
Original Redmine Comment Great stuff!! I only have a few trivial changes; very little considering a whole new
They were minor enough, and no logical errors jumped out at me, so merged Thanks again |
Original Redmine Comment In 3.800. |
Author Name: Byron Bradley (@bbradley)
Original Redmine Issue: 170 from https://www.veripool.org
Original Date: 2009-11-03
Original Assignee: Byron Bradley (@bbradley)
Support assignment of slices of multidimensional arrays, for example:
logic [31:0] data_pipe[255:0];
data_pipe[255:1] <= data_pipe[254:0];
Testcase will be attached soon.
The text was updated successfully, but these errors were encountered: