This is forked repository of BitManip Extension.
- Zba, Extensions to accelerate address transalation for accessing basic array types.
- Zbb, Extnesions to perform basic bit manipulation operations like logical with negate, counting, rotate etc.
- Zbc, Extensions to perform carry-less multiplication.
- Zbs, Extensions to perform single-bit operations like bit clear, set etc.
- bbox.bsv - The top module of the design. Has the interface definition and module definition which calls the BitManip computation.
- Makefile - Has make commands to generate_verilog and simulate.
- src/ - The directory where the files which the student should edit are present here. The files present are
- compute.bsv - The top function which selects between the functions implemented for the spec depending on the instruction.
- bbox.defines - The function which has the macro definition used to select between the instructions.
- bbox_types.bsv - The structures, enum, bsc macors are defined here.
- Zba.bsv, Zbb.bsv, Zbc.bsv, Zbs.bsv - Implements the functions to perform respective bit manipulations.
- bbox_verif/ - The directory where the scripts required for running the cocotb tests are present. The files present are:
- test_bbox.py - This file consists cocotb testbench for bbox dut. For more info, check Task description provided in this file, as well as the addition of custom tests.
- bbox_ref_model.py - This file consists reference model which used in verifying the design (DUT). For more info, check Task description provided in this file.
- docs/ - The directory where the bitmanip spec pdf, instructions for Tool Setup and some FAQs are present.
Name | I/O | Size |
---|---|---|
bbox_out | O | 65/33 |
CLK | I | 1 |
RST_N | I | 1 |
instr | I | 32 |
rs1 | I | 64/32 |
rs2 | I | 64/32 |
- To just generate the verilog
$ make generate_verilog
- To simulate. NOTE: Does both generate_verilog and simulate.
$ make simulate
- To clean the build.
$ make clean_build
NOTE: Change BSCDEFINES macro in Makefile to RV64/RV32 according to use.
1. First-time run - $ make simulate
Subsequent runs - $ make clean_build
$ make simulate
2. To check waveforms, - Once simulation completes, dump.vcd is created in bbox/
$ gtkwave dump.vcd
3. GTKWave installation -
$ sudo apt update
$ sudo apt install gtkwave
- Bachotti Sai Krishna Shanmukh, EE19B009
- Implementation: Zbb (Sign-Extension), Zbs
- Verification: Zbs, Zbc, Zbb (Sign-Extension)
- Bluespec Integration
- Niranjan J Nair, EE19B046
- Implementation: Zba, Zbc
- Verification: Zba, Zbc
- Sai Gautham Ravipati, EE19B053
- Implementation: Zbb (except Sign-Extension)
- Verification: Zbb (except Sign-Extension)
- Python3 testing set-up
- The results obtained for both random and custom testcases for RV64 (55 instead of 43 as tested for different values of shamt):
- The results obtained for both random and custom testcases for RV32 (36 instead of 32 as tested for different values of shamt):