Fix decompress of c.sb/c.sh
Can now run CoreMark, Hazard3 sw testcases etc using core-v compiler with Zcb enabled.
This commit is contained in:
		
							parent
							
								
									59edb2fc5f
								
							
						
					
					
						commit
						99c0660c3e
					
				|  | @ -11,7 +11,7 @@ Hazard3 is a 3-stage RISC-V processor, implementing the `RV32I` instruction set | ||||||
| * `Zbc`: carry-less multiplication | * `Zbc`: carry-less multiplication | ||||||
| * `Zbs`: single-bit manipulation | * `Zbs`: single-bit manipulation | ||||||
| * `Zbkb`: basic bit manipulation for scalar cryptography | * `Zbkb`: basic bit manipulation for scalar cryptography | ||||||
| * `Zcb`: basic additional compressed instructions *(experimental)* | * `Zcb`: basic additional compressed instructions | ||||||
| * Debug, Machine and User privilege/execution modes | * Debug, Machine and User privilege/execution modes | ||||||
| * Privileged instructions `ECALL`, `EBREAK`, `MRET` and `WFI` | * Privileged instructions `ECALL`, `EBREAK`, `MRET` and `WFI` | ||||||
| * Physical memory protection (PMP) with up to 16 naturally aligned regions | * Physical memory protection (PMP) with up to 16 naturally aligned regions | ||||||
|  |  | ||||||
|  | @ -167,11 +167,11 @@ end else begin: instr_decompress | ||||||
| 				invalid = ~|EXTENSION_ZCB; | 				invalid = ~|EXTENSION_ZCB; | ||||||
| 			end | 			end | ||||||
| 			`RVOPC_C_SB: begin | 			`RVOPC_C_SB: begin | ||||||
| 				instr_out = `RVOPC_NOZ_SB     | rfmt_rd(rd_s) | rfmt_rs1(rs1_s) | imm_c_lb; | 				instr_out = `RVOPC_NOZ_SB     | rfmt_rs2(rd_s) | rfmt_rs1(rs1_s) | imm_c_lb >> 13; | ||||||
| 				invalid = ~|EXTENSION_ZCB; | 				invalid = ~|EXTENSION_ZCB; | ||||||
| 			end | 			end | ||||||
| 			`RVOPC_C_SH: begin | 			`RVOPC_C_SH: begin | ||||||
| 				instr_out = `RVOPC_NOZ_SH     | rfmt_rd(rd_s) | rfmt_rs1(rs1_s) | imm_c_lh; | 				instr_out = `RVOPC_NOZ_SH     | rfmt_rs2(rd_s) | rfmt_rs1(rs1_s) | imm_c_lh >> 13; | ||||||
| 				invalid = ~|EXTENSION_ZCB; | 				invalid = ~|EXTENSION_ZCB; | ||||||
| 			end | 			end | ||||||
| 			`RVOPC_C_ZEXT_B: begin | 			`RVOPC_C_ZEXT_B: begin | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue