microsoft / cheriot-ibex

cheriot-ibex is a RTL implementation of CHERIoT ISA based on LowRISC's Ibex core.
Apache License 2.0
78 stars 15 forks source link

packu instruction not decoded as illegal when extension RV32B=RV32BBalanced #53

Open esdatmisarian opened 4 weeks ago

esdatmisarian commented 4 weeks ago

Observed Behavior

packu instruction(encoding with 32'h4822c433) is part of Zbp extension. When excluding Zbp extension RV32B= RV32BBalanced, we expected packu instruction to be flagged as illegal in decoder It is not the case from what is coded in ibex_decoder module: ... {7'b010_0100, 3'b100}, // packu {7'b000_0100, 3'b111}, // packh // RV32B zbs {7'b010_0100, 3'b001}, // bclr {7'b001_0100, 3'b001}, // bset {7'b011_0100, 3'b001}, // binv {7'b010_0100, 3'b101}, // bext // RV32B zbf {7'b010_0100, 3'b111}: illegal_insn = (RV32B != RV32BNone) ? 1'b0 : 1'b1; // bfp ...

Version of the Ibex source code:

kliuMsft commented 1 week ago

Acknowledged. @marnovandermaas, any comments?

marnovandermaas commented 1 week ago

I think this observation is correct based on the current B ISA extension. This may have been a change since B was added to Ibex, which was before the 1.0 release. We may want to fix this when we review the B-extension in Ibex in the future. @GregAC any further comments on this?