Commit graph

130 commits

Author SHA1 Message Date
Michael Schaffner
e8783c711e [testplan] Align milestone/stage terminology
Signed-off-by: Michael Schaffner <msf@google.com>
2022-08-24 14:42:02 -07:00
Greg Chadwick
2ff233726d [dv] Add sim selection to icache make file 2022-08-18 14:51:23 +01:00
Greg Chadwick
4acc27b7ab [rtl, icache] Rework invalidation logic
This refactors the invalidation control logic into an explicit state
machine. The top-level icache_invalid_o signal is also removed.
Replaced with an explicit scramble key request instead.

This has all been done to better deal with corner cases around a new
invalidation being requested whilst another is still going on.
Previously there was a bug wher an invalidation request in the final
cycle of an ongoing invalidation didn't restart the invalidation but did
rotate the scrambling key producing an ECC failure and an alert.
2022-08-11 09:21:51 +01:00
Canberk Topal
cc55c47c37 [dv,core_ibex] Add push_pull agent for Scramble IF
This allows us to actually use Icache in our tests beecause
before this commit key_valid was tied to 0 which means everytime
we receive a FENCE.I instruction, we wouldn't be able to successfully
flag inval_done. Which means we weren't probably using ICache correctly.

Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-08-03 11:10:28 +01: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
Rupert Swarbrick
0a9f5ed1da [rtl] Remove "mispredict" ports from icache
These are no longer needed: a previous commit has moved the logic that
handles misprediction into the IF stage and branch_mispredict_i was
dead zero.
2022-04-04 16:56:04 +01:00
Prajwala Puttappa
2317bb7fc0 [icache, dv] Added ram interface and enables ecc error injection.
This commit adds ibex_icache_ram_if to connect between DUT and tag /
data RAMs.

This interface injects 1 or 2 bit error on rdata if enable_ecc_errors
bit is set. It also checks that ecc_err_o pin is asserted by DUT
whenever an ecc error is injected.

ibex_icache_ecc_vseq and ibex_icache_base_vseq have been modified to
inject ecc errors through the ram interface.
2022-03-29 16:06:44 +01:00
Prajwala Puttappa
eea478be51 [icache, dv] Removed ecc agent
This commit removes ecc agent from the testbench. Following PRs will add
changes to drive the rdata pin (input to icache) with 1 or 2 bits
flipped.
2022-03-29 16:06:44 +01:00
Prajwala Puttappa
07a49045fb [ibex, dv] Removed extra hierarchy of ic_top inside icache TB
This commit removes extra hierarchy of ic_top inside icache TB and moves
the scrambling request generation logic and instantiation of data and
tag RAMs to tb.
2022-03-18 18:32:20 +00:00
Prajwala Puttappa
6bb67e20f8 [icache, dv] Added scrambling agent to verify scrambling in RAMs
This commit adds a new scrambling agent to drive scrambling key and
valid to the data and tag memory interfaces.

Update lowrisc_ip to lowRISC/opentitan@7c4f8b3fd

Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
7c4f8b3fde4bb625ac3330ff52d3f66507190fe5

Signed-off-by: Prajwala Puttappa <prajwalaputtappa@lowrisc.org>
2022-03-18 10:33:27 +00:00
Prajwala Puttappa
9ef123f2b1 [icache, dv] Removed support for single clock cycle PMP error response
Earlier the design supported single clock cycle error responses from PMP
block whenever a read was done from blocked memory. Now there is at
least one clock cycle delay after the request has been granted for the
error to be asserted. Therefore, this commit removes the support for
single clock cycle PMP error response.
2022-03-17 18:07:16 +00:00
Prajwala Puttappa
c900ef1476 Update lowrisc_ip to lowRISC/opentitan@7c4f8b3fd
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
7c4f8b3fde4bb625ac3330ff52d3f66507190fe5

Please note that we're adding push_pull_agent for the first time in this
commit.

Signed-off-by: Prajwala Puttappa <prajwalaputtappa@lowrisc.org>
2022-03-17 18:06:56 +00:00
Prajwala Puttappa
be5fffa656 [icache, dv] Fixed regression failure in ibex_icache_back_line
There was issue with rtespect to calculating number of instructions per
word and this commit fixes that issue.

Number of instructions per word = 1/4*1 + 3/4(1/4*3/2 + 3/4*2) = 53/32.
Earlier th5s was calculated as 7/4.
Ideal window length needed to calculate fetch ratio percentage is
calculated as 53/32*C*2 = 848. Earlier it was calculated to be 300.
2022-03-17 14:57:53 +00:00
Prajwala Puttappa
0a8b4a4f61 [icache, dv] Made changes required to make TB compatible with Xcelium 2022-03-10 14:18:50 +00:00
Greg Chadwick
3438b77921 [rtl] Add minor alert for icache ECC error 2022-03-09 08:57:24 +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
Tom Roberts
72a892d62c [rtl] Move PMP checking to IF stage output
- Instruction addresses are now checked in the IF stage, after the cache
  and after the prefetch buffer.
- To deal with unaligned instructions, the PMP logic checks the current
  address and the next in parallel.
- The spec_branch timing hack has been removed as it's no longer
  relevant with the PMP logic moved.
- Various updates made to the icache testbench to account for the
  changes.
- Relates to #1471

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-12-09 18:06:53 +00:00
Tom Roberts
1bbe27effe [dv/icache] Add missing window reset call
The cache hit-rate tracking logic needs to be reset on every
invalidation.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2021-11-18 15:54:29 +00:00
Sam Shahrestani
ab4041c439 Move NT branch addr calculation to ID stage 2021-11-18 13:05:19 +00:00
Rupert Swarbrick
b66f199151 Update lowrisc_ip to lowRISC/opentitan@ad629e3e6
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
ad629e3e6e70c5eaa3c2dd68457b0a020448b35f

* [dvsim] Introduce {self_dir} as variable (Philipp Wagner)
* [dvsim] Small cleanups (Philipp Wagner)
* [prim_lfsr] Minor lint fix (Michael Schaffner)
* [dv] Update sec_cm testplan (Weicai Yang)
* [prim/lint] Move waiver to correct waiver file (Michael Schaffner)
* [prim_assert] Relocate waivers to dedicated prim_assert.waiver file
  (Michael Schaffner)
* [alert_handler] Lint fixes and waiver updates (Michael Schaffner)
* [prim_lc_receiver] Add parameter to select reset value (Michael
  Schaffner)
* [lint] Add lint waiver for IP regfiles with shadow resets (Michael
  Schaffner)
