Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add B extension (Zba, Zbb, Zbs) #29

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

KrystalDelusion
Copy link
Member

Includes updated NERV demonstrator.

- Update `insn_shimm` and `insn_alu` to support unsigned words (`uwmode`). This
  is used when the result is of width XLEN but the lower 32 bits from one of the
  inputs (rs1) is zero-extended.
- Update `isa_propagate` to match multi-letter extensions e.g. `Zba`.
- Add Zba instructions and the beginnings of the rest of the B extension.
- Add B-type format.
- Implement (most) Zbb instructions.
- Add `insnt_count` and `insn_ext` for bit count and extension instructions.
- Be unconvinced that the count checks will work as intended.
- Be confused about `orc_b` and `rev8` instructions and leave them commented out for now.
- Add bitwise variation on R-type instruction format.
- Add `insn_bit` function for bitwise functions in Zbs extension.
- Add Zbs instructions.
Everything but `clz` `ctz` and `cpop` should work.
CLZ, CTZ, CPOP, ORC.B, and REV8.
Having the csr_spec option enables CSR testing, including the misa CSR which uses the define `RISCV_FORMAL_CSR_MISA`.  If the CSR_MISA flag is defined then instructions from extensions will check the misa CSR includes the bit flag for the instruction.  We don't want that, since NERV misa is all zeros.
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.

1 participant