Commit graph

1955 commits

Author SHA1 Message Date
Michael Rogenmoser
24e3d1d090 [rtl] Switch to tc_clk_gating from pulp tech_cells_generic 2021-01-21 17:12:51 +01:00
Michael Rogenmoser
28be76be62 [rtl] Correct direction of irq_x_i port and width of irq_x_ack_id_o 2021-01-21 17:12:51 +01:00
Michael Rogenmoser
3d88aa42aa Reorder files in Bender.yml according to build priority, add dependency 2021-01-21 17:12:51 +01:00
Michael Rogenmoser
2356c029c8 Update Bender.yml to produce core trace
(double declaration of files pending https://github.com/fabianschuiki/bender/issues/40)
2021-01-21 17:12:51 +01:00
Michael Rogenmoser
a93f5c8ddf Update Bender.yml with RVFI define 2021-01-21 17:12:51 +01:00
Michael Rogenmoser
54becdb274 Add Bender.yml file 2021-01-21 17:12:51 +01:00
Maximilian Koschay
ebc92e8c82 Make miex register all ones on reset
The register is redundant to the PLIC in pulpissimo and is never written by the PULP_SDK.
Therefore enable all Interrupts from the beginning to ensure functionality.
2021-01-21 17:12:51 +01:00
Pirmin Vogel
0d6e220d79 [rtl] Add CLINTx: 32 fast interrupts and custom CSRs + ACK signaling
This commit adds 32 non-standard, custom, fast interrupts to Ibex. These
interrupts are managed via 3 custom CSRs: `miex`, `mipx` and `mtvecx`.
`mtvecx` is initialized just like `mtvec`. Upon handling such a custom
interrupt, the core uses two signals (ACK + ID) to inform a possible
platform-level interrupt controller accordingly.

The purpose of adding these non-standard interrupts is to have an
interrupt framework compatible with RI5CY/CV32E40P for platforms that can
use the two cores interchangeably (PULP/PULPissmio).

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2021-01-21 17:12:51 +01:00
Pirmin Vogel
57108c3184 [rtl] Switch to cluster_clock_gating
This commit replaces the generic `prim_clock_gating` cell with the
`cluster_clock_gating` cell used in PULPissimo.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2021-01-21 17:12:51 +01:00
Pirmin Vogel
c69fc8b6f2 [rtl] Fix overlapping encodings of immediate instructions in tracer package
This commit modifies the encoding of SROI, RORI, SBEXTI, GREVI and GORCI by
forcing Bit 26 to zero to prevent overlapping encodings with FSRI.

The bitmanip draft spec doesn't explicitly state that Bit 26 for those
instructions must be zero. However, those instructions only ever use
log2(XLEN) LSBs of the immediate. This means they don't use Bit 26 in RV32.
Instead, whenever Bit 26 is set, these instructions are instead decoded as
FSRI.
2021-01-21 17:11:47 +01:00
Pirmin Vogel
e64f94e798 [rtl] Fix encoding of ZIP/UNZIP pseudo-instrcutions in tracer package
Just like for the corresponding base instructions SHFLI/UNSHFLI the MSBs of
all these pseudo-instructions must be 6'b0000_10.
2021-01-21 17:11:47 +01:00
Pirmin Vogel
760baa1eb2 [rtl] Fix encoding for ORC16/REV16 instructions in tracer package
This bug was originally found by @micprog.
2021-01-19 15:05:07 +01:00
Greg Chadwick
75e1c28107 [syn] Fix timing reports in synthesis flow
This fixes a bug where .csv.rpt files weren't being generated properly.
OpenSTA was outputting a simple 'Q' or 'D' for start and end path points
where the full instance name was required (which is then fed to yosys to
translate to a human readable name). The issue was in the `timing_report`
proc in syn/tcl/sta_utils.tcl which needed to request the full name of
the start and end points.

The syn README is updated to note which tool versions have been used to
test the flow.

Fixes #1193
2021-01-19 10:24:53 +00:00
Greg Chadwick
6a61e0ec0c [rtl] Fix PMP NAPOT matching for 0 PMPGranularity 2021-01-19 10:24:32 +00:00
Tobias Wölfel
d315c38527 [dv] Verilator unused parameter handling
Forward a currently unused parameter.

Disable error exit for warnings. Newer Verilator versions will fail if
for example parameters are unused. As this test does not cover
everything, allow those warning to be printed, but not fail the build.
2021-01-19 09:01:36 +01:00
Tobias Wölfel
ca31ca43f3 [rtl] Add B extension to misa
Reflect the availability of the B extension in the misa register.
2021-01-19 09:01:36 +01:00
Tobias Wölfel
0f2dc5c64a [rtl] Avoid latch creation
Following Verilator warning set default value to avoid the creation of a
latch.
2021-01-11 16:20:33 +01:00
Tobias Wölfel
90c78203cc [rtl] Use tracer parameters for decoding
Instead of repeating the values from the tracer package use the
definitions to decode the instructions.
2021-01-11 16:20:33 +01:00
Tobias Wölfel
3371732f94 [rtl] Disable definition of unused instructions
The parameters are not used as the instructions are not yet widely
supported.
Keep definitions so they can be easily activated later.

Tracked in issue lowrisc/ibex#1228
2021-01-11 16:20:33 +01:00
Tobias Wölfel
90258b6d07 [rtl] Remove unused tracer branch instruction
`INSTR_BALL` was introduced in 47b713fd as a vector instruction.
This is not used and is probably a leftover so can be removed.
2021-01-11 16:20:33 +01:00
Rahul Raveendran
a4238bdd8d [doc/um] Updated the python requirements run command for sw simple system
Signed-off-by: Rahul Raveendran <rahul.raveendran@acconeer.com>
2021-01-11 11:28:56 +00:00
Philipp Wagner
8f3d8f311f CI: The distro-provided pyyaml package is enough
In the past, we did explicitly install pyyaml through PIP to get a
version newer than the one provided in Ubuntu 18.04. Since then we
changed the calling code to not rely on newer pyyaml features and
are thus able to rely on an older version of pyyaml.

The distro-provided version of pyyaml is built with C bindings, which
are significantly faster than the pip-installed version, which uses a
pure Python-implementation of the parser/dumper.
2021-01-09 18:15:08 +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
Philipp Wagner
b1daf9e44e Update lowrisc_ip to lowRISC/opentitan@c277e3a8
Update code from upstream repository
https://github.com/lowRISC/opentitan to revision
7e131447da6d5f3044666a17974e15df44f0328b

Updates to Ibex code to match this import:
* Include str_utils in the imported code.
* List new source files in dv/uvm/core_ibex/ibex_dv.f
* Update patches to resolve merge conflicts.
* Update tb_cs_registers.cc and ibex_riscv_compliance.cc to match the
  new return code of simctrl.Exec().

Imported updates:
* Do not require pyyaml >= 5.1 (Philipp Wagner)
* [prim_edn_req] Forward fips signal to consumer (Pirmin Vogel)
* [prim_edn_req] Use prim_sync_reqack_data primitive (Pirmin Vogel)
* [prim_edn_req] De-assert EDN request if packer FIFO has data
  available (Pirmin Vogel)
* [cleanup] Mass replace tabs with spaces (Srikrishna Iyer)
* [lc_ctrl] Add script to generate the LC state based on the ECC poly
  (Michael Schaffner)
* [dvsim] Use list for rsync command (Eunchan Kim)
* [verilator] Only control the reset line when necessary (Rupert
  Swarbrick)
* [dv/csr_utils] Add debug msg for UVM_NOT_OK err (Cindy Chen)
* [dvsim] Add exclude hidden files when needed (Eunchan Kim)
* [prim_sync_reqack] Add variant with associated data and optional
  data reg (Pirmin Vogel)
* [DV, Xcelium] Fix for lowRISC/opentitan#4690 (Srikrishna Iyer)
* [dvsim] Remote copy update (Srikrishna Iyer)
* [prim_edn_req] Add EDN sync and packer gadget primitive (Michael
  Schaffner)
* [prim] Add hamming code as ECC option (Timothy Chen)
* [DV] Cleanup lint warnings with Verible lint (¨Srikrishna)
* [prim_ram] Rearrange parity bit packing and fix wrong wmask settings
  (Michael Schaffner)
* [lc_sync/lc_sender] Absorb flops within lc_sender (Michael
  Schaffner)
* [prim_otp_pkg] Move prim interface constants into separate package
  (Michael Schaffner)
* [sram_ctrl] Pull scr macro out of sram_ctrl (Michael Schaffner)
* [top] Move alert handler to periphs and attach escalation clock to
  ibex (Michael Schaffner)
* [prim_esc_rxtx/rv_core_ibex] Add default values and NMI
  synchronization (Michael Schaffner)
* [dvsim] Fix regression publish result link with --remote switch
  (Cindy Chen)
* [vendor/ibex] Remove duplicate check tool requirements files
  (Michael Schaffner)
* [prim_ram_1p_scr] Fix sequencing bug in scrambling logic (Michael
  Schaffner)
* [prim_ram*_adv] Qualify error output signals with rvalid (Michael
  Schaffner)
* [dvsim] Fix purge not delete remote repo_top (Cindy Chen)
* [lc/otp/alerts] Place size-only buffers on all multibit signals
  (Michael Schaffner)
* [prim_buf] Add generic and Xilinx buffer primitive (Michael
  Schaffner)
* [prim] Packer to add byte hint assertion (Eunchan Kim)
* [dvsim] Logic to copy repo to scratch area (Srikrishna Iyer)
* [dv/lc_ctrl] enable lc_ctrl alert_test (Cindy Chen)
* [prim] documentation update for flash (Timothy Chen)
* [flash_ctrl] Add additional interface support (Timothy Chen)
* [dvsim] Fix publish report path (Weicai Yang)
* [top_earlgrey] Instantiate LC controller in toplevel (Michael
  Schaffner)
* [doc] Fix checklist items in V1 (Michael Schaffner)
* [dv/csr_excl] Fix VCS warning (Cindy Chen)
* [dv/doc] cleaned up checkist alignment (Rasmus Madsen)
* [doc/dv] cleanup (Rasmus Madsen)
* [dv/doc] updated dv_plan links to new location (Rasmus Madsen)
* [dv/doc] changed testplan to dv_plan in markdown files (Rasmus
  Madsen)
* [dv/doc] changed dv plan to dv doc (Rasmus Madsen)
* Remove redundant ascentlint options (Olof Kindgren)
* Add ascentlint default options for all cores depending on
  lint:common (Olof Kindgren)
* [flash] documentation update (Timothy Chen)
* [flash / top] Add info_sel to flash interface (Timothy Chen)
* [otp] lci interface assertion related fix (Cindy Chen)
* [dv/uvmdvgen] Add switch to auto-gen edn (Cindy Chen)
* [util] Rejig how we load hjson configurations for dvsim.py (Rupert
  Swarbrick)
* added changes required by sriyerg (Dawid Zimonczyk)
* update riviera.hjson (Dawid Zimonczyk)
* [flash_ctrl] Add high endurance region attribute (Timothy Chen)
* Change VerilatorSimCtrl::Exec to handle --help properly (Rupert
  Swarbrick)
* Simplify handling of exit_app in VerilatorSimCtrl::ParseCommandArgs
  (Rupert Swarbrick)
* [sram_ctrl] Rtl lint fix (Michael Schaffner)
* [keymgr] Add edn support (Timothy Chen)
* [dv] Make width conversion explicit in dv_base_env_cfg::initialize
  (Rupert Swarbrick)
* [dvsim] Allow dvsim.py to be run under Make (Rupert Swarbrick)
* [dvsim[ rename revision_string to revision (Srikrishna Iyer)
* [dvsim] Update log messages (Srikrishna Iyer)
* [dvsim] fix for full verbosity (Srikrishna Iyer)
* [dv] Fix Questa warning and remove unused var (Weicai Yang)
* [dvsim] Add alias for --run-only (Weicai Yang)
* [keymgr] Hook-up random compile time constants (Timothy Chen)
* [dvsim] Add support for UVM_FULL over cmd line (Srikrishna Iyer)
* [dv common] Enable DV macros in non-UVM components (Srikrishna Iyer)
* [DVsim] Add support for Verilator (Srikrishna Iyer)
* [DVSim] Fix how sw_images is treated (Srikrishna Iyer)
* [DV common] Fixes in sim.mk for Verilator (Srikrishna Iyer)
* [DV Common] Split DV test status reporting logic (Srikrishna Iyer)
* [prim_arbiter_ppc] Fix lint error (Philipp Wagner)
* [DV common] Factor `sim_tops` out of build_opts (Srikrishna Iyer)
* [dvsim] run yapf to fix style (Weicai Yang)
* [dv/common] VCS UNR flow (Weicai Yang)
* [dv] Add get_max_offset function in dv_base_reg_block (Weicai Yang)
* [otp_ctrl] Fix warnings from VCS (Cindy Chen)
* [lint] Change unused_ waiver (Eunchan Kim)
* [dv/alert_test] Add alert_test IP level automation test (Cindy Chen)
* [DV] Update the was SW is built for DV (Srikrishna Iyer)
* [dvsim] Replace `sw_test` with `sw_images` (Srikrishna Iyer)
* [chip dv] Move sw build directory (Srikrishna Iyer)
* [dv common] Update dv_utils to use str_utils_pkg (Srikrishna Iyer)
* [DVSim] Method to add pre/post build/run steps (Srikrishna Iyer)

Signed-off-by: Philipp Wagner <phw@lowrisc.org>
2021-01-07 18:03:44 +00:00
Fresher14
0199bbae66 Use overlapping implications for Xcelium 19.03
Xcelium 19.03 doesn't support the `->` (binary logical) operator, but
using `|->` (overlapping implication) is equivalent here and supported;
use this operator instead.

Fixes #1213
2020-12-17 11:25:03 +00:00
Philipp Wagner
aa7582b8d4 Use more descriptive issue template names
The GitHub UI shows apparently the name of the template at
https://github.com/lowRISC/ibex/issues/new/choose, which I thought was
just an internal identifier. Use the longer-form version there as well.
2020-12-08 13:59:43 +00:00
Philipp Wagner
e71494fd39 Add issue templates to GitHub project
Add two issue templates to the GitHub project: one for questions, and
one for reporting bugs. These templates are not mandatory, users can
freely change them, or get a blank issue template instead.

To avoid having too much description/example text in the final issue the
instructions are written in HTML comments (which is not beautiful, but
should do the trick and seen commonly in projects).
2020-12-08 12:31:40 +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
Tom Roberts
64ee9a930d [rtl] icache performance updates
Remove the SpeculativeRequest parameter, and replace it with a
policy. If the cache is disabled, make the request on the basis that we
definitely won't hit in the cache and so should make the bus request
asap.

Stop fill buffers from fetching complete cache lines when the cache is
disabled. When the core branches into the middle of a line, the lower
words would normally be fetched to complete the line. This is
unnecessary when the cache is disabled since those words will just be
thrown away and the core will stall while they are being fetched.

These two changes make the performance using the disabled icache the
same as using non-icache prefetch buffer.

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-12-02 15:10:48 +00:00
Rupert Swarbrick
38a6b59e0b [fpv] Assume icache req_i input is low when in reset
This avoids spurious requests going out on the instruction bus.
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
Tom Roberts
1efe7a03ed [syn] Fix path in synthesis script
Path to primitives has been updated

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-12-02 09:42:57 +00:00
Philipp Wagner
f732bf51a2 CI: Remove outdated workarounds for Ubuntu 16.04 2020-12-01 19:01:29 +00:00
Philipp Wagner
c46685747d CI: Update to Ubuntu 18.04
Follow OpenTitan's lead and move to Ubuntu 18.04 for the CI runner.
Ubuntu 16.04 comes with Python 3.5, which is EOL and causes more and
more issues.

Specificially, this update is triggered by rst2pdf not being installable
with pip's new dependency resolver (see also
https://github.com/rst2pdf/rst2pdf/issues/489#issuecomment-736652808).
2020-12-01 19:01:29 +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
623402cf6f Vendor in hw/dv/{data,tools} from OpenTitan
This gets the rest of the support code needed for dvsim (which we
currently duplicate). The patch:

  - adds the relevant directories to the vendoring file
  - adds a patch to rewrite some OpenTitan-specific bits
  - adds a "common_project_cfg.hjson"
  - re-runs the vendoring tool

This patch won't yet change how DV code runs; we also need to redirect
a couple of paths and delete dv/uvm/data for that. This will happen in
the next patch.

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
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
Rupert Swarbrick
77d8010015 Improve ibex_config command line handling with missing output_fn
We need to check that the output type is actually supplied, otherwise
we spit out a rather mysterious error a few lines later.
2020-11-26 09:39:59 +00:00
Philipp Wagner
86084b9d3d Fix Xcelium warnings
(Likely) fix the following warnings from Xcelium (we cannot actually
confirm that without the tool):

```
                      |fill_ext_req;
                      |
xmvlog: *W,DUPBWO (../src/lowrisc_ibex_ibex_icache_0.1/rtl/ibex_icache.sv,830|22): error prone bit-wise OR ('|') sequence detected [4.1.11(IEEE)].
  `ASSERT_IF(BranchInsTypeOneHot, $onehot0({instr_j, instr_b, instr_cj, instr_cb}), fetch_valid_i);
                                                                                                  |
xmvlog: *W,UEXPSC (../src/lowrisc_ibex_ibex_core_0.1/rtl/ibex_branch_predict.sv,91|98): Ignored unexpected semicolon following SystemVerilog description keyword (end).
    `ASSERT(NoPredictSkid, instr_skid_valid_q |-> ~predict_branch_taken);
                                                                        |
xmvlog: *W,UEXPSC (../src/lowrisc_ibex_ibex_core_0.1/rtl/ibex_if_stage.sv,488|72): Ignored unexpected semicolon following SystemVerilog description keyword (end).
    `ASSERT(NoPredictIllegal, predict_branch_taken |-> ~illegal_c_insn);
                                                                       |
xmvlog: *W,UEXPSC (../src/lowrisc_ibex_ibex_core_0.1/rtl/ibex_if_stage.sv,489|71): Ignored unexpected semicolon following SystemVerilog description keyword (end).
```
2020-11-18 10:16:48 +00:00
Udi Jonnalagadda
f829915aee [dv/ibex] add support for DSim
Signed-off-by: Udi Jonnalagadda <udij@google.com>
2020-11-13 11:37:08 -08:00
Greg Chadwick
3b0cf263ae [doc] Add bitmanip note to README
Make it clear from the README bitmanip is not ratified and things may
change.
2020-11-13 11:38:01 +00:00
Greg Chadwick
4a64abdf8f [doc] Update info on simulators for verification
A few tweaks to fix broken links, make explanations more clear and
update the information to reflect the present (e.g. Spike master now
implements bit-manip, the seperate branch is gone).
2020-11-13 11:38:01 +00:00
Udi Jonnalagadda
c10a050526 Update google_riscv-dv to google/riscv-dv@3da32bb
Update code from upstream repository https://github.com/google/riscv-
dv to revision 3da32bbf6080d3bf252a7f71c5e3a32ea4924e49

* fix location of custom CSR setup (google/riscv-dv#747) (udinator)

Signed-off-by: Udi Jonnalagadda <udij@google.com>
2020-11-10 11:04:13 -08:00
Tom Roberts
62405f931f [rtl] Fix performance counter bug
- Make sure performance counters only count retired, non-trapping
  instructions excluding ebrk/ecall
- Rewire some signalling through the writeback stage to allow
  instruction retire to be signalled from one place
- Relates to #1132

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2020-11-10 11:43:17 +00:00
CathalMCrevinn
25fde8fcb3 [dv] Fixes for disabling forks, for Cadence Xcelium
This makes changes to support Cadence Xcelium 20.09.001.

Cadence recommends that disabling forks should be done using a "disable fork;" statement, not the "disable fork_process_label;" construct.
The "disable fork_process_label" construct for forks is not defined in the IEEE Std 1800-2017 LRM. See section 9.6.2 of the LRM (2017).
For a more detailed explanation, please see the description from my colleague in Issue #1174: https://github.com/lowRISC/ibex/issues/1174.

In many cases, Xcelium will ignore a disable statement if it is not in the "disable fork;" form.
This causes problems in many tests, most notably in the riscv_reset_test.
Processes not being disabled when reset is asserted cause not just test failures, but the entire regression to crash.

Most changes here are simple substitutes of "disable fork;" where "disable label;" was.
Some changes in core_ibex_test_lib.sv require the layout of the fork to be adjusted.

Signed-off-by: CathalMCrevinn <cathal_minnock@crevinn.com>
2020-11-10 09:40:43 +00:00
Udi Jonnalagadda
94c87ba987 [ibex/dv] Modify EOT ecall check
This PR slightly modifies how we wait for the end of an Ibex sim.
Currently we wait on dut_vif.dut_cb.ecall, which will be delayed by a
cycle as it is in a clocking block.
However we should end the test immediately when an ecall is seen, so we
should rather wait on dut_vif.ecall instead to be more accurate and
prevent potential race conditions caused by irq/debug stimulus being
sent on the same cycle as an ecall instruction is executed by the core.

Signed-off-by: Udi Jonnalagadda <udij@google.com>
2020-11-10 09:35:46 +00:00
Michael Platzer
6fb378c40c [rtl] Reduce size of PMP addr CSRs to minimum
- Reduce the size of the PMP address configuration registers to the
  permissible minimum depending on granularity.
- Ensure consistency between PMP address CSR reads and the addresses
  forwarded to the PMP module.
- Follow the specification more strictly, by returning bits
  pmpaddr[G-2:0] as all ones when pmpcfg.A[1] is set (i.e. mode is
  NAPOT or NA4, though the latter is invalid for G > 0) and bits
  pmpaddr[G-1:0] as all zeros when pmpcfg.A[0] is clear (i.e. mode is
  OFF or TOR).
- Fixes #1181
2020-11-09 14:49:06 +00:00