Minres / CoreDSL

Xtext project to parse CoreDSL files
Apache License 2.0
16 stars 3 forks source link

Unspecified behavior with encoding fields #67

Closed AtomCrafty closed 1 year ago

AtomCrafty commented 2 years ago

The specification currently doesn't define what happens to operand bits not covered by any encoding fields' bit range or covered by multiple overlapping ranges.

eyck commented 2 years ago

The specification should be extended by stating that unspecified bits are filled with zero.

jopperm commented 2 years ago

You mean if we have something like ... :: imm[20:10] :: ... :: imm[4:0] :: ..., then imm[9:5] = 5'b00000, right? Yeah, that makes sense.

imm[10:5] :: imm[7:3] should be an error.

I'll add that to the spec.

AtomCrafty commented 2 years ago

You mean if we have something like ... :: imm[20:10] :: ... :: imm[4:0] :: ..., then imm[9:5] = 5'b00000, right?

Yes, and that isn't even hypothetical. For example the LUI instruction's encoding only specifies the upper 20 bits.

jopperm commented 1 year ago

Diff