Commit graph

232 commits

Author SHA1 Message Date
Greg Chadwick
1d4cf9b207 [dv] Add single step over exception coverpoint 2022-10-26 12:13:19 +01:00
Greg Chadwick
bfe71faf5f [dv] Remove cp_insn_trigger_exception coverpoint
This coverpoint does not make sense. The hardware breakpoint is
triggered as the instruction moves into the ID/EX stage so it never has
a chance to take an exception (it effectively never begins executing).
2022-10-26 12:13:19 +01:00
Pirmin Vogel
28935490c2 [rtl] Protect core_busy_o with a multi-bit encoding
This commit protects the core_busy_o signal using a multi-bit encoding
to reduce the chances of an adversary for glitching this signal to low,
thereby putting the core to sleep and e.g. not handling an alert.

Without this commit, the glitch would only be detected once both the
main core and the shadow core wake up again and the comparison of the
core_busy_o signals continues.

This resolves lowRISC/Ibex#1827.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2022-10-25 12:52:01 +02:00
Greg Chadwick
27907d1d4a [rtl] Immediately stop execution when fetch disabled
Previously `fetch_enable_i` only controlled the request going into the
instruction fetch stage.  Due to buffering in the prefetch queue and
icache when this request is dropped it's possible for multiple
instructions to still be available for the ID/EX stage to consume. So
when `fetch_enable_i` was set to off you would get a 'soft stop'. Some
finite number of instructions may still execute and Ibex would come to
an eventual halt.

