Skip to content

B extension decoder created with zba and preliminary zbb support#190

Draft
Parzival129 wants to merge 4 commits intomainfrom
b-extension-decoder
Draft

B extension decoder created with zba and preliminary zbb support#190
Parzival129 wants to merge 4 commits intomainfrom
b-extension-decoder

Conversation

@Parzival129
Copy link
Contributor

Created initial version of b alu decoder that uses enum types. Currently supports zba implementation and the planned implementation of zbb, however zbs is still to be implemented.

@github-actions
Copy link

github-actions bot commented Feb 25, 2026

🔧 DE1-SoC Synthesis Report Summary Diff

📊 Fitter Summary (.fit.summary)

@@ -1,4 +1,4 @@
-Fitter Status : Successful - Sun Feb 22 04:04:10 2026
+Fitter Status : Successful - Fri Feb 27 20:51:05 2026
 Quartus Prime Version : 25.1std.0 Build 1129 10/21/2025 SC Lite Edition
 Revision Name : utoss-risc-v
 Top-level Entity Name : top

⏱️ Timing Analysis Summary (.sta.summary)

No changes detected


Comparing synthesis results from main branch vs. this PR

Comment on lines +67 to +75
typedef enum logic [3:0]
{ B_ALU_CTRL__NONE = 4'b0000
, B_ALU_CTRL__SH1ADD = 4'b0001
, B_ALU_CTRL__SH2ADD = 4'b0010
, B_ALU_CTRL__SH3ADD = 4'b0011
, B_ALU_CTRL__ANDN = 4'b0100
, B_ALU_CTRL__ORN = 4'b0101
, B_ALU_CTRL__XNOR = 4'b0110
} b_alu_control_t;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should throw this into a package like we did with control fsm parameters in #149 so it does not pollute the global namespace

, .funct7(funct7)
, .opcode(opcode)
, .rd(rd)
, .b_alu_control(state) // this should be updated accordingly in the future
Copy link
Member

@TheDeepestSpace TheDeepestSpace Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can add a dummy b_alu_control variable for now

, input [6:0] funct7
, input [6:0] opcode
, input [4:0] rd
, output reg [3:0] b_alu_control
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the enum you created in types here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement basic decoding for B extension

2 participants