Ibex is a small 32 bit RISC-V CPU core, previously known as zero-riscy.
Find a file
ganoam 4cb77b8121 [bitmanip] Add ZBT Instruction Group
This commits implements the Bit Manipulateion Extension ZBT instruction
group: cmix, cmov, fsr[i] and fsl. Those are instructions depend on
three ALU operands. Completeion of these instructions takes 2 clock
cycles. Additionally, the rotation shifts rol and ror are made
multicycle instructions.

All multicycle instructions take exactly two cycles to complete.

Architectural additions:

        * Multicycle Stage Register in ID stage.
                multicycle_op_stage_reg

        * Decoder generates alu_multicycle signal, to stall pipeline

        * For all ternary instructions:
                1. cycle: connect alu operands a and b to rs1 and rs2
                          respectively
                2. cycle: connect operands a and be to rs3 and rs2
                          respectively

        * Reduce the physical size of the shifter from 64 bit to 63
                bit: 32-bit operand + 1 bit for arithmetic / one-shift

        * Make rotation shifts multicycle instructions.

Instruction Details:
        * cmov:
                1. store operand a (rs1) in stage reg.
                2. return stage reg output (rs2)  or rs3.

                if rs2 != 0 the output (rs1) is already known in the
                  first cycle. -> variable latency implementation is
                  possible.

        * cmix:
                1. store rs1 & rs2 in stage reg
                2. return stage_reg_q | (rs2 & ~rs3)

                reusing bwlogic from zbb

        * rol/ror: (here: ror)
              shift_amt       = rs2 & 31;
              shift_amt_compl = (32 - shift_amt) & 31
              1. store (rs1 >> shift_amt) in stage reg
              2. return (rs1 << shift_amt_compl) | stage_reg_q

        * fsl/fsr:
        For funnel shifts, the order of applying the shift
        amount or its complement is determined by bit [5] of
        shift_amt. Pseudocode for fsr:

              shift_amt       = rs2 & 63
              shift_amt_compl = (32 - shift_amt[4:0])

              1. if (shift_amt >= 33):
                    store (rs1 >> shift_amt_compl[4:0]) in stage reg
                 else if (shift_amt <0 && shift_amt <= 31):
                    store (rs1 << shift_amt[4:0]) in stage reg
                 else if (shift_amt == 32 || shift_amt == 0):
                    store rs1 in stage reg

              2. if (shift_amt >= 33):
                    return stage_reg_q | (rs3 << shift_amt[4:0])
                 else if (shift_amt <0 && shift_amt <= 31):
                    return stage_reg_q | (rs3 >> shift_amt_compl[4:0])
                 else if (shift_amt == 32):
                    return rs3
                 else if (shift_amt == 0):
                    return rs1

