lowRISC / lowRISC/opentitan

[cryptolib] Deduplicate the `ibex` driver

Open
#28,645 3 comments 0 reactions 1 assignee View on GitHub

@pamaury is already working on this.

Since Nov 4, 2025.

Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

There are two ibex drivers:
- [silicon_creator driver](https://github.com/lowRISC/opentitan/blob/master/sw/device/silicon_creator/lib/drivers/ibex.h)
- [cryptolib driver](https://github.com/lowRISC/opentitan/blob/master/sw/device/lib/crypto/drivers/rv_core_ibex.h)

Also the silicon_creator has a [rnd driver](https://github.com/lowRISC/opentitan/blob/master/sw/device/silicon_creator/lib/drivers/rnd.h).

The following items (at least) should be looked at:
- [ ] [`ibex_rnd32_read`](https://github.com/lowRISC/opentitan/blob/master/sw/device/lib/crypto/drivers/rv_core_ibex.h#L55): move to silicon_creator
- [ ] [`ibex_{enable,disable}_icache`](https://github.com/lowRISC/opentitan/blob/master/sw/device/lib/crypto/drivers/rv_core_ibex.h#L24): move to silicon_creator
- [ ] [`ibex_check_security_config`](https://github.com/lowRISC/opentitan/blob/master/sw/device/lib/crypto/drivers/rv_core_ibex.h#L45): keep in cryptolib
- [ ] [`ibex_clear_rf`](https://github.com/lowRISC/opentitan/blob/master/sw/device/lib/crypto/drivers/rv_core_ibex.h#L70): keep in cryptolib
- [ ] create `ibex` mock
- [ ] expand `ibex` unittest
- [ ] maybe turn [the cryptolib rv_core_ibex mock into a real mock](https://github.com/lowRISC/opentitan/blob/master/sw/device/lib/crypto/drivers/mock_rv_core_ibex.cc)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.