Closed edcote closed 3 years ago
Hmm... I'm wondering if overflow is provoking this. What if you limited the range (uncomment the foreach) such that overflow could still occur?
Sure enough. An overflow case. Reducing 32 to say 8 corrects the problem.
Marked closed, but would be awesome if the overflow could be reported :)
Yes. And, really, I'd consider this a bug -- at least from the perspective that the behavior is different from what a user would intuitively expect. I'm pretty sure there's a solution. Let me think about it a bit.
I've updated the width of the sum to be (elem_width + clog2(array_size-1)) to account for overflow, and confirmed that the testcase above works properly.
May or may not be an issue. Let's discuss first.
I found I needed to uncomment the block for the sum constraint to apply.