* [fpv] Fix Verible lint errors (Philipp Wagner)
* [prim_lfsr] Minor lint fixes (Timothy Chen)
* [clkmgr] Fix measurement control CDC (Timothy Chen)
* [fpv/prim_counter] Pad one bit to include overflow case (Cindy Chen)
* [fpv] Fix issue lowRISC#8371 (Zeeshan Rafique)
* [flash_ctrl] Flash ctrl security hardening (Timothy Chen)
* [dv] Fix CI error (Cindy Chen)
* [prim_alert_*] Extend SVAs for FPV (Michael Schaffner)
* [prim_alert_*] Update DV TB to respect initialization timing
  (Michael Schaffner)
* [prim_alert_rxtx_fpv] Update FPV environment and fix SVAs (Michael
  Schaffner)
* [prim_alert_sender] Update sender to support in-band reset mechanism
  (Michael Schaffner)
* [prim_alert_sender] Simplify sender and clear ping req upon sigint
  (Michael Schaffner)
* [prim_lc_sender] Add option to select reset value (Michael
  Schaffner)
* [prim] Correct assertion valid term (Timothy Chen)
* [prim_lc_combine] Align behavior of lc combine with mubi functions
  (Michael Schaffner)
* [fpv/tool] Support GUI mode on dvsim (Cindy Chen)
* [prim_lfsr] Further permutation refinements for SBox layer (Michael
  Schaffner)
* [dv/shadow_reg] Shadow register write by field (Cindy Chen)
* [prim] Fix the edge type (Eunchan Kim)
* [checklist] Updates to checklist for D2 status (Tom Roberts)
* [prim_mubi_pkg] Add a generic multibit type and associated functions
  (Michael Schaffner)
* [prim] Minor fix and clarification to prim_count (Timothy Chen)
* [keymgr/dv] Update testplan and covergroup plan (Weicai Yang)
* [prim_lc_combine] Fix parameterization error (Michael Schaffner)
* [fpv/prim_count] Small update on prim_count assertions (Cindy Chen)
* [dv] Add ip_name in reg_block (Weicai Yang)
* [keymgr] Finalize keymgr hardening (Timothy Chen)
* [prim_lc_combine] Add a prim to compute logical AND/OR for LC
  signals (Michael Schaffner)
* [dv] Remove common_cov_excl.el from unr.cfg (Weicai Yang)
* [dv/top_level] Loop through the SW test multiple times (Cindy Chen)
* [flash_ctrl] Various clean-up and updates (Timothy Chen)
* [prim] Change prim_reg_cdc assertions (Timothy Chen)
* [prim, keymgr] Migrate keymgr_cnt to prim_count (Timothy Chen)
* [sw dv] Multi-site support for Verilator (Martin Lueker-Boden)
* [dv/csr] Update write exclusion wdata value (Cindy Chen)
* [dv/dv_base_reg] remove debug display (Cindy Chen)
* [dv/shadow_reg] Fix alert shadow_reg regression error (Cindy Chen)
* [top] Integrate ast into fpga (Timothy Chen)
* [prim_lfsr] Improve statistics of non-linear output (Michael
  Schaffner)
* [prim_esc_receiver] Fix response toggling corner case (Michael
  Schaffner)
* option to use partner ast_pkg (Sharon Topaz)
* [dv/prim_esc] Double the ping timeout cycles (Cindy Chen)
* [dv] Use sed to add -elfile for each excl file (Weicai Yang)
* [dv] Fix coverage report error (Weicai Yang)
* [dv] Update common exclusion file (Weicai Yang)
* [dv/prim_esc] Improve FSM coverage (Cindy Chen)
* [reggen] Add a check to limit the swaccess type for shadow regs
  (Michael Schaffner)
* [prim_subreg_shadow] Fix for W1S/W0C corner case (Michael Schaffner)
* [prim_subreg_shadow] Disallow phase updates when storage err is
  present (Michael Schaffner)
* [dvsim] Add passing count by milestone in reports (Srikrishna Iyer)
* [dv/tool] Include toggle coverage for prim_alert_sender in
  cover_reg_top (Cindy Chen)
* [clkmgr] Harden clock manager through frequency measurements
  (Timothy Chen)
* [dv] Only enable VCS -kdb when dumping waves (Weicai Yang)
* [dv] Fix shadow reg (Weicai Yang)
* [dvsim] Allow non-integral values of --reseed-multiplier (Rupert
  Swarbrick)
* [ast] Fixes for various ast issues (Timothy Chen)
* [prim_esc_receiver] Assert escalation in case of sigint error
  (Michael Schaffner)
* [prim_esc_receiver] Minor signal renaming for consistency (Michael
  Schaffner)
* [dv/alert_handler] Support shadow register sequence (Cindy Chen)
* [verilator] Use FileSz rather than MemSz when flattening ELF files
  (Michael Munday)
* [prim_subreg_shadow] Only assert QE when committed_reg is written
  (Michael Schaffner)
* [dv,verilator] Round up SV_MEM_WIDTH_BYTES to a multiple of 4
  (Rupert Swarbrick)
* [prim] Add missing include (Pirmin Vogel)
* [dv/cover_cfg] Exclude prim_alert/esc from xcelium (Cindy Chen)
* [dv/cover_cfg] Exclude prim_alert/esc pairs (Cindy Chen)
* [clkmgr] Use local BUFHCE clock gates on FPGA (Pirmin Vogel)
* [prim_prince] Mark "leaf" functions in prince_ref.h as static inline
  (Rupert Swarbrick)
* [dv/shadow_reg] Check status after shadow_reg write (Cindy Chen)
* [dv/shadwo_reg] Shadow reg common sequence update (Cindy Chen)
* [otp_ctrl/lc_ctrl] Add 32bit OTP vendor test ctrl/status regs to LC
  TAP (Michael Schaffner)
* [otp_ctrl] Add VENDOR_TEST partition (Michael Schaffner)
* [prim] Edge Detector (Eunchan Kim)
* [prim_diff_decode] Fix asynchronous assertions (Michael Schaffner)
* [spi_device] Instantiate Upload module (Eunchan Kim)
* [dv] Add sv_flist_gen_flags HJson var for FuseSoc (Srikrishna Iyer)
* [dv, xcelium] Properly pass excl files to IMC (Srikrishna Iyer)
* [reg] Fix shadow reg update during storage error (Timothy Chen)
* [regfile] Refactor cdc handling to the reg level (Timothy Chen)
* [dv/prim_esc] Add a testplan and increase coverage (Cindy Chen)
* [dv] Update TLUL and EDN frequency (Weicai Yang)
* [rstmgr, top] Add support for shadow resets (Timothy Chen)
* [dv] Update Xcelium cover ccf (Srikrishna Iyer)
* [dv] reduce seeds for CSR tests (Weicai Yang)
* [usb/top] Remove AND gates on non-AON domain and rename 3.3V signal
  (Michael Schaffner)
* [dv/prim_alert] Improvement on prim_alert tb (Cindy Chen)
* [prim] FIFO SRAM Adapter fix (Eunchan Kim)
* [prim] Add Write Mask port (Eunchan Kim)
* [dv] Fix timescale issue with Xcelium (Weicai Yang)
* [dv/prim_esc] Fix prim_esc regression error (Cindy Chen)
* [dv/dv_base_reg] change from uvm_low to uvm_high (Cindy Chen)
* [sram_ctrl] Harden initialization counter (Michael Schaffner)
* [tools/uvmdvgen] Fix path in testplan inclusion (Guillermo Maturana)
* [dv] Change stress_all_with_rand_reset to V3 (Weicai Yang)
* [dv] fix tl error coverage (Weicai Yang)
* [dv] Add macro DV_GET_ENUM_PLUSARG (Weicai Yang)
* [prim] SRAM Async FIFO (Eunchan Kim)
* [dv, xcelium] Fix statement coverage extraction (Srikrishna Iyer)
* [dvsim] Minor fixes to coverage extraction (Srikrishna Iyer)
* [prim_lfsr] Do not shadow |state| variable (Philipp Wagner)
* [prim] Add non-linear out option to prim_lfsr (Timothy Chen)
* [dv] Constrain TLUL to 24Mhz or higher (Weicai Yang)
* [primgen] Instantiate tech libs in stable order (Philipp Wagner)
* [primgen] Actually find the Verible Python wrapper (Philipp Wagner)
* [dv/prim_esc] fix regression error (Cindy Chen)
* [dv] Fix shadow reg predict (Weicai Yang)
* [dv/common] Exclude assertion coverage from IP level testbench
  (Cindy Chen)
* [dv/prince] hit additional toggle coverpoints (Udi Jonnalagadda)
* [sram_ctrl] Update docs (Michael Schaffner)
* [sram_ctrl] Absorb prim_ram_1p_scr (Michael Schaffner)
* [dv/prim_alert/esc] Improvements for prim_alert/esc_tb (Cindy Chen)
* [dv/dvsim] Add "testfile" grading option (Guillermo Maturana)
* [dv/prim_esc] Direct test for prim_rx/tx (Cindy Chen)
* [dv/utils] added 6MHz to clk_freq_mhz_e (Dror Kabely)
* [prim_xor2/lint] Add waiver for .* use in generated prim (Michael
  Schaffner)
* [dv, doc] Replace all 'dv.plan' with testplan (Srikrishna Iyer)
* Fix the testplan link in dvsim code (Srikrishna Iyer)
* [dv/dsim] Add dsim workaround for issue 242 (Guillermo Maturana)
* [util, reggen] Support standardized cdc handling for regfile
  (Timothy Chen)
* [dv/shadow_reg] Align shadow_reg field update behavior (Cindy Chen)
* [dvsim] Fix publish report summary typo (Cindy Chen)
* [rtl/prim_alert_sender] Allow ping_req to stay high without error
  (Cindy Chen)
* [dvsim] Separate publish report from dvsim flow [PART3] (Cindy Chen)
* [dv/prim_alert] Add a testbench for prim_alert (Cindy Chen)
* [otp_ctrl] Connect test-related GPIO signal (Michael Schaffner)
* [prim_subreg_shadow] Make local parameter a localparam (Philipp
  Wagner)
* [prim_subreg] Make software access type an enum (Philipp Wagner)
* [rtl/prim_diff_decode] Add prim_flop_2sync dependency (Cindy Chen)
* [otp_ctrl] Update AscentLint waiver file (Michael Schaffner)
* [edn] Add MaxLatency assertion (Eunchan Kim)
* [prim_subreg_shadow] Correct write data signal usage (Michael
  Schaffner)
* [script/dvsim] Separate publish report from dvsim flow [PART2]
  (Cindy Chen)
* [prim_lfsr] Fix assertion issue occuring right after reset (Michael
  Schaffner)
* [dv/shadow_reg] Handle CSR automated sequence write abort (Cindy
  Chen)
* [dv/dv_lib] Add post_apply_reset for extra delay (Guillermo
  Maturana)
* [dv] Add function coverage plan for tl_errors, tl_intg_err (Weicai
  Yang)
* [dv] Remove tl_intg_err in top-level and increase seeds for
  tl_intg_err (Weicai Yang)
* [dv/shadow_reg] Fix alert shadow reg regression error (Cindy Chen)

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
2021-11-16 10:49:23 +00: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
Rupert Swarbrick
e0b477069e Update lowrisc_ip to lowRISC/opentitan@7117c349d
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
7117c349d5465b5152d3bb774079013924a3e9ba

* [dv/common] Improve coverage exclusion method (Cindy Chen)
* [prim] Waive unused parameter warnings for an FPGA-specific param
  (Rupert Swarbrick)
* [dpi] Fix indexing bug in ecc32_mem_area (Rupert Swarbrick)
* [dv, xcelium] Dump covergroup report (Srikrishna Iyer)
* [dvsim] Testplanner refactor & covergroup support (Srikrishna Iyer)
* [otp_ctrl] Workaround for generated prim depending on generated prim
  (Michael Schaffner)
* [dpi_memutil] Fix bug in RegisterMemoryArea (Rupert Swarbrick)
* [rom_ctrl/dv] Add skeleton testbench (Tom Roberts)
* [dvsim/verilator] Remove FUSESOC_IGNORE (Michael Schaffner)
* [checklists] Update all checklists for consistency (Srikrishna Iyer)
* [dv] Add integrity generation to backdoor memory loading (Greg
  Chadwick)
* [prim_secded] Add C reference models for Hsiao encode (Greg
  Chadwick)
* [rtl/prim_async_fifo] Fix async fifo typo when depth <= 2 (Cindy
  Chen)
* [dv/unr] Fix unr clk rst ports (Cindy Chen)
* [pads] - added AnalogIn1 pads for OTP supply (Arnon Sharlin)
* [dv/common] add ECC support to mem_bkdr_if (Udi Jonnalagadda)

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
2021-05-25 15:14:52 +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
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
Rupert Swarbrick
c7f44557d2 Fix initialisation in ibex_icache_env_cfg.sv 2021-04-06 12:50:03 +01:00
Rupert Swarbrick
7d61def943 Update lowrisc_ip to lowRISC/opentitan@f29a0f7a7
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
f29a0f7a7115e03fba734b1c00691c253aceb07e. The list of OpenTitan
changes that are merged in appears at the bottom of the commit.

There are some manual changes needed to adapt the code to work with
these changes.

 - The ICache monitors need some extra types to adapt to the (rather
   odd) data model that the OpenTitan dv_lib code now uses, where a
   monitor needs to know an agent's associated sequence type.

 - Verilator simulations now use MemArea slightly differently

OpenTitan changes:

* [dv] Allow monitor items to have different types from sequence items
  (Rupert Swarbrick)
* [dvsim] Fix primary_cfg handling (Srikrishna Iyer)
* [dvsim] Deal with non unicode chars in log files (Srikrishna Iyer)
* [dvsim] Added common build fail patterns (Srikrishna Iyer)
* [dvsim] Minot cleanup to the lint flow (Srikrishna Iyer)
* [dvsim] Minor cleanups to to formal flow (Srikrishna Iyer)
* [dvsim] Fixes to UNR and cov analysis flows (Srikrishna Iyer)
* [dvsim] Very minor cleanup of Deploy class (Srikrishna Iyer)
* [dvsim] LsfLauncher report early errors as F (Srikrishna Iyer)
* [dvsim] Minor fix in clean_odirs function (Srikrishna Iyer)
* [chip dv] Set +sw_images as comma-separated list (Srikrishna Iyer)
* [flash_ctrl] Split tl intefaces for flash_ctrl and prim_flash_cfg
  (Timothy Chen)
* [keymgr] Fix input value checks (Timothy Chen)
* [formal/script] Update generic formal flow naming from `fpv` to
  `formal` (Cindy Chen)
* [top, prim] Address wmask and data width mismatch issue (Timothy
  Chen)
* [dvsim] Add GUI mode for running simulations (Srikrishna Iyer)
* [dv] Fix reg backdoor (Weicai Yang)
* [dpi] Make an "ECC32" flavour of MemArea (Rupert Swarbrick)
* [uvmdvgen] Fix has_interrupts in env_cfg (Cindy Chen)
* [dvsim] Keep dependencies list (Srikrishna Iyer)
* [prim_prince] Reverse the k0||k1 mapping to match with the paper
  (Michael Schaffner)
* [dvsim] Fix printing of last 10 lines (Srikrishna Iyer)
* [primgen] Minor fix to enable types with underscores (Michael
  Schaffner)
* [dvsim] Prevent command echo suppression (Srikrishna Iyer)
* [dvsim] Spot fixes for LSF and internal launcher (Srikrishna Iyer)
* [sva] csr assertion dependency update (Cindy Chen)
* [memutil] Change DpiMemUtil so that it no longer owns MemAreas
  (Rupert Swarbrick)
* [memutil] Factor out MemArea as a class (Rupert Swarbrick)
* [prim] Split out PRESENT and PRINCE support from prim:all (Rupert
  Swarbrick)
* [fpv/otp_ctrl] Disable assertions due to lc_esc_en (Cindy Chen)
* [prim_prince] Annotate some arrays to avoid UNOPTFLAT warnings
  (Rupert Swarbrick)
* [top] Hook up latest ast ports and complete a few other integration
  (Timothy Chen)
* Eliminate `#pragma once` in favor of include guards (Chris Frantz)
* [sw,dv] Update headers to pass fix_include_guards.py (Alex Bradbury)
* [xbar/dv] Fix assertion error due to short reset (Weicai Yang)
* [sram] Add memory initialization (Timothy Chen)
* [uvmdvgen] Update links in checklist template (Philipp Wagner)
* [dv/uvmdvgen] Add comment for testplan (Cindy Chen)
* [dv/top_earlgrey] chip csr_aliasing timeout (Cindy Chen)
* [dvsim] Cosmetic updates to launcher methods (Srikrishna Iyer)
* [dv] Update csr_wr to support field write (Weicai Yang)
* [dv/common] Fix regression warnings (Cindy Chen)
* [dv] Get blocks with multiple device interfaces working with chip DV
  (Rupert Swarbrick)
* [doc] Use relative links in Hjson-related shortcodes (Philipp
  Wagner)
* [dvsim] minor enhancement to clean_odir (Srikrishna Iyer)
* [dvsim] Statically display jobs' status (Srikrishna Iyer)
* [dvsim] Do weighted scheduling of jobs (Srikrishna Iyer)
* [dvsim] Schedule jobs by dependency (Srikrishna Iyer)
* [dv] Xcelium UNR typo (Srikrishna Iyer)
* [dvsim] Implement LsfLauncher (Srikrishna Iyer)
* [dv/chip] solve same_csr_outstanding_timeout (Cindy Chen)
* [dv] make dv_base_agent work for high-level agent (Weicai Yang)
* [tools/dv] added UNR flow for xcelium (Rasmus Madsen)
* [prim] Split prim:subreg out of prim:all (Rupert Swarbrick)
* [prim] Split prim_alert_* out of prim:all (Rupert Swarbrick)
* [prim] Split out fifos into a prim_fifo core (Rupert Swarbrick)
* [prim] Split out arbiters into a prim_arbiter core (Rupert
  Swarbrick)
* [prim] Make prim:flop_2sync depend on prim:flop (Rupert Swarbrick)

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
2021-04-06 12:49:51 +01:00
Rupert Swarbrick
b04c1850b6 Avoid encumbered name in ibex_icache_testplan.hjson
With this change, we no longer use "sanity" in non-vendored code.
2021-04-05 15:38:56 +01: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
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
Rupert Swarbrick
625ea2662d Revert "Clear MAKEFLAGS when running dvsim.py"
This reverts commit 31a18ad: the problem that it was working around
was fixed in OpenTitan with commit 249a544, vendored into Ibex as
b1daf9e.
2021-01-08 08:45:56 +00:00
Tom Roberts
8db89a9dfc [rtl] Add branch prediction signals to icache
These changes correspond to similar changes in the prefetch buffer to
support branch prediction. A registered version of fill_ext_done was
required to prevent a combinational loop from branch_i in to valid_o
out.

Multiplexing priorities for fifo_addr have been swapped to match
fetch_addr_d in the same module and all similar multiplexing in the
icache (prioritize incoming branch_i over branch_mispredict_i). Note
however that it is not expected that these conditions will actually
occur together, and an assertion has been added to check that.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-12-02 15:10:48 +00:00
Rupert Swarbrick
afb21c2077 [dv] Make sure the req_i interface is never asserted in reset
Amusingly, there was also actually a bug in the combo sequence logic:
it took seq_idx to be the number of sequences that we'd run so far,
but it is actually an index that chooses which sequence we're about to
run.
2020-12-02 15:10:48 +00:00
Rupert Swarbrick
4735a2684c Avoid use of the term "sanity test" in icache UVM testbench 2020-11-28 12:12:27 +00:00
Rupert Swarbrick
4852e307b7 Update lowrisc_ip to lowRISC/opentitan@e619fc60
This updates the vendored code from OpenTitan and fixes up patches as
we go. The biggest change is that the support files that were in
dv/data have moved to dv/tools/dvsim (with a couple of other internal
renames).

