You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bit slicing does not support * operation. I got the following error while translation:
pymtl.tools.translation.exceptions.VerilogTranslationError:
Slicing in behavioral blocks cannot contain arbitrary arithmetic!
Variable slices must be of the form [x:x+N] or [x:x-N]!
(and N must be constant!)
Supporting this functionality would require implementing a pass that could detect the multiply (or other unsupported arithmetic operation), verify the multiplied variable is a static parameter, and hoist it out of the expression to create a new parameter on the fly. This would probably be more difficulty than its worth. (Might be a fun extra credit class compiler project though.)
In the meantime, this is probably reasonable behavior (catches the problem and throws a clear error message). I would suggest closing this as "won't fix".
Bit slicing does not support * operation. I got the following error while translation:
pymtl.tools.translation.exceptions.VerilogTranslationError:
Slicing in behavioral blocks cannot contain arbitrary arithmetic!
Variable slices must be of the form [x:x+N] or [x:x-N]!
(and N must be constant!)
The error goes away if I declare another parameter, say dbw2, and give it the value dbw*2 beforehand.
The text was updated successfully, but these errors were encountered: