The flow for a memory fetch is: 1. Cache requests data for a memory address 2. Agent spots the request, maybe signalling a PMP error 3. Grant line goes high, at which point the request is granted. 4. Sometime later (in-order pipeline), agent sends a response Occasionally, we need to pick a new seed for the backing memory. Before this patch, we picked these seeds at point (3). Unfortunately this was wrong in the following case: 1. We're switching from seed S0 to seed S1. 2. The request is spotted with seed S0 and doesn't signal a PMP error 3. The request is granted and we switch to seed S1. 4. We respond with data from memory based on S1, with no memory error either If S1 would have caused a PMP error, the resulting fetch (no error, but data from S1) doesn't match any possible seed and the scoreboard gets confused. This patch changes to picking new seeds at (2) to solve the problem. This isn't quite enough by itself, because if a request is granted on a clock-edge, a new request address might appear and there isn't a guaranteed ordering in the simulation between the new request and the old grant (both things happen at the same time). To fix this, the response sequence now maintains a queue of requests and their corresponding seeds to make sure that all the checks for a fetch are done with a single seed. The patch also gets rid of the seed state in the memory model: it turns out that this didn't really help: the scoreboard is always asking "what would I get with this seed?" and now the sequence is doing something similar. |
||
---|---|---|
ci | ||
doc | ||
dv | ||
examples | ||
lint | ||
rtl | ||
shared | ||
syn | ||
util | ||
vendor | ||
.clang-format | ||
.gitignore | ||
azure-pipelines.yml | ||
check_tool_requirements.core | ||
CONTRIBUTING.md | ||
CREDITS.md | ||
ibex_configs.yaml | ||
ibex_core.core | ||
ibex_core_tracing.core | ||
ibex_icache.core | ||
ibex_pkg.core | ||
ibex_tracer.core | ||
LICENSE | ||
Makefile | ||
python-requirements.txt | ||
README.md | ||
src_files.yml | ||
tool_requirements.py |
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.