The icache test code also needs the corresponding path change and to
rename its regression from "sanity" to "smoke" (the new name for the
default regression).

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

* [dv] Remove duplicated keys from common_sim_cfg.hjson (Rupert
  Swarbrick)
* [dv] two small fix in dv (Cindy Chen)
* [dv] Comment out example build modes from common_sim_cfg.hjson
  (Rupert Swarbrick)
* [dv/keymgr] Cleanup some warnings in xcelium (Weicai Yang)
* [lc_ctrl] Reuse an instance of the RISC-V dmi_jtag as the LC TAP
  (Michael Schaffner)
* [otp_ctrl] Update LC types within OTP (Michael Schaffner)
* [lc_ctrl] Add first cut implementation (Michael Schaffner)
* [flash_ctrl] update prim flash interface (Timothy Chen)
* [flash_ctrl] Add support for isolated flash partition (Timothy Chen)
* [dv/common] update naming from sanity to smoke (Cindy Chen)
* [prim] update naming from sanity to smoke (Cindy Chen)
* [dv/base] add get_reg_by_name support in dv_base_reg_block (Cindy
  Chen)
* [cov methodology] Functional coverage prototype (Srikrishna Iyer)
* [dv] Fix tpyo (Weicai Yang)
* [dv common] Wave dumping improvements / fix (Srikrishna Iyer)
* [dv] Fix for `--run-only` switch (Srikrishna Iyer)
* [prim_present] Add support for iterative full-round PRESENT (Michael
  Schaffner)
* [dv] Fix VCS compile error (Weicai Yang)
* [sparse-fsm-encode] Switch to Safe Rust Encoding (Sam Elliott)
* [sparse-fsm-encode] Disallow Complementary Encodings (Sam Elliott)
* [prim/util] Fix parameter type when using prefixes (Pirmin Vogel)
* [keymgr/prim_lfsr] Correct minor errors in core files (Michael
  Schaffner)
* [design checklist] avoid using word sanity (Cindy Chen)
* [prim_lc_sync] Add two stage sync for life cycle control signals
  (Michael Schaffner)
* [flash] update flash program to support ack / done / last (Timothy
  Chen)
* [prim] update prim flash to have ack / done support (Timothy Chen)
* Fix typo in testplan template (Rupert Swarbrick)
* [dv] Fix license header for some cfg files (Weicai Yang)
* [dv] Only check scoreboard from pre_abort if we were in run phase
  (Rupert Swarbrick)
* [doc] Add lint requirements to V1 checklist (Cindy Chen)
* [dv common] Minor enhancements to dv_reg_block (Srikrishna Iyer)
* [dv] Fix library paths for dsim (Srikrishna Iyer)
* [keymgr/dv] Update testbench (Weicai Yang)
* [dv/common] Add DV_ALERT_IF_CONNECT macro (Weicai Yang)
* [dv, common] Promote VCS warning to error (Srikrishna Iyer)
* [prim] update clock_mux prim to avoid using BUFG (Timothy Chen)
* [clkmgr] Add divider bypass during test mode (Timothy Chen)
* [opt_ctrl] Change state_q assignment to ease debugging (Michael
  Schaffner)
* [doc] Update D2 checklist and propagate updates to IPs (Michael
  Schaffner)
* [dv/dvsim] Fix -c option compile error (Cindy Chen)
* [dv] Tidy up use of get_normalized_addr (Rupert Swarbrick)
* [fpv] Fix fusesoc dependecy issue (Cindy Chen)
* [lint] Fix lint warning (Cindy Chen)
* [dv/lint] Add new DV TB to lint batch script (Cindy Chen)
* [fpv] Add lint checking to FPV tb (Cindy Chen)
* [dvsim] Remove process_exports() from the code (Srikrishna Iyer)
* [dvsim] Fix HJson bugs (Srikrishna Iyer)
* [fpv] alert_rx/tx updates (Cindy Chen)
* [prim] slicer lint fix (Eunchan Kim)
* [prim] Packer to remove unused parameter. (Eunchan Kim)
* [prim_lfsr] Update prim_lfsr and testbench to use correct perm width
  (Michael Schaffner)
* [prim_lfsr] Add script to generate seed and perm constants (Michael
  Schaffner)
* [dv/common] Upgrade some VCS warnings to errors (Weicai Yang)
* [dvsim] Document and slightly improve subst_wildcards in utils.py
  (Rupert Swarbrick)
* [csrng/dv] Initial dv environment (Steve Nelson)
* [sparse-fsm-encode] Update template to prevent JG compile error
  (Michael Schaffner)
* Gracefully shut down Verilator when software test fails (Philipp
  Wagner)
* [otp] fix FPV compile error (Cindy Chen)
* [dvsim] Kill subprocesses more gracefully (Rupert Swarbrick)
* [prim] Fix Verilator lint warnings (Pirmin Vogel)
* [memutil] Allocate the right number of bytes in StagedMem::GetFlat()
  (Rupert Swarbrick)
* [memutil] Load ELF files via a staging area (Rupert Swarbrick)
* [memutil] Add iterator and merging insertion interfaces to RangedMap
  (Rupert Swarbrick)
* [memutil] Factor out "ranged map" implementation from dpi_memutil
  (Rupert Swarbrick)
* [alert_handler] update alert hander ports (Timothy Chen)
* [otp_ctrl] Update OTP output data mapping (Michael Schaffner)
* [otp_ctrl] Split partition metadata into separate package (Michael
  Schaffner)
* [prim_otp] Add TL-UL regfile for testing (sim only) (Michael
  Schaffner)
* [memutil] Split out the non-verilator part of verilator_memutil
  (Rupert Swarbrick)