Now `fetch_enable_i` also gates the instruction moving between the fetch
stage and the ID/EX stage. This gives a 'hard stop' where once fetch is
disabled Ibex comes to an immediate halt.
2022-10-16 17:17:15 +01:00
Greg Chadwick
298c8789da [rtl/dv] Bring back data integrity check on write responses
Previously Ibex signalled a major alert on an integrity error (where
incoming read data doesn't match its integrity bits) for both read and
write responses. This was removed as the data part of a response to a
write is ignored.

This brings it back in a more measured way. This provides a little extra
fault injection hardening as an attacker glitching the memory bus will
generate an alert on both read and write responses.
2022-10-14 18:22:58 +01:00
Marno van der Maas
08115056f9 [doc] Add NAPOT address mode to coverage plan 2022-10-10 13:46:17 +01:00
Harry Callahan
ee7854fd3a Update docs for (s/ms)context 2022-10-05 16:59:12 +01:00
Greg Chadwick
70186c57ae [rtl] Add ic_scr_key_valid field to CPUCTRL (renamed CPUCTRLSTS)
The ic_scr_key_valid field indicates whether the ICache scrambling key
is valid.

CPUCTRL is also renamed CPUCTRLSTS as it contains both control and
status bits.
2022-09-22 16:17:31 +01:00
Greg Chadwick
cd8bb4608f [doc] Bump privileged spec version to v1.12 2022-09-07 17:31:41 +01:00
Marno van der Maas
97ccca7f27 Made values of mcause 32 bits 2022-08-18 13:16:21 +01:00
Canberk Topal
dfca76f386 [dv,fcov] Implement Misaligned Mem Error coverage
Adds some signal to the load store unit to catch when we have the
fetch error signals from both first and second part of the misaligned
load/store access cases.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-07-21 01:02:15 +03:00
Marno van der Maas
3459d7f8df [lint] Remove whitespace from non-vendored source files
Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
2022-07-14 15:59:34 +01:00
Greg Chadwick
ab510f8acf [dv/doc] Tweaks/fixes to functional coverage
This fixes up some minor issues in the functional coverage plan and
implemented cover points
2022-07-11 12:10:55 +01:00
Canberk Topal
5c49fad9a2 [fcov] Adding debug related functional coverage
Includes coverpoints for:

- Hardware trigger point matches
- Debug simple step entrance in controller
- Seeing different insns while single stepping

Also updates on coverage plan to fill up missing mentions of
coverpoints/crosses

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-06-29 16:02:53 +03:00
Canberk Topal
c253bd76a9 [dv] PMP related functional coverage points
Adding MSECCFG CSR related functionality also some write checks etc.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-06-01 13:25:09 +01:00
Pirmin Vogel
e1f614887e Update spike_cosim.cc to be able to build against newer Spike versions
This works with versions ibex-cosim-v0.2 and ibex-cosim-v0.3. The latter
version is required to support the mseccfg CSR added with ePMP.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2022-06-01 00:50:49 +02:00
Canberk Topal
57d810e7fe [fcov] Implementing interrupts section of covplan
Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-05-30 15:56:05 +01:00
Canberk Topal
97a949df02 [doc] Update coverage plan to point crosses/cp's
Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-05-25 13:37:30 +01:00
nedguthrie
fe157648a6 Fix formatting if IcacheScramble Description 2022-05-20 20:29:04 +01:00
Pirmin Vogel
05f3b205c5 [doc] Add missing PKG_CONFIG_PATH now required for Ibex DV
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2022-05-13 10:33:00 +02:00
Rupert Swarbrick
42ce56b6b6 [dv] Simplify instructions for how to use Spike with cosim
This depends on Spike version ibex-cosim-v0.2 (which exposes the
various library headers with pkg-config, making configuration much
easier).
2022-04-29 11:13:21 +01:00
Harry Callahan
4db6d15def Fix dead link 2022-04-27 10:51:42 +01:00
Rupert Swarbrick
4854a131fa Remove GEN_OPTS from core_ibex Makefile
We don't actually use it anywhere and it adds some complexity. Let's
put it back in if we turn out to need it.
2022-04-14 09:40:16 +01:00
Rupert Swarbrick
ddb069bc1c [ci,docs] Bump minimum Spike version to ibex-cosim-v0.2 2022-04-12 11:09:33 +01:00
Greg Chadwick
a3b50fb694 [doc, fcov] Remove coverpoint names from unimplemented coverage 2022-04-04 13:05:55 +01:00
Greg Chadwick
fbf4b6a5b2 [doc, fcov] Tweak and add coverpoints
Moved some from 'Miscellaneous' to 'Exceptions/Interrupts/Debug' and
added some details along with a couple of new coverpoints.
2022-04-04 13:05:55 +01:00
Greg Chadwick
ead2174c1a Introduce internal interrupt concept
An internal interrupt triggers an NMI. A single one is implemented, one
on integrity errors being seen in load data. This replaces a synchronous
exception on an integrity error which caused timing issues.
2022-04-01 17:00:23 +01:00
Greg Chadwick
72acfe2fca [fcov, doc] Update coverage plan
Added coverpoint and cross names to relevant plan entries so plan is up
to date with implemented coverage. Also some minor changes to remove
plan entries that are no longer required.
2022-03-28 14:53:27 +01:00
Greg Chadwick
f44ae90040 [doc] Update coverage plan 2022-03-21 14:52:26 +00:00
Greg Chadwick
3438b77921 [rtl] Add minor alert for icache ECC error 2022-03-09 08:57:24 +00:00
Greg Chadwick
58bc6f27ab [doc] Add details about icache latency to DIT docs
When the icache is enabled and data independent timing is required
variable fetch latency due to cache hit or miss may introduce
undesirable timing behaviour. This adds explicit mention of this to the
documentation.
2022-02-23 08:48:12 +00:00
Greg Chadwick
b18eceba81 [rtl] Switch to multi-bit fetch enable
The multi-bit enable aids security hardening. For non secure Ibex all
but the bottom bit is ignored so it is effectively a single bit enable.
2022-02-21 15:35:35 +00:00
Rupert Swarbrick
3475b9106c Refer to a specific tag for the ibex-cosim version of Spike
We're going to want to make a couple more releases of Spike, cleaving
a bit closer to the upstream repository. Let's be explicit about which
version people should get.
2022-02-21 09:43:11 +00:00
Rupert Swarbrick
302bb65161 [doc] Update bitmanip list in integration.rst 2022-02-17 16:19:59 +00:00
Greg Chadwick
9943f9a42c [rtl, doc] Seperate major alert into internal and bus
This is to allow more consistent signalling in systems that integrate
Ibex (e.g. OpenTitan) so bus integrity errors external to Ibex and one's
detected within Ibex can be fed into the same alert whilst seperating
out Ibex's various internal alert causes.
2022-02-17 15:11:51 +00:00
Rupert Swarbrick
bc4bafd8ca [docs] Update description of ISS versions
We can now point at a single version of Spike (the "ibex_cosim"
branch, until we've managed to upstream things properly). And ditch
the OVPsim stuff: that's not going to be supported again any time
soon.
2022-02-16 12:26:36 +00:00
Rupert Swarbrick
4482af1789 [doc] Fix inline literal syntax in icache.rst 2022-02-02 10:19:13 +00:00
Rupert Swarbrick
4bcc0fae6a [doc] Fix botched table layout
My commit 46b7e07 moved the right-most pipe symbol, which causes
Sphinx to skip the rest of the file. Oops!
2022-02-02 10:19:13 +00:00
Rupert Swarbrick
46b7e07098 [doc] Fix RV32B enum description 2022-01-27 16:02:44 +00:00
Greg Chadwick
c0f67946f2 [rtl,doc] Add double fault detection.
Fixes #1117
2022-01-25 15:05:39 +00:00
Greg Chadwick
97fa5cf280 [rtl,doc] Add customisable PMP reset values
Fixes #1423
2022-01-24 10:01:36 +00:00
Canberk Topal
187944c417 [icache] Add RAM Primitives for scrambling
This commit includes switching to a scrambling RAM primitive for
ICache data and tag RAMs. Also introduces minor changes to ICache
to handle scrambling key valid signal.

It also includes a minor bug fix regarding not initializing
`fill_way_q` signal without ResetAll parameter. When the parameter
is not set and we have our first hit right after ICache enables,
the signal hangs.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-01-19 14:59:43 +00:00
Greg Chadwick
756610800b [doc] Fix config and expand max-width of docs 2022-01-11 12:49:04 +00:00
Greg Chadwick
596b4d7e92 [doc] Add new Ibex testplan 2022-01-11 12:49:04 +00:00
Greg Chadwick
a5c55f132e [dv] Add initial coverage plan 2022-01-06 13:47:04 +00:00
Pirmin Vogel
410ffd349d [bitmanip, doc] Update info on bitmanip support and area numbers
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2021-12-16 14:18:00 +01:00
Pirmin Vogel
16d6f5ea2b [rtl, bitmanip] Align Zbb implementation with draft v.0.93 and v.1.0.0
This invovles the following changes:
- Rename pcnt to cpop
- Switch encoding of max and minu
- Remove rev from Balanced version, only available in Full version via
  grev (Zbp)
- Include sext.b/h (previously in Zb_tmp)
- Remove slo[i] and sro[i] from Balanced version, only available in Full
  version (Zbp)

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2021-12-03 22:43:05 +01:00
Pirmin Vogel
71b43a83e2 [rtl, bitmanip] Rename bext/bdep to bcompress/bdecompress
This change is related to the bitmanip draft version 0.94. It's needed
as in draft version 0.93 as well as in version 1.00 sbext from Zbs
changes to bext, leading to two completely different instructions having
the same name.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2021-12-03 22:43:05 +01:00
Michael Schaffner
169785d071 [secded] Switch to inverted ECC codes
Signed-off-by: Michael Schaffner <msf@google.com>
2021-12-02 15:14:11 -08:00
Greg Chadwick
c3dd66e9fa [cosim] Update documentation for cosim
Also adjusts quick install instructions to use /opt/spike-cosim as
that's the path used by the pre-packaged version.
2021-11-12 09:39:38 +00:00