Commit graph

505 commits

Author SHA1 Message Date
Greg Chadwick
75c030b776 [rtl] Factor ID exceptions into instruction kill
Without this an instruction taking an exception will enter WB whilst
simultaneously remaining in ID. This didn't cause any known functional
issues as in the scenarios it occurred the RF write was disabled and the
WB stage eventually gets flushed. However it's still bad behaviour and
could lead to functional issues when RTL changes. It also eases the
co-simulation DV implementation.
2021-09-17 12:28:10 +01:00
Greg Chadwick
6815e7b714 [rtl] Implement mvendorid/marchid/mimpid CSRs 2021-08-31 17:39:01 +01:00
Philipp Wagner
b99da424ff [style] Indent package bodies
The style guide requires the package body to be indented with two
spaces.
2021-08-31 15:30:28 +02:00
Philipp Wagner
a25790abf9 [style] Indent module header with two spaces
Both the parameter and the port list in a module header should be
indented with two spaces, according to our style guide.
2021-08-31 15:30:28 +02:00
Philipp Wagner
87bcd13a12 [style] Use logical operators for reset 2021-08-31 15:30:28 +02:00
Philipp Wagner
be27bc8bcf [style] Fix whitespace issues around operators
Our style guide typically require a single whitespace around operators.
2021-08-31 15:30:28 +02:00
Philipp Wagner
b5011ecec6 [style] Format module instantiations in tabular format
The style guide mandates tabular format in port expressions in module
instantiations
(https://github.com/lowRISC/style-guides/blob/master/VerilogCodingStyle.md#module-instantiation).

The style guide also mandates a two-space indentation for ports and
parameters in module instantiations.

Apply the formatting produced by verible-format to match our style
guide.
2021-08-31 15:30:28 +02:00
Tom Roberts
48f11c6733 [rtl] Add bus integrity checking
Extra bits are added alongside read/write data for the instruction and
data buses to facilitate data integrity checking.

Ibex testbench extended to generate the expected bits.

All other top-levels modified to add the new signals (which are mostly
ignored).

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-08-26 16:55:26 +01:00
Greg Chadwick
3f9022a16d [rtl] Fix mtval for unaligned accesses
Previously the raw incremented address was used which is the calculated
address + 4. This is confusing as it refers to a byte that wouldn't be
accessed (e.g. a lw at 0x8000009e which faults on the access to
0x8000000a0, would report an mtval of 0x8000000a2). With this change
mtval will refer to the first byte on the other half of the word
boundary the unaligned access crosses.
2021-08-13 15:45:29 +01:00
Tom Roberts
65bf9c94f9 [rtl] Add LFSR permutation option
Random constants are sent through the hierarchy as parameters in-line
with other OpenTitan modules.

Further detail on this mechanism can be found in lowrisc/opentitan#2229

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-08-10 16:13:02 +01:00
Greg Chadwick
dbc2b6f5dc [rtl/doc] Update ePMP CSR addresses and documentation
mseccfg and mseccfgh have changed their addresses. This updates to the
newly allocated values.

The ePMP specification is now available as a versioned PDF,
documentation is updated to point to that removing the local PDF copy.
2021-08-05 08:01:56 +01:00
Tom Roberts
7c0b1ff160 [rtl] Add register slice on output of shadow core
This decouples the shadow core from any timing paths and so should ease
implementation.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-08-03 13:47:00 +01:00
Tom Roberts
4d729e20e5 [rtl] Buffer cleanup in top-level
A minor change to use the Width parameter of prim_buf. No functional
impact but stops the hierarchy from being cluttered with hundreds of
generate contexts in the top level.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-08-03 13:47:00 +01:00
Dawid Zimonczyk
d44966373e Added cast to enum 2021-07-26 09:48:41 +01:00
Tom Roberts
a1902004f9 [rtl] Add ResetAll parameter
This parameter forces a reset of all registers inside the core. This is
required to guarantee a common starting point for lockstep and thus
prevent spurious lockstep failure alerts.

Another minor change in this commit rearranges the writeback stage
multiplexing to gate incoming lsu write data when not valid. This stops
any X values from the data bus propagating to the register file
signalling (and thus to the lockstep comparison) which would cause the
lockstep alert to be X. It has the side effect of possibly reducing
power consumption in the register file.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-07-22 16:53:27 +01:00
Tom Roberts
6daae3509a [rtl] Modify fetch_en_i behavior
This signal used to be a one shot enable out of reset. We need an option
to pause execution for OpenTitan, so fetch_enable is extended to cover
that.

The signal is already driven low by the testbench at the end of test.
This is moved after the performance counter reads to ensure they can
complete.

Fixes #1105

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-06-23 09:16:27 +01:00
Tom Roberts
a8e17579e2 [rtl] Fix decode values for B Operand mux select
With data-independent timing enabled and BranchTargetALU configured,
branches will stall for a cycle causing an illegal value to be decoded
for the B Operand. No functional impact of this, but an assertion fires
so we might as well tie it off properly.

Fixes #1367

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-06-18 11:09:39 +01:00
Tom Roberts
f3b163af35 [rtl] Add reset to lockstep delayed inputs
In tests with multiple resets, these signals could hold onto spurious
values through reset (since the clock is also gated) which caused
assertion failures on resumption.

Fixes #1368

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-06-18 11:09:39 +01:00
Tom Roberts
7071b04a66 [rtl] Fix typo in MCOUNTEREN
DbgTriggerEn has no impact on whether this is an illegal csr op.

Fixes #1379

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-06-09 14:59:33 +01:00
Philipp Wagner
c7cb958f0d Update lowrisc_ip to lowRISC/opentitan@ca950b43a
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
ca950b43a0e9ef5013b8e2e5de765bc34fb59b74

Two updates to the Ibex code were required:
* Adjust the prim_secded port names to match the changes in
  OpenTitan.
* Replace `has_ral` in `ibex_icache_env_cfg.sv` and
  `ibex_icache_base_test.sv` with its newer equivalent, matching
  https://github.com/lowRISC/opentitan/pull/5932 and the additional
  updates in https://github.com/lowRISC/opentitan/pull/5951.

Upstream changes include:
* [prim_secded] Use _i/_o suffix for port names (Philipp Wagner)
* [tl,dv] Allow bits to be set in responses regardless of mask (Rupert
  Swarbrick)
* [push_pull agent] Driver code refactor (Srikrishna Iyer)
* [dv/dvsim] Group failures per test in buckets (Guillermo Maturana)
* [dv/uvmdvgen] Flag error for paths in block name (Guillermo
  Maturana)
* [prim_fifo_async] Style fixes (Philipp Wagner)
* Remove non-ASCII characters from SV code and meson.build (Rupert
  Swarbrick)
* [dv/spi_device] Fix spi_device_csr_wr_with_rand_reset timeout issue
  (Cindy Chen)
* [otp] Update to match latest foundry wrapper (Timothy Chen)
* [flash] update to match latest foundry wrapper (Timothy Chen)
* [top] Latest ast integration (Timothy Chen)
* [lint] Strengthen Verible lint check to 100-character lines (Rupert
  Swarbrick)
* [ prim ] Suppress unneeded assertion when clearing prim_packer_fifo
  (Martin Lueker-Boden)
* [dv/otp_ctrl] Add coverage exclusions (Cindy Chen)
* [dv/dvsim] Add "^Error:" as a run fail pattern. (Guillermo Maturana)
* [dvsim] Fix column bug in DV summary report (Srikrishna Iyer)
* [dvsim] Fix testplan test counts (Srikrishna Iyer)
* [dvsim] Fix lowRISC/opentitan#6061 (Srikrishna Iyer)
* [prim_clock_div] Update waiver (Michael Schaffner)
* [fpv] dvsim script error (Cindy Chen)
* [prim_otp] Update interface (Michael Schaffner)
* [dvsim] update edacloudlauncher imports (Udi Jonnalagadda)
* [dv/doc] Minor fix on dv_doc (Cindy Chen)
* [dvsim] Scheduler updates - max_parallel, max_poll (Srikrishna Iyer)
* [dvsim] Set `Deploy.job_name` more robustly (Srikrishna Iyer)
* [prim] Make SECDED prim generation deterministic (Rupert Swarbrick)
* [tool, xcel] Support dumpping the array of struct in shm/vcd (Tung
  Hoang)
* [dv/otp_ctrl] OTP_CTRL DV doc (Cindy Chen)
* [dv/dv_macros] Fix DV_PRINT_ARR_CONTENTS (Guillermo Maturana)
* [prim_pad_attr/prim_flop_en] Add waiver files (Michael Schaffner)
* [prim_usb_diff] Minor lint fix (Michael Schaffner)
* [prim_clock_div] Update waiver file (Michael Schaffner)
* [top] change prim_generic usage into prim (Timothy Chen)
* [formal/conn] Support dvsim to publish regression result summary
  (Cindy Chen)
* Add formatting changes from allow list (Rafal Kapuscik)
* [prim] Add generic and Xilinx-specific xor2 primitives (Pirmin
  Vogel)
* [prim] Add Width parameter to buffer primitives (Pirmin Vogel)
* [prim] Add generic and Xilinx-specific enable-FF primitives (Pirmin
  Vogel)
* [prim] Remove temporary workaround in parameter list related to
  primgen (Pirmin Vogel)
* [dv/dvsim] Provides more context on some failures. (Guillermo
  Maturana)
* [dvsim] Fix local run error. (Eunchan Kim)
* [dv] Support multi-ral (part 4) (Weicai Yang)
* [dv/dvsim] Adds failure bucketizer for triage. (Guillermo Maturana)
* [lint/docs] Update ascentlint dvsim command in readme (Michael
  Schaffner)
* [top] Various top level lint fixes (Timothy Chen)
* [pinmux/padring] Wire up the pad attribute WARL behavior modules
  (Michael Schaffner)
* [dv] Fix tl_error failure (Weicai Yang)
* [pinout] Update flash test mode and voltage signals/pads (Michael
  Schaffner)
* [pad_wrapper] Extend the generic and Xilinx pad wrapper models
  (Michael Schaffner)
* [dv] Update scb for all blocks (Weicai Yang)
* [dv] Support multi-ral (part 3) (Weicai Yang)
* [prim_arbiter,lint] Tell Verilator to split variables for scheduling
  (Rupert Swarbrick)
* [prim] Fix lint warnings, replace inline AscentLint waivers (Pirmin
  Vogel)
* [dvsim] Scratch root default to $REPO_TOP/scratch (Srikrishna Iyer)
* [dv] Update `process_tl_access` args for all blocks (Weicai Yang)
* [dv] Support multi-ral (part 2) (Weicai Yang)
* [formal] Clean up some formal warnings (Cindy Chen)
* [topgen] Rework pinmux datastructure and templatize tops (Michael
  Schaffner)
* [otp_ctrl] Several small lint fixes (Michael Schaffner)
* [prim_fifo_async] Make async FIFO output zero when empty (Noah
  Moroze)
* [flash] Improve flash ECC handling based on transasction attribute
  (Timothy Chen)
* [dv] Remove toggle coverage excl for a_user/d_user (Weicai Yang)
* [dvsim] Fix remaining comments  from lowRISC/opentitan#5876
  (Srikrishna Iyer)
* [dv] Support multi-ral (part 1) (Weicai Yang)

Signed-off-by: Philipp Wagner <phw@lowrisc.org>
2021-05-11 18:28:56 +01:00
Greg Chadwick
8ef06de73d [rtl] Fix lint issues 2021-04-30 10:28:30 +01:00
Rupert Swarbrick
53926b5fb9 [rtl] Break long lines in Ibex tracer
These go over the 100 character limit in our style guide (and will
cause Verible lint warnings when vendored into OpenTitan).
2021-04-22 12:30:47 +01:00
Rupert Swarbrick
5c60b094fe [rtl] Break long lines in icache
No functional change.
2021-04-21 17:03:23 +01:00
Tom Roberts
7ac218f3ae [rtl] Wire scan_rst_ni through ibex_top_tracing
Better to have the tracing top consistent with the non-tracing top.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-04-21 12:41:24 +01:00
Timothy Chen
33cca5e127 [ibex] Add reset bypass controls
Signed-off-by: Timothy Chen <timothytim@google.com>
2021-04-21 09:14:12 +01:00
Timothy Chen
6c04708303 [ibex] Fix buffer instantiations
Signed-off-by: Timothy Chen <timothytim@google.com>
2021-04-20 09:25:10 +01:00
Michael Schaffner
0e7117fbec [lockstep] Introduce optimization barrier around lockstep Ibex
Certain synthesis tools like DC are very smart at optimizing away redundant logic.
Hence, we have to insert an optimization barrier at the IOs of the lockstep Ibex.
This is achieved by manually buffering each bit using prim_buf.
Our Xilinx and DC synthesis flows make sure that these buffers cannot be optimized
away using keep attributes (Vivado) and size_only constraints (DC).

Signed-off-by: Michael Schaffner <msf@google.com>
2021-04-16 09:26:41 +01:00
Tom Roberts
07c04bc3f1 Fix a couple of synthesis bugs
1. Missing prim_assert in ibex_top.sv (more of an rtl bug but only found
in running synthesis scripts)
2. Write out the pre-mapped netlist before mapping latches

Relates to #1335

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-04-14 11:49:48 +01:00
Greg Chadwick
69e715b287 [dv] Improvements to functional coverage
This adds more instruction categories and corrects various issues in the
categorization code. Further cross coverage has been added including
illegal bins to remove bins that cannot occur.

The concept of using SVAs with cross coverage has been dropped. The
systemverilog scheduling model makes the concept unworkable.
2021-04-14 08:55:16 +01:00
Greg Chadwick
ed5f12c99e [rtl] Fix RF read enables for illegal instruction/fetch error
The read enables should only be asserted where an actual RF read will
occur. Where there is an illegal instruction or a fetch error the raw
decoder signals might still be asserted but should be squashed before
they become the true enable signals.
2021-04-12 16:08:25 +01:00
Greg Chadwick
3b578a6f9b [rtl] illegal_csr_write shouldn't factor in csr_op_en_i
csr_op_en_i signals whether or not the CSR access will actually happen,
but whether an illegal write is being can be determined with just the
address and access type. This change will improve timing and avoid
circular logic that might occur from the use of the illegal_csr_write
signal.
2021-04-12 16:08:25 +01:00
Tom Roberts
a88f5eb912 [rtl] Add dual core lockstep option
Note that the alert output is tied off for now until an option is added
to reset all registers (otherwise there will be X propagation).

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-04-07 12:07:38 +01:00
Tom Roberts
6a3200929b [rtl] Add a new top level plus wiring
This commit creates a new top level wrapping the core, register file and
icache RAMs. The tracing top level is also renamed to ibex_top_tracing
to match. This new top level is intended to enable a dual core lockstep
implementation of Ibex.

There are no functional changes in this commit, only wiring.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-04-07 12:07:38 +01:00
Tom Roberts
b106001d82 [rtl/icache] Move various parameters into the pkg
No functional change. These parameters are effectively fixed. Moving
them to the pkg eases top-level wiring of RAM signals.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-04-07 12:07:38 +01:00
Pirmin Vogel
a799a92e5e [rtl] Add SVA to ensure valid_i in compressed decoder is known
This signal is used to gate several assertions related to
unknown/invalid selector signals. We want to be sure to catch any X
values entering the compressed decoder and ultimately ID.

This is related to lowRISC/Ibex#540.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2021-04-06 18:22:55 +02:00
Greg Chadwick
357b40828f [rtl] Add MSECCFGH CSR
This is the top 32 bits of MSECCFG. It currently has no specified bits
so reads as 0 and ignores writes.
2021-03-19 10:51:49 +00:00
Greg Chadwick
d78e0d9a06 [rtl] Hard wire dcsr.stepie to 0
This indicates interrupts do not occur in single step mode.

Fixes #1279
2021-03-17 15:59:47 +00:00
Greg Chadwick
50be975226 [rtl] Fix hardware breakpoints and exceptions interaction
This change will cause the ID stage to stall if there is a potential
debug mode entry until instructions in both ID and WB have completed.
This fixes an issue with incorrect behaviour around hardware breakpoints
and exceptions that could cause exception entry to be missed, hardware
breakpoints to be triggered incorrectly or missed entirely.

In addition single step control logic is altered to work correctly with
the new debug mode entry behaviour.
2021-03-17 15:59:47 +00:00
Tom Roberts
42827fc9cd [rtl/icache] Switch ECC granularity to 32bits
Changes the ECC granularity in the data RAMs from 64bit to 32bit. This
is to align with an upcoming change in bus ECC. Relates to
lowRISC/opentitan#5450

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-03-12 17:27:52 +00:00
Tom Roberts
2c75c2b2ec Update lowrisc_ip to lowRISC/opentitan@1ae03937f
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
1ae03937f0bb4b146bb6e736bccb4821bfda556b

* [prim/fifo_async] Add assertions on pointers (Tom Roberts)
* [prim/fifo_async] Add support for Depth <= 2 (Tom Roberts)
* [prim/fifo_async] Code tidy-up (Tom Roberts)
* [top / ast] Continued ast integration (Timothy Chen)
* [dvsim] Use bash when running make underneath (Srikrishna Iyer)
* [prim] Increase maximum width for prim_util_memload to 312 (Greg
  Chadwick)
* [sram_ctrl] Fix potential back-to-back partial write bug (Michael
  Schaffner)
* [dvsim] Fix for lowRISC/opentitan#5527 (Srikrishna Iyer)
* [lint] Waive Verilator UNUSED warnings for packages (Rupert
  Swarbrick)
* [uvmdvgen] Update DV doc path and terminology (Srikrishna Iyer)
* [clkmgr] Fix dft issues (Timothy Chen)
* [util] add `dec` types to prim_secded_pkg (Udi Jonnalagadda)
* [util] minor updates to secded_gen (Udi Jonnalagadda)
* [lint] Fix a bunch of lint warnings related to long lines (>100
  chars) (Michael Schaffner)
* [dv] Update common intr_test seq (Weicai Yang)
* [util] Slight refactor of secded_gen.py (Timothy Chen)
* [tlul] Add memory transmission integrity checks (Timothy Chen)
* [dvsim] Move clean_odirs to `util.py` (Srikrishna Iyer)
* [dvsim] Split Deploy into Deploy and Launcher (Srikrishna Iyer)
* [dvsim] Add utils.TS_FORMAT* vars (Srikrishna Iyer)
* [dv/lock_reg] Update IPs to adopt the lock_reg changes (Cindy Chen)
* [dv/enable_regs] Support enable registers have more than one field
  (Cindy Chen)
* [dv/base_reg] use m_field instead of accessing field (Cindy Chen)
* [dv/sram] add SRAM scrambling model for DV (Udi Jonnalagadda)
* [dv/tools] Updated Coverage flow for xcelium (Rasmus Madsen)

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-03-12 16:15:22 +00:00
Greg Chadwick
50f09b71a9 [rtl] Fix lint issues 2021-03-11 16:10:32 +00:00
Tom Roberts
6d9e1aca8a [rtl] Minor lint fix in ibex_core.sv
Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-03-04 12:32:04 +00:00
Vladimir Rozic
5363499190 [rtl] Add MCOUNTEREN CSR
This commit adds the MCOUNTEREN CSR as required by the RISC-V spec.
The register is defined as WARL. At the moment, Ibex doesn't enable U-mode
access to the performance montiors. Consequently, writes to the register are
ignored and it reads as zero which is okay according to the spec.

This resolves lowRISC/Ibex#1278 .
2021-03-04 12:00:59 +00:00
Tom Roberts
5ef18f0b78 Update lowrisc_ip to lowRISC/opentitan@6cc5c164b
NOTE this commit includes various changes to align the Ibex repo with
changes upstream in OT!

Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
6cc5c164ba96d339f06cbcede0d17d2c96ce3c05

* [dv] Add SV_FCOV_SVA back (Srikrishna Iyer)
* [DV][FCOV] Minor updates to lowRISC/opentitan#5414 (Srikrishna Iyer)
* [dvsim] Fix --cov + --build|run-only bugs (Srikrishna Iyer)
* [lint] Waivers for rv_core_ibex lint (Greg Chadwick)
* [lint] Allow one branch in unique case (Greg Chadwick)
* [dv/macros] Add fcov macros from Ibex (Tom Roberts)
* [dvsim/verilator] Fix pre-build cmd failure when hw/foundry is
  absent (Michael Schaffner)
* [verilator/otp] Enable OTP preloading in verilator (Michael
  Schaffner)
* [dvsim] Use builtins wherever possible (Srikrishna Iyer)
* [prim] Avoid an apparent combinatorial loop in prim_secded_*_dec.sv
  (Rupert Swarbrick)
* [dv/shadow_reg] Fix aes shadow reg error (Cindy Chen)
* [lint] Remove comportable waivers from non-comportable IPs (Michael
  Schaffner)
* [dv] Fix VPD dumping (Srikrishna Iyer)
* [prim] Waive Verilator lint warning in prim_lfsr.sv (Pirmin Vogel)
* [dv] Hard code various dv connections until full hook-up (Timothy
  Chen)
* [tlul] Add payload checker and generator on device side only.
  (Timothy Chen)
* [prim_packer] Silence verilator width warnings (Rupert Swarbrick)
* [dvsim] lint fixes to FlowCfg (Srikrishna Iyer)
* [dvsim] Minor improvement to FlowCfg (Srikrishna Iyer)
* [dvsim] lint fixes to Scheduler (Srikrishna Iyer)
* [dvsim] Very small update to Timer. (Srikrishna Iyer)
* [lint] Update Verible lint parser to detect Verible syntax errors
  (Michael Schaffner)
* [lint] Spot errors in the lint flow that we weren't expecting
  (Rupert Swarbrick)
* [lint] Remove Fusesoc-related message waivers (Michael Schaffner)
* [top / rst] Adjust the way rst_ni is used in design (Timothy Chen)
* [dvsim/syn] Update parsing script and area reporting (Michael
  Schaffner)
* [dv/regwen] update REGWEN conventions (Cindy Chen)
* [dv/tools] Bug fix to common.tcl tb_top section. (Eitan Shapira)
* [dv] Fix stress_all with reset (Weicai Yang)
* [prim] Add a new slow to fast clock synchronizer (Tom Roberts)
* [prim] Minor lint fix (Tom Roberts)
* [tlul] Add instruction type to tlul (Timothy Chen)
* [top] Ast updates (Timothy Chen)
* [lint] Increase threshold for max number of bits in an array
  (Michael Schaffner)
* [dv] add dv_base_reg_pkg to env_pkg template (Udi Jonnalagadda)
* [dv/verilator] Ignore foundry dir (Srikrishna Iyer)
* [dv] Provide license diagnostic info for VCS (Srikrishna Iyer)
* [prim/otp_ctrl] Fix ECC correctable bug in generic OTP wrapper
  (Michael Schaffner)
* [prim_ram_1p_scr] Make parity and diffusion layer settings more
  flexible (Michael Schaffner)
* [prim] fix flash sram adapter use for configuration space (Timothy
  Chen)
* [dv] Make CSR fields randomizable by default. (Srikrishna Iyer)
* [dv/prim] minor updates (Udi Jonnalagadda)
* [top] Minor lint fixes (Timothy Chen)
* [prim_flash] Flash port alignments (Michael Schaffner)
* [prim_util_pkg] Fix DC warning in _clog2() (Philipp Wagner)
* Add missing full_o output signal of prim_fifo_sync (Philipp Wagner)
* [dv] Gracefully kill simulation (Srikrishna Iyer)
* [dv] Minor updates to prim tbs (Srikrishna Iyer)
* [flash / top] Minor edits based on reviews (Timothy Chen)
* [flash_ctrl / top] Various functional updates to flash (Timothy
  Chen)
* [dv/otp_ctrl] regwen sequence (Cindy Chen)
* [prim] Wire up full_o sync fifo output port in prim_sram_arbiter
  (Rupert Swarbrick)
* [dvsim] Generate FUSESOC_IGNORE at top of scratch root (Rupert
  Swarbrick)
* Revert "[lint] Remove Fusesoc-related message waivers" (Michael
  Schaffner)
* Revert "[lint] Rename tool warnings to flow warnings and reduce
  their severity" (Michael Schaffner)
* Revert "[lint] Provision syntax error filter for Verible lint"
  (Michael Schaffner)
* [prim] Update fifo behavior during reset (Timothy Chen)
* [dv] Move cip related macros to cip_macros (Weicai Yang)
* [dv/dvsim] Fix when next_item does not have dependency (Cindy Chen)
* [prim_packer_fifo/rtl] reset to disable output controls (Mark
  Branstad)
* [lint] Provision syntax error filter for Verible lint (Michael
  Schaffner)
* [lint] Rename tool warnings to flow warnings and reduce their
  severity (Michael Schaffner)
* [lint] Remove Fusesoc-related message waivers (Michael Schaffner)
* [dv/dvsim] collect coverage in scheduler (Cindy Chen)
* [dvsim] Fix Syn class (Michael Schaffner)
* [dv/shadow_reg] move get_shadow_regs function to dv_base_ral_block
  (Cindy Chen)
* [lc_ctrl] Switch ECC to standard Hamming code (Michael Schaffner)
* [prim_ram_*p_adv/prim_otp] Add option to use standard Hamming ECC
  (Michael Schaffner)
* [secded_gen] Fix template bug that results in lint error (Michael
  Schaffner)
* [prim/fifo_async] Disallow non-power-of-two depths (Tom Roberts)
* [dv/alert] update shadow_reg alert naming in DV (Cindy Chen)
* [dv] Align csr::reset_asserted to actual reset pin (Weicai Yang)
* [prim_secded*_fpv] Generate FPV testbenches (Michael Schaffner)
* [prim_secded*] Regenerate all SECDED primitives (Michael Schaffner)
* [secded_gen] Add ability to generate FPV TB's and correct Hamming
  code (Michael Schaffner)
* [dvsim] Run cov_merge / cov_report as part of the main set of jobs
  (Rupert Swarbrick)
* [dvsim] Get rid of Deploy's static dispatch_counter (Rupert
  Swarbrick)