* [dv/common] Update DV_CHECK_* macros (Weicai Yang)
* [dv/common] Fix testplan path (Weicai Yang)
* [prim_assert] Fixed non-UVM part of `ASSERT_ERROR (Srikrishna Iyer)
* [otp_ctrl] Simplify and consolidate OTP error codes (Michael
  Schaffner)
* [kmac] Fix critical syntax errors. (Eunchan Kim)
* [dv/common] Move testplan from tools directory to data (Weicai Yang)
* [dvsim] Rename verbosity wildcards to something more informative
  (Rupert Swarbrick)
* [dv/lfsr] Update prim_lfsr_sim_cfg.hjson and add coverage (Udi
  Jonnalagadda)
* [dv common] Added string check macros (Srikrishna Iyer)
* [rtl] Use platform-agnostic log macros prim_assert (Srikrishna Iyer)
* [dv] Minor fixups to dv_Utils_pkg (Srikrishna Iyer)
* [dv] Fix platform-agnostic log macros (Srikrishna Iyer)
* [checklist] Upgrade wording for D1 milestone (Scott Johnson)
* [entropy_src/rtl] fix for dv sanity test (Mark Branstad)
* [lint] Add option to bail out on first invalid Tcl cmd (Michael
  Schaffner)
* [sram_ctrl] Add first cut implementation (Michael Schaffner)
* [prim] Fix AscentLint waiver that made the tool crash (Michael
  Schaffner)
* [checklists] Clean up and align HW and SW checklists (Michael
  Schaffner)
* [prim] Update signal name in lint waiver rule (Pirmin Vogel)
* [flash_ctrl] Switch to new keyschedule in PRINCE (Michael Schaffner)
* [lint] fix the waiver format (Eunchan Kim)
* [dv] Waive lint warnings in dv_macros.svh (Srikrishna Iyer)
* [dv common] Add platform-agnostic log macros (Srikrishna Iyer)
* [util] Add Rust Enum Support to sparse-fsm-encode.py (Sam Elliott)
* [util] Add C Enum Support to sparse-fsm-encode.py (Sam Elliott)
* [sparse-fsm-encode] Expand error and help messages (Michael
  Schaffner)
* [dv/common] TLUL agent function coverage (Weicai Yang)
* [dv/shadow_reg] support alert handshake checking (Cindy Chen)
* [prim_present/otp_ctrl] Add round index state IOs to primitive
  (Michael Schaffner)
* [dv] Fix 2 regression failures (Weicai Yang)
* [prim_multibit_sync] Add multibit synchronizer with consistency
  check (Michael Schaffner)
* [prim] Fix Lint warning for prim_slicer (Eunchan Kim)
* [prim_generic_otp] Add TL-UL test interface stub for DV (Michael
  Schaffner)
* [doc] Improve documentation for common_ifs (Rupert Swarbrick)
* [doc] Improve pins_if block diagram (Rupert Swarbrick)
* [prim_prince/present] Remove TODOs (Michael Schaffner)
* [dv/common] Change TL item content when it's not accepted (Weicai
  Yang)
* [dv/uvmgen] update has_alerts (Cindy Chen)
* [dv/common] Add run opt plusarg to enable file path in the log
  (Weicai Yang)
* [prim] Add clock buffer primitive for Xilinx FPGAs (Pirmin Vogel)
* [otp_ctrl] Provision power sequencing signals (Michael Schaffner)
* [dv/common] Clean up old makefile flow (Weicai Yang)
* [entropy_src/rtl] review round2 changes (Mark Branstad)
* [otp_ctrl] Update all FSMs to use prim_flop for the state (Michael
  Schaffner)
* [prim_xilinx_flop] Add a Xilinx version with keep attribute (Michael
  Schaffner)
* [prim/util] Update sparse-fsm-encode and include FSM template
  (Michael Schaffner)
* [DV  macros] minor enhancement to `DV_SPINWAIT (Srikrishna Iyer)
* [DV common] Add DV_ASSERT_CTRL macro (Srikrishna Iyer)
* [DV common] Enhance `DV_CHECK_MEMBER_RANDOMIZE_*` (Srikrishna Iyer)
* [otbn] Use relative scope names for OTBN scopes (Rupert Swarbrick)
* [verilator simutil] Add support for relative scope names to SVScoped
  (Rupert Swarbrick)
* [fpv/prim_packer] remove assumption (Cindy Chen)
* [fpv/csr_assert] support all modules for CSR assert (Cindy Chen)
* [memutil] Teach verilator_memutil to load multi-segment ELF files
  (Rupert Swarbrick)
* [memutil] Simplify how we read ELF files in verilator_memutil.cc
  (Rupert Swarbrick)
* [memutil] Add a "verbose" flag to detail memory loads (Rupert
  Swarbrick)
* [memutil] Parse all arguments before loading anything (Rupert
  Swarbrick)
* [memutil] Use override keyword, not virtual for overridden method
  (Rupert Swarbrick)
* [memutil] Use exceptions to simplify error handling (Rupert
  Swarbrick)
* [memutil] Store the width of memory areas in bytes, not bits (Rupert
  Swarbrick)
* [memutil] Allow memory locations to have associated LMAs (Rupert
  Swarbrick)
* [memutil] Improve type of ElfFileToBinary in verilator_memutil.cc
  (Rupert Swarbrick)
* [verilator simutil] Move SVScoped class into dv/verilator/cpp
  (Rupert Swarbrick)
* [memutil] Move static functions out of VerilatorMemUtil class
  (Rupert Swarbrick)
* [memutil] Run clang-format on verilator_memutil.* (Rupert Swarbrick)
* [dv:entropy_src] Initial rng_agent and integrated into entropy_src
  env (Steve Nelson)
* [prim_ram_adv/fpv] fix assertion (Cindy Chen)
* [prim_ram_1p_scr] Simplify nonce input and align to multiples of 64b
  (Michael Schaffner)
* [fpv/csr_assert] add csr support for regwen (Cindy Chen)
* [prim*] Various lint fixes in the prims (Michael Schaffner)
* [prim] remove FPV related assertions (Eunchan Kim)
* [prim_lfsr] Add option to supply custom output permutation (Michael
  Schaffner)
* [dv/common] calculate addr map size in RAL (Weicai Yang)
* [flash_ctrl] Add ECC to program / erase datapaths (Timothy Chen)
* [otp_ctrl] First cut implementation of the OTP controller (Michael
  Schaffner)
* Fix invalid read in verilator_memutil (Rupert Swarbrick)
* [doc] Don't strip markdown headings from HW checklist (Philipp
  Wagner)
* [site] Set lint title (Tobias Wölfel)
* [dv/prim] add basic PRINCE testbench (Udi Jonnalagadda)
* [flash_ctrl] Support the notion of a 'program-repair'. (Timothy
  Chen)
* [prim/tlul] Various small lint fixes (Michael Schaffner)
* [dv/uvmdvgen] update dvsim and remove Makefile (Cindy Chen)
* [util] Add script for generating sparse FSM encodings (Michael
  Schaffner)
* [prim] Add option to register output for interrupts (Timothy Chen)
* [prim_otp] First cut implementation of FPGA emulation (Michael
  Schaffner)
