ucb-bar / chisel2-deprecated

chisel.eecs.berkeley.edu
388 stars 90 forks source link

Vec.fill appears to be badly broken #718

Closed ascenium closed 7 years ago

ascenium commented 7 years ago

Imagine our horror this weekend when we built our code with the latest version of Chisel and received a java.lang.IndexOutOfBoundsException on every one of our many dozens of Vec.fill statements. This command worked as recently as June 30. My Vec.fill commands are generally of a form similar to this example:

var i = 0 val x = Vec.fill( 32 ) { val y = zi i = i + 1 y }

...where z is a Vec 32 UInt INPUT of some kind. It appears that in this case i is getting up to 32 or perhaps higher (though 32 is where the failure happens). If you do this it compiles:

//var i = 0 val x = Vec.fill( 32 ) { // val y = zi // i = i + 1 // y Bool( false ) }

ucbjrl commented 7 years ago

@ascenium could you confirm that you're using the current master 52f7e78, or release 4b40209 ? In the meantime, we'll try to duplicate the issue.

ucbjrl commented 7 years ago

We've verified the issue and we're testing a fix.

aswaterman commented 7 years ago

Sounds like Vec.tabulate is more appropriate for your use case (not that this isn't a legitimate issue).

ascenium commented 7 years ago

Per the earlier question, we found this on the version of Chisel we downloaded fresh this morning. With regard to Vec.tabulate, I haven't seen it mentioned in the docs. I've been using Chisel for about 9 months now, so I tend to re-use what I have determined is workable syntax unless I absolutely require something new. If there is an email alert list for doc updates, I will gladly join and review.

ucbjrl commented 7 years ago

Unfortunately, in this case, Vec.tabulate would exhibit the same issue.

ucbjrl commented 7 years ago

Fixed by #721 (dedfa31)

ascenium commented 7 years ago

How do I pull the release that fixes this bug? "latest.release" doesn't cut it.

ascenium commented 7 years ago

I tried "latest.integration" as well, no joy.

ucbjrl commented 7 years ago

On Jul 21, 2016, at 5:45 PM, Robert Mykland notifications@github.com wrote:

How do I pull the release that fixes this bug? "latest.release" doesn't cut it.

We haven't published a new release with the fix. We will do so over the weekend.

In the meantime, you have two options:

ucbjrl commented 7 years ago

We've published 2.2.35. "latest.release" should now contain the fix.