Signed-off-by: ganoam <gnoam@live.com>
2020-04-16 14:03:35 +02:00
ci [ci] Fix multi-config CI 2020-04-14 15:08:00 +01:00
doc [bitmanip] Add ZBT Instruction Group 2020-04-16 14:03:35 +02:00
dv Rename ibex_icache_agent -> ibex_icache_core_agent 2020-04-15 10:52:04 +01:00
examples Switch from 'bool' to 'int' parameters in fusesoc core files 2020-04-14 15:30:26 +01:00
lint [bitmanip] Add ZBT Instruction Group 2020-04-16 14:03:35 +02:00
rtl [bitmanip] Add ZBT Instruction Group 2020-04-16 14:03:35 +02:00
shared [rtl] Modify ASSERT_KNOWN uses to work with xprop 2020-04-07 09:08:26 +01:00
syn [syn] Place result directories in sub-directory 2020-03-12 13:44:09 +00:00
util Teach check_tool_requirements to check for edalize versions 2020-04-16 09:38:38 +01:00
vendor [dv] initial icache testbench (#711) 2020-03-27 11:02:47 -07:00
.clang-format Add lowRISC standard clang-format file 2019-09-11 12:00:49 +01:00
.gitignore Ignore modelsim.ini generated from Questa tool 2020-03-13 10:58:53 +00:00
azure-pipelines.yml [ci] Mark configs using experimental features 2020-03-31 16:49:08 +01:00
check_tool_requirements.core Check for supported tool versions 2020-02-12 15:57:40 +00:00
CONTRIBUTING.md Fix vim setting suggestion 2019-06-19 14:39:41 +02:00
CREDITS.md Add Greg Chadwick to CREDITS.md 2019-10-17 11:07:05 +01:00
ibex_configs.yaml Switch from 'bool' to 'int' parameters in fusesoc core files 2020-04-14 15:30:26 +01:00
ibex_core.core Switch from 'bool' to 'int' parameters in fusesoc core files 2020-04-14 15:30:26 +01:00
ibex_core_tracing.core Switch from 'bool' to 'int' parameters in fusesoc core files 2020-04-14 15:30:26 +01:00
ibex_icache.core [dv] initial icache testbench (#711) 2020-03-27 11:02:47 -07:00
ibex_pkg.core Factor out ibex_pkg.sv into a separate core file 2020-03-27 10:44:09 +00:00
ibex_tracer.core Factor out ibex_pkg.sv into a separate core file 2020-03-27 10:44:09 +00:00
LICENSE Convert from Solderpad to standard Apache 2.0 license 2019-04-26 15:05:17 +01:00
Makefile [ci] Introduce multiple-configuration CI 2020-03-27 10:30:46 +00:00
python-requirements.txt Add Verible lint as one lint option 2020-03-16 16:54:41 +00:00
README.md [ci] Add clang-format checking to CI 2020-01-02 13:20:35 +01:00
src_files.yml Fix incdirs of src_files.yml 2020-02-03 08:33:11 +00:00
tool_requirements.py Teach check_tool_requirements to check for edalize versions 2020-04-16 09:38:38 +01:00

Build Status

Ibex RISC-V Core

Ibex is a small and efficient, 32-bit, in-order RISC-V core with a 2-stage pipeline that implements the RV32IMC instruction set architecture.

Ibex offers several configuration parameters to meet the needs of various application scenarios. The options include two different choices for the architecture of the multiplier and divider unit, as well as the possibility to drop the support for the "M" extension completely. In addition, the "E" extension can be enabled when opting for a minimum-area configuration.

This core was initially developed as part of the PULP platform under the name "Zero-riscy" [1], and has been contributed to lowRISC who maintains it and develops it further. It is under active development, with further code cleanups, feature additions, and test and verification planned for the future.

Documentation

The Ibex user manual can be read online at ReadTheDocs. It is also contained in the doc folder of this repository.

Contributing

We highly appreciate community contributions. To ease our work of reviewing your contributions, please:

  • Create your own branch to commit your changes and then open a Pull Request.
  • Split large contributions into smaller commits addressing individual changes or bug fixes. Do not mix unrelated changes into the same commit!
  • Write meaningful commit messages. For more information, please check out the contribution guide.
  • If asked to modify your changes, do fixup your commits and rebase your branch to maintain a clean history.

When contributing SystemVerilog source code, please try to be consistent and adhere to our Verilog coding style guide.

When contributing C or C++ source code, please try to adhere to the OpenTitan C++ coding style guide. All C and C++ code should be formatted with clang-format before committing. Either run clang-format -i filename.cc or git clang-format on added files.

To get started, please check out the "Good First Issue" list.

Issues and Troubleshooting

If you find any problems or issues with Ibex or the documentation, please check out the issue tracker and create a new issue if your problem is not yet tracked.

Questions?

Do not hesitate to contact us, e.g., on our public Ibex channel on Zulip!

License

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).

Credits

Many people have contributed to Ibex through the years. Please have a look at the credits file and the commit history for more information.

References

  1. Schiavone, Pasquale Davide, et al. "Slow and steady wins the race? A comparison of ultra-low-power RISC-V cores for Internet-of-Things applications." 27th International Symposium on Power and Timing Modeling, Optimization and Simulation (PATMOS 2017)