* [dvsim] Make the scheduling logic per-target (Rupert Swarbrick)
* [dvsim] Remove "status" from Deploy items (Rupert Swarbrick)
* [dvsim] Create jobs with dependencies instead of sub-jobs (Rupert
  Swarbrick)
* [dvsim] Simplify SimCfg._gen_results (Rupert Swarbrick)
* [dvsim] Factor deploy method out of Deploy object (Rupert Swarbrick)
* [dvsim] Move time tracking into its own class in Deploy.py (Rupert
  Swarbrick)
* [dvsim] Fix printing of Deploy objects (Rupert Swarbrick)
* [dv] make dv_macros.svh more UVM_agnostic (Srikrishna Iyer)
* [dv/prim] reduce smoke test iterations (Udi Jonnalagadda)
* [dv/hmac] reduce runtime for sha_vector test in smoke regression
  (Cindy Chen)
* [DV] Enable cov comp creation iff cov is enabled (Srikrishna Iyer)
* [prim_alert] Fix xcelium compile error (Cindy Chen)
* [alert_rxtx/fpv] Update alert sender FPV testbenches (Michael
  Schaffner)
* [alert_rxtx] Add option to latch fatal alert in alert sender
  (Michael Schaffner)
* [kmac/dv] KMAC smoke test (Udi Jonnalagadda)
* [dv/str_utils_pkg] add byte_to_str function (Udi Jonnalagadda)
* [prim] - Add new prim_lc_dec (Jacob Levy)
* [util] Move design-related helper scripts to util/design (Michael
  Schaffner)
* [prim-flash] Add missing deps (Srikrishna Iyer)
* [dv] Define SIMULATION during DV sims (Michael Schaffner)
* [dv] Fix a typo in tb.sv.tpl (Weicai Yang)
* Cleanup: Remove executable bits from source files (Philipp Wagner)
* [dv] Use separate clock for EDN (Weicai Yang)
* [dv] Add macro DV_EDN_IF_CONNECT to simplify EDN connect in TB
  (Weicai Yang)
* [dv] Fix typo in clk_rst_if (Weicai Yang)

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-03-04 09:56:36 +00:00
Tom Roberts
ee8d1051bb [rtl] Add crash dump outputs
Relates to lowrisc/opentitan#4618

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-03-01 10:12:04 +00:00
Greg Chadwick
3e7720e403 [rtl] Lint fixes for Ascent lint issues 2021-03-01 09:52:57 +00:00
Greg Chadwick
c3bd4fa7ef [rtl] Remove paths between dmem and imem signals
Prior to this change Ibex had multiple feedthrough paths from the data
memory interface to the instruction memory interface. This existed
because Ibex would hold off doing a instruction fetch for a jump or
branch if there was a outstanding memory request. It would wait for the
response to be available so either the jump or branch would occur or an
exception was taken.

With this change the branch or jump will speculatively begin the
instruction fetch whilst there is an outstanding memory request. Should
an exception result from the memory request the fetch will be discarded
and the exception taken as normal.

An alternative fix would not factor the data error response
(data_err_i) directly into the controller logic for branches and jumps.
With this option new stall cycles would be introduced anywhere a branch
or jump immediately follows a memory instruction which would have an
adverse impact on performance.
2021-02-26 17:32:34 +00:00
Greg Chadwick
99b8f61223 [rtl] Debug mode controller changes
* `if` in `DBG_TAKEN_IF` is needless as the conditions it checks will be
  true if controller enters `DBG_TAKEN_IF` state

* flop `enter_debug_mode` so `FLUSH` state looks at what
  `enter_debug_mode` was when it was seen in `DECODE` state rather than
  what it has become. In particular the controller could enter `FLUSH`
  on the basis of performing a WFI then divert down the debug control
  path due to a new debug request being raised. In this instance it is
  preferable for the WFI to complete entering `SLEEP` before the debug
  request wakes the core back up.
2021-02-18 17:34:17 +00:00
Greg Chadwick
374e05ec65 [rtl] Add ePMP support to Ibex
This implemements the RISC-V Trusted Execution Environment (TEE) working
group proposal 'PMP Enhancements for memory access and execution
prevention on Machine mode'. The proposal is awaiting ratification and
is not expected to change beyond minor tweaks before it becomes part of
the RISC-V priviledged specification.

No seperate 'classic' PMP only mode is provided as different PMP
behaviour only occurs when the MSECCFG CSR is written to. This CSR is
introduced by the proposal and has no specified function in the current
RISC-V priviledged specification.
2021-02-01 12:22:49 +00:00
Rupert Swarbrick
07b65abbd0 [rtl] Fix lint "fix" with DbgTriggerEn
The previous change was wrong: it was trying to define a signal with
DbgHwNumLen bits that contained DbgHwBreakNum - 1. Unfortunately, '1
is *not* the same as a zero-extended version of 1'b1.
2021-01-22 15:26:27 +00:00