Skip to content

Add Zbs single-bit operations implementation (RV32, SystemVerilog)#191

Open
jeff-7 wants to merge 12 commits intomainfrom
zbs-implementation
Open

Add Zbs single-bit operations implementation (RV32, SystemVerilog)#191
jeff-7 wants to merge 12 commits intomainfrom
zbs-implementation

Conversation

@jeff-7
Copy link

@jeff-7 jeff-7 commented Mar 3, 2026

Implements RV32 Zbs single-bit operations:

  • bclr / bclri
  • bset / bseti
  • binv / binvi
  • bext / bexti

Design follows abstract ALU pattern:

  • Module remains purely functional
  • R/I distinction handled in decoder
  • Uses SystemVerilog style (logic, always_comb)

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

🔧 DE1-SoC Synthesis Report Summary Diff

📊 Fitter Summary (.fit.summary)

@@ -1,4 +1,4 @@
-Fitter Status : Successful - Thu Mar  5 15:07:10 2026
+Fitter Status : Successful - Fri Mar  6 06:40: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

@TheDeepestSpace TheDeepestSpace linked an issue Mar 3, 2026 that may be closed by this pull request
@TheDeepestSpace
Copy link
Member

Thanks for the PR! Let us merge #190 first, so that you can use the b_alu_control_t from it

src/ext/b/zbs.sv Outdated
Comment on lines +1 to +13
// Zbs: Single-Bit Operations (RV32)
//
// Implements:
// - bclr / bclri
// - bset / bseti
// - binv / binvi
// - bext / bexti
//
// Design note:
// - Purely combinational ALU block
// - reg2[4:0] used as bit index
// - R/I distinction handled in decoder

Copy link
Member

Choose a reason for hiding this comment

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

for the documentation here I would just specify the section of the specification that corresponds to Zbs extension

@TheDeepestSpace
Copy link
Member

Just merged #190 , please rebase onto latest main so you can use b_alu_control_t !

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 Zbs sub-extension ALU

3 participants