* [prim_ram_1p_adv] Add 16bit ECC mode (Michael Schaffner)
* [chip dv] Fix for failing GPIO test (Srikrishna Iyer)
* [RTl] Generic pad wrapper default behavior fix (Srikrishna Iyer)
* [slicer] Select partial from bitstream (Eunchan Kim)
* [util] Don't hack __repr__ in FlowCfg (Rupert Swarbrick)
* [util] Fix lint in dvsim.py (Rupert Swarbrick)
* [fpv/prim_packer] Add a FPV TB (Cindy Chen)
* [Keccak] Keccak_f implementation (Eunchan Kim)
* [dv/csr] add common task for csr_or_field_rd_check (Cindy Chen)
* [keccak] Add valid signal to random value (Eunchan Kim)
* [prim] Add primitive clock divider (Timothy Chen)
* [dv/shadow_reg] update sequence for storage error (Cindy Chen)
* [dv/lib] clear csr_outstanding_access after reset (Cindy Chen)
* [sw] Ensure Headers are Correctly Ordered (Sam Elliott)
* [dv] Fix csr_rd check during reset (Weicai Yang)
* Adding the first update to coverage methodology (Rasmus Madsen)
* [dv] TL agent supports no clock reset (Weicai Yang)
* [tlul/dv] Update test plan for tl errors (Weicai Yang)
* [fpv/alert] update namings for FPV tb (Cindy Chen)
* [keccak] Masked/Unmasked Keccak single round (Eunchan Kim)
* [lint/prim*] Waive STAR_PORT_CONN_USE errors in generated prims
  (Michael Schaffner)
* [prim_usb_diff_rx] Carry over wrapper for USB diff receiver (Michael
  Schaffner)

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
2020-11-28 12:12:27 +00:00
Rupert Swarbrick
31a18ad10c Clear MAKEFLAGS when running dvsim.py
dvsim.py runs make as a subprocess, which gets rather confused if
MAKEFLAGS appears in its environment. The proper fix is to clear them
from the environment in the dvsim command: we'll do that on the
OpenTitan side[1] and can revert this patch once that change is vendored
in.

[1] https://github.com/lowRISC/opentitan/pull/4325
2020-11-28 12:12:27 +00:00
Rupert Swarbrick
3d8041597b Delete dv/uvm/data and point DV code at the vendored version
This teaches the DV environment to use the vendored code that we set
up in the previous patch.
2020-11-28 12:12:27 +00:00
Rupert Swarbrick
690f8af65e Update paths for vendored DV code
This commit amends some paths in the vendoring hjson file (and updates
config files to use things at the new paths). Finally it re-runs the
vendoring tool:

  Update code from upstream repository
  https://github.com/lowRISC/opentitan to revision
  92e9242424c72c59008e267dd3779e2af5ec8e83

which just ends up with a load of file renames.

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
2020-11-28 12:12:27 +00:00
Luka Macan
999140ded8 Fix lint issues 2020-10-30 20:38:08 +00:00
Rupert Swarbrick
c31d066130 Fix "no invalidate" logic in ICache sequence
Some sequences run in "no invalidate" mode. Unfortunately, sometimes
we *have* to invalidate, either because we have a stale seed, or
because we're at the start of a sequence.

It turns out that "no invalidate" is a soft requirement, so we can
weaken it here. This patch also renames the flag to
"avoid_invalidation" to make it clear that this is allowed to be
violated occasionally.

Closes #1101.
2020-09-07 13:54:15 +01:00
Rupert Swarbrick
d71aaeee06 Update lowrisc_ip to lowRISC/opentitan@92e92424
The shortlog from the vendor tool's automated patch is reproduced at
the bottom of this commit message.

The automated commit is squashed with one to update how we depend on
bus parameters. Before, we had to provide an "Ibex top package". This
behaved the same as OpenTitan's "lowrisc:constants:top_pkg", but
avoided having to vendor in that file.

On the OpenTitan side, this has been tidied up with commit
d266c68 ("[dv] Update dv_utils sources to use bus_params_pkg"). This
changes the dependency of dv_utils to
"lowrisc:opentitan:bus_params_pkg". We still have to provide our
own (now called "lowrisc:ibex:bus_params_pkg") and need to patch the
dv_utils dependency, but this is a bit cleaner because dv_utils is
less likely to accidentally include dependencies on OpenTitan
internals.

On our side, we have to update the vendoring patch for dv_utils (and
change its name). We also need an equivalent patch for dv_lib. Then we
rename our hacky "Ibex top package" to "bus_params_pkg". The ICache DV
environment also needs patching to use the bus parameters properly.
Phew!

* [dv] Update prim_present cov opt (Srikrishna Iyer)
* [dv] Align VCS and Xcelium cov var names (Srikrishna Iyer)
* [dv] Split coverage for functional and auto tests (Srikrishna Iyer)
* [dvsim] Do builds smartly (Srikrishna Iyer)
* [syn] Carry over synthesis flow updates from bronze (Michael
  Schaffner)
* [dvsim] Lint cleanup (Srikrishna Iyer)
* [dvsim] Allow testplan to be omitted (Srikrishna Iyer)
* [dvsim] Address lowRISC/opentitan#3071 comments (Srikrishna Iyer)
* [dvsim] lint cleanup (Srikrishna Iyer)
* [dvsim] Add support for second-level indirection (Srikrishna Iyer)
* [dvsim] Change cores-root to avoid conflicts with autogen'd core
  files (Michael Schaffner)
* [dvsim] Update `tests` key behavior in regressions (Srikrishna Iyer)
* [lint] Minor update of ERROR patterns in parser script (Michael
  Schaffner)
* [packer] Revise the implementation (Eunchan Kim)
* [flow] Remove lint makefile (Timothy Chen)
* [flows] Various updates to tools and documents to suppose top/ip
  select (Timothy Chen)
* [dv/shadow_reg] shadow_reg update error (Cindy Chen)
* [rtl/alert] change the naming from _en_i to _req_i (Cindy Chen)
* [dvsim] Tidy up config file loading in FlowCfg.py (Rupert Swarbrick)
* [dvsim] Make it simpler to derive from FlowCfg (Rupert Swarbrick)
* [lint] Update warning/error exclusions in parser scripts (Michael
  Schaffner)
* [dvsim] Fix for `--tool` override (Srikrishna Iyer)
* [dvsim] Bug fix in LintCfg.py (Srikrishna Iyer)
* [prim/dv] Integrate LFSR TB with dvsim (Udi Jonnalagadda)
* [uvmdvgen] Update template to reflect bind reorg (Srikrishna Iyer)
* [dv] remove prim_lfsr_bind (Srikrishna Iyer)
* [dv] Cleanup lint warnings in csr_utils_pkg (Srikrishna Iyer)
* [dv] Cleanup lint warnings in clk_rst_if (Srikrishna Iyer)
* [dvsim] Fix coverage dashboard link (Srikrishna Iyer)
* [prim] Rename prim_util_memload.sv to svh (Philipp Wagner)
* [lint/doc] Update linting readme to reflect recent updates (Michael
  Schaffner)
* [lint] Remove legacy Makefile flow for linting tools (Michael
  Schaffner)
* [dvsim/lint] Enable Verilator lint in Dvsim (Michael Schaffner)
* [prim_arbiter_fixed/fpv] Add generated FPV testbench (Michael
  Schaffner)
* [prim_arbiter_fixed] This adds a fixed priority arbiter (Michael
  Schaffner)
* [prim] Domain-Oriented Masking AND logic (Eunchan Kim)
* [dv] Update dv_utils sources to use bus_params_pkg (Srikrishna Iyer)
* [dv] Update mem_model to use bus-params_pkg (Srikrishna Iyer)
* [dv]  Update dv_lib sources to use bus_params_pkg (Srikrishna Iyer)
* [uvmdvgen] Support for setting vendor name in VLNV (Srikrishna Iyer)
2020-08-17 09:18:06 +01:00
Rupert Swarbrick
94d5057168 Track mem_err_shift better in the ICache scoreboard
This fixes a test failure that I was seeing when following a "many
errors" test by something different. To reproduce,

  make -C dv/uvm/icache/dv \
       SEED=1465832714 \
       TESTS=ibex_icache_stress_all_with_reset

There are actually two different ways this can come unstuck:

(1) Memory request goes out and gets put into the response queue.
    req_i goes low. Sequence changes. req_i goes high and we get the
    response from the previous request (but mem_err_shift has changed
    in the meantime).

    To fix this, we pair up the memory seed and its associated
    mem_err_shift in the scoreboard queue, rather than retrieving
    mem_err_shift from the config object when the response comes in.

(2) Memory request goes out. Sequence changes. Memory request is
    handled (with new mem_err_shift). Scoreboard sees the result. New
    sequence generates its first item.

    In this case, the scoreboard will expect the old mem_err_shift and
    see the new one. To fix this, we add an extra entry to the list of
    valid states in the scoreboard if needed so that we also check the
    mem_err_shift currently in the config object.

You might worry about what happens if we have two back-to-back
sequence changes that change mem_err_shift without ever changing seed:
what happens if we have a situation like (1), but for the "middle"
sequence. To avoid this problem, we actually add the extra entry in
the fix for (2), so it will look like a new seed arrived as part of
the middle sequence, so long as we have read at least one
result (always true in the core sequence).
2020-07-22 21:09:40 +01:00
Rupert Swarbrick
84bcf4973a Minor rejigs to Makefile dvsim wrapper
This now allows you to specify how many seeds to run. Sadly, you can't
say "give me 10 seeds, starting at 1234" because dvsim doesn't support
that at the moment. But it does at least avoid quite such long command
lines.

Instead of:

    ../../../../vendor/lowrisc_ip/dvsim/dvsim.py \
      ibex_icache_sim_cfg.hjson \
      --scratch-root ../../../../build \
      --reseed 5 \
      -c

you can run:

    make RESEED=5 COVERAGE=1
2020-07-22 21:09:40 +01:00
Rupert Swarbrick
1dda6401c3 Define an Ibex-specific top_pkg core
The idea is that this can supply top_pkg.sv, a top-level thing in
OpenTitan, for DV code we vendor from there. It's probably better to
do this than to directly vendor in OpenTitan's top_pkg, because the
latter has information about e.g. flash memory layout, which doesn't
really have any meaning for Ibex.
2020-07-22 21:09:25 +01:00
Michael Schaffner
ae547c8d30 [top_pkg] Fix style lint warnings
Signed-off-by: Michael Schaffner <msf@google.com>
2020-06-22 20:52:15 +01:00
Rupert Swarbrick
96cf24a41a Add a stress_all_with_reset ICache test
This is like the stress_all test, picking other sequences at random
and running them back-to-back. The difference is in the reset
behaviour, where we randomly pull the reset line at unexpected times
to try to trigger any strange glitches this might cause.

This requires slight changes to the core and memory drivers, which
need to learn to stop and return early from the current item when they
see a reset.
2020-06-22 17:11:59 +01:00
Rupert Swarbrick
962fc8020c Invalidate in an ICache sequence after a change to mem_err_shift
When we chain sequences together, we are careful to pass seeds between
neighbouring sequences. However, I didn't think to check
mem_err_shift. Before this patch, you see problems if you have a
"caching" sequence followed by a "many_errors" sequence with no reset
and no change of seed and they both happen to pick the same address
range.

The problem is that if the data at address A is cached in the first
sequence, the icache will merrily return it when address A comes up in
the second. However, the change to mem_err_shift might mean that this
would cause a memory error if it hadn't been cached, causing the
scoreboard to get upset.

This patch ensures that we always start a sequence with an
invalidation if there was a previous sequence with a different value
of mem_err_shift.

To do this cleanly, the patch also moves some of the "grab the guts of
the old sequence and put it in the new one" logic from
ibex_icache_combo_vseq and into the underlying sequence classes. The
trick is that a sequence now has a handle to the previous sequence (if
there was one), and can use that to extract whatever information it
needs.
2020-06-22 17:11:59 +01:00
Rupert Swarbrick
e243ab2617 Fix ICache caching window test with combination sequences
This fixes several problems. Firstly, the window_reset function was
switching off tracking until it next saw busy_o go low, which is
correct at the start of time, but not what we want after we've
started. This patch splits that behaviour into a new tracking_reset
function (which calls window_reset). This is called on reset or
invalidate.

Secondly, this check was occasionally failing where we'd have an ECC
sequence (which should disable the check) immediately followed by a
caching sequence with similar addresses. If the window ended in the
caching sequence, we'd see a high fetch ratio and conclude that
something had gone wrong.

Now we clear the window completely whenever we fetch an instruction
when the check is disabled, which should avoid the problem (at worst,
you might get 1 instruction overlap, which is unlikely to matter).

Finally, we move the call to tracking_reset up to the end of the reset
sequence. It doesn't usually matter, but if there's a pending item
from the core monitor with busy = 0, we need to make sure that item
comes in before we set not_invalidating = 1. Otherwise, the scoreboard
incorrectly thinks it's seen the end of the invalidation
sequence (before it's even started) and starts tracking fetch ratios
too early.
2020-06-22 17:11:59 +01:00
Rupert Swarbrick
e7c9b52c36 Add ibex_icache_stress_all test
This runs sequences back-to-back, occasionally resetting between
sequences.

Because our virtual sequences are composed of several smaller
sequences, we have to stop them when the core sequence finishes (see
the calls to kill() in ibex_icache_base_vseq). We also have to make
sure that we don't drop items in the memory sequence, which can be
pre-empted as part of sending a response (see the peek/get code
there).

Finally, the memory sequence also has a current seed and a list of
pending grants: this patch has to copy those across between sequences
to make everything work correctly.
2020-06-22 17:11:59 +01:00