Commit graph

1155 commits

Author SHA1 Message Date
udinator
1615969bc1
[DV] Refactor debug stress stimulus to avoid race conditions (#354) 2019-09-25 19:08:05 -07:00
udinator
95a82f8be8
Update google_riscv-dv to google/riscv-dv@d341944 (#353)
Update code from upstream repository https://github.com/google/riscv-
dv to revision d3419444ca2fdb499a204587b2d36c6f5c1e0c44

* Update README (Udi)
* Add knob to enable full CSR randomization, fix mstatus.spp (Udi)
2019-09-25 18:40:36 -07:00
udinator
576d0ed76d
[DV] Basic performance test (#352) 2019-09-25 16:28:57 -07:00
udinator
6bae3f2d6f
Tighten debug stimulus assertion (#351) 2019-09-25 14:45:00 -07:00
udinator
83178c69f9
Update google_riscv-dv to google/riscv-dv@e3e1e30 (#349)
Update code from upstream repository https://github.com/google/riscv-
dv to revision e3e1e308cfc3d718aeb94bb3463371979d9a31ae

* Disable full trace in the run script (google/riscv-dv#180) (taoliug)
* Fix spike logging issue (google/riscv-dv#179) (taoliug)
* Add functional coverage for HINT instructions (google/riscv-dv#177)
  (taoliug)
* Add functional coverage for various hazard conditions (google/riscv-
  dv#176) (taoliug)
2019-09-24 13:55:03 -07:00
udinator
1e8381bfa1 Update google_riscv-dv to google/riscv-dv@4450592 (#347)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 44505927a70a6234b996d15f2e51bd1e2632b68e

* Dump performance counters to testbench at EOT (Udi)
* Fix a constraint issue (google/riscv-dv#174) (taoliug)
* Allow split a long test to small batches (google/riscv-dv#173)
  (taoliug)
* Fix ius compile problem (google/riscv-dv#172) (taoliug)
* Add basic functional coverage for RV64IMC (google/riscv-dv#171)
  (taoliug)
* Initial prototype of functional coverage (google/riscv-dv#169)
  (taoliug)
2019-09-23 18:08:16 -07:00
udinator
ec02461b4a
[DV] Fix implemented_csr[] compile issue (#346) 2019-09-23 17:49:40 -07:00
udinator
9b967a5d97
[DV] Update implemented CSRs (#345) 2019-09-23 15:59:10 -07:00
udinator
717bf1ae02
Fix memory error test logic (#344) 2019-09-23 15:32:20 -07:00
Pirmin Vogel
83d2185c9b Tracing: Wrap fatal error message with $fatal()
The syntax of this statement is not correct without the `$fatal()` SV
construct. This causes errors in some tools even if the error condition
is not met.
2019-09-20 09:35:26 +01:00
udinator
8d799e526b
[DV] Illegal instruction monitoring (#338) 2019-09-19 10:45:28 -07:00
udinator
e9949f9808
[DV] Shorten length of interrupt tests to prevent timeouts (#337) 2019-09-19 10:19:56 -07:00
udinator
66410f6c90
[DV] Drive external stimulus to 0 after reset (#334) 2019-09-19 08:30:02 -07:00
udinator
2f120d4ade
Update google_riscv-dv to google/riscv-dv@80d4294 (#333)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 80d429475138b4b94d863030246a06980c89889d

* Fix mstatus randomization issue (google/riscv-dv#168) (taoliug)
* Lower the percentage of JAL instruction (google/riscv-dv#167)
  (taoliug)
* Add an option to run a directed assembly test with ISS
  (google/riscv-dv#166) (taoliug)
* Add memory fault handlers (Udi)
2019-09-18 14:13:03 -07:00
udinator
e694fa05b9
Add memory error testing (#330) 2019-09-18 13:26:56 -07:00
Philipp Wagner
76f4db5155 Compliance test suite: Prefer D over I accesses
Give higher priority to data accesses from the CPU to improve
performance. This is the recommended setup for Ibex.
The test utility host needs still higher priority, otherwise the CPU
takes all bus capacity (the downside of strict priority arbitration).
2019-09-18 11:07:37 +01:00
taoliug
47acadc969 Consolidate the script logging (#329) 2019-09-17 16:41:43 -07:00
taoliug
e7123f1c2d
Add dsim support (#328) 2019-09-17 16:18:05 -07:00
Philipp Wagner
2ce4bfa150 Lint: Enable RVFI when doing lint checks
The RVFI define enables some code used by the tracer and should be
lint-checked as well.
2019-09-17 13:29:37 +01:00
Philipp Wagner
fa31484a6a Lint: Fix signal width in tracer
These width warnings are only visible if RVFI is enabled and reported by
Verilator lint.
2019-09-17 13:29:37 +01:00
Philipp Wagner
cc18a5e7d0 Ignore common editor files in Git
Also removes the include/riscv_config.sv.bak line, which was added
in 346d14c5. We have no code that generates this file any more.
2019-09-17 13:15:10 +01:00
udinator
80e231dd8b
Add interrupt testing, and update some debug test checks (#324) 2019-09-16 16:58:28 -07:00
taoliug
369f56bad0 Integrate with the new riscv-dv user extension flow (#323) 2019-09-16 15:06:36 -07:00
udinator
2c71a26680
Update google_riscv-dv to google/riscv-dv@0d2b5b7 (#321)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 0d2b5b7b8b1cdbce74d9e123a427052b12accd7b

* Add user extension support (google/riscv-dv#163) (taoliug)
* Update README (google/riscv-dv#162) (taoliug)
* Fix compilation issue (google/riscv-dv#161) (taoliug)
* Fix compilation issue (google/riscv-dv#160) (taoliug)
* Adding dsim support (google/riscv-dv#159) (taoliug)
* Fix RV64A typo (google/riscv-dv#158) (taoliug)
2019-09-16 13:43:35 -07:00
Philipp Wagner
87e50a62a9 ibex_riscv_compliance: Adjust to simutil_verilator
Now that verilated_toplevel.h always generates the right class we don't
need to call VERILATED_TOPLEVEL() any more.
2019-09-16 14:53:54 +01:00
Philipp Wagner
7a0614a1d0 simutil_verilator: Always produce toplevel class
Previously, verilated_toplevel.h contained a macro, VERILATED_TOPLEVEL()
to produce a class TOPLEVEL (whatever the toplevel happens to be). This
required all compilation units referring to that TOPLEVEL class to call
the macro.

After this change, the class is always generated in
verilated_toplevel.h. For that to work, a new define TOPLEVEL_NAME must
be globally set (e.g. passed to the compiler with -DTOPLEVEL_NAME=xxx).
2019-09-16 14:53:54 +01:00
Greg Chadwick
9958d30063 [DV] Fix latch in simple bus
Fixes #297
2019-09-16 13:36:23 +01:00
taoliug
0667c14f15 [DV] Standardize logging, allow parallel simulation (#315) 2019-09-15 12:16:14 -07:00
taoliug
7280301369
Fix ELF section name (#314) 2019-09-13 16:11:41 -07:00
taoliug
54eb5c2456
Fix regression failure (#313) 2019-09-13 16:02:34 -07:00
udinator
3fcf5a634d
Update google_riscv-dv to google/riscv-dv@c98d89c (#312)
Update code from upstream repository https://github.com/google/riscv-
dv to revision c98d89cdff7b56d9911904e05e6b46e005233280

* Interrupt test integration (Udi)
* Update README for illegal/hint instruction (google/riscv-dv#155)
  (taoliug)
* Refactor illegal/hint instruction generation (google/riscv-dv#154)
  (taoliug)
* Skip x0 in GPR save/restore (google/riscv-dv#153) (taoliug)
* Move user_define.h to the beginning of the program (google/riscv-
  dv#151) (taoliug)
* Add user_define.h (google/riscv-dv#149) (taoliug)
* Move instr_bin to a separate section (google/riscv-dv#148) (taoliug)
* Remove temp files (google/riscv-dv#145) (taoliug)
* Move dv_defines.svh outside the package (google/riscv-dv#144)
  (taoliug)
* Fix typo (google/riscv-dv#141) (taoliug)
* Refactored loop instruction stream, reduce global reserved registers
  (google/riscv-dv#139) (taoliug)
* Remove obsolete sample program (google/riscv-dv#138) (taoliug)
* Update readme (google/riscv-dv#137) (taoliug)
* Skip kernel instruction/data pages when not needed (google/riscv-
  dv#136) (taoliug)
* Re-organize data page generation (google/riscv-dv#135) (taoliug)
* Re-organize text and data section (google/riscv-dv#134) (taoliug)
* Refine the bare program mode (google/riscv-dv#133) (taoliug)
* Add a bare program mode (google/riscv-dv#130) (taoliug)
* Allow running riscv-dv from other directories (google/riscv-dv#128)
  (taoliug)
* Fix trace compare issue (google/riscv-dv#123) (taoliug)
* Optimize for constraint solving performance (google/riscv-dv#122)
  (taoliug)
* Avoid ISS simulation timeout (google/riscv-dv#121) (taoliug)
* Optimize irun randomization performance (google/riscv-dv#120)
  (taoliug)
* fix ius compile/simulation warnings (Tao Liu)
* Fix ius compilation failure (Tao Liu)
* Fix google/riscv-dv#109 ius constraint solver failure (Tao Liu)
* Add ebreak sequence generation and cmdline options (Udi)
* Added dret instruction to random generation (Udi)
* Tighten up regex in spike log tracer. (Dave Estes)
* Fix generation of debug handshake (Udi)
* Fix wfi generation, add indent to core_initialization handshake
  (Udi)
2019-09-13 14:34:56 -07:00
Tom Roberts
f025236a22 [I-side] - Fix issues found in tracing example
- Fixes #288
- Add missing grant qualification to stop incorrect address updates
- Make RTL robust to spurious rvalid signalling
- Make sure a request is held until granted
- Remove incorrect assertion
2019-09-12 08:47:09 +01:00
Philipp Wagner
6b03bc6326 Run clang-format on all source files 2019-09-11 12:00:49 +01:00
Philipp Wagner
6afc7eae16 Add lowRISC standard clang-format file
We use the Google C++ coding style
(https://google.github.io/styleguide/cppguide.html) with some
clarifications to make it more applicable for C, inspired by BoringSSL
(https://boringssl.googlesource.com/boringssl/+/HEAD/STYLE.md).
2019-09-11 12:00:49 +01:00
Pirmin Vogel
85ae06d054 Controller: fix nmi_mode default assignment
Without this commit, the `nmi_mode` register is continuously cleared and
set again, and the core can never handle the NMI.

This resolves lowRISC/ibex#300 reported by @udinator.
2019-09-11 10:45:26 +01:00
udinator
ac22439374
Update slave_driver grant timing to pass Ibex assertion checks (#295) 2019-09-09 14:31:29 -07:00
Pirmin Vogel
8d3d87ae53 Controller: Fix exception cause ID of fast interrupts
This commit fixes the generation of the exception cause ID for fast
interrupts. Without this commit, the core tries to handle fast
interrupts using the handlers of other interrupts like external,
software, and timer interrupts.

This commit resolves lowRISC/ibex#290 reported by @udinator.
2019-09-09 13:05:48 +01:00
Tom Roberts
b87ed7c82e [I-side] - Fix assertion error
- Assertion was added in the wrong file
2019-09-09 09:06:31 +01:00
pbing
e2110e2a46 Instruction set extensions M and C may be swapped 2019-09-07 17:54:26 +01:00
Udi
7ddee54f9f Fix syntax error 2019-09-07 10:24:27 +01:00
Rahul Behl
60de915d6b Adding Compressed Instruction support in tracer
Added compressed instruction decoder in the tracer to correctly
trace compressed instructions with their mnemonics. Fixes #197
2019-09-06 15:43:53 +01:00
Pirmin Vogel
1162b995fa CSRs: reset dcsr.XDEBUGVER to XDEBUGVER_STD instead of 0
This field is read only and should be set to the right value straight
away.

This fixes lowRISC/ibex#285.
2019-09-06 15:32:15 +01:00
Tom Roberts
16177fe8db [RTL] Fix I-side timing loop
- See issue #265 (partially fixes)
- Remove path from instr_rvalid_i to instr_req_o
- Prefetch buffer unit can now issue up to two outstanding requests
- Structure moved from state machine to request queue
- Change fetch fifo to use an unaligned flag rather than updating
  the address each time
2019-09-06 09:24:57 +01:00
Greg Chadwick
bec84ca2b1 Add core_sleep_o to ibex interface
Signals the core is totally idle (WFI with no outstanding memory
transactions).  Fixes #258
2019-09-06 08:44:48 +01:00
Tom Roberts
36db104160 [RTL] - Remove timing loop in LSU
- Relates to issue #265
- External signals data_rvalid_i and data_err_i were factored
  into the external data_req_o signal
- To improve timing, these signals are decoupled
- The second part of an unaligned transaction will now be issued
  even if the first received an error response
- The state machine will service the abandoned requests
- pmp_err_q fixed to only update at specific times
2019-09-05 08:35:54 +01:00
udinator
e9c2b2ecb3
Added dret and ebreak tests (#281) 2019-09-04 16:14:41 -07:00
Greg Chadwick
d14312c3cc Replace cluster_id/core_id with hart_id (#29)
If you're migrating from the previous interface you can use

logic [31:0] hart_id;
assign hart_id = {21'b0, cluster_id_i[5:0], 1'b0, core_id_i[3:0]};

...

ibex_core #(
  ...
) u_core (
  ...

  // replace core_id_i and cluster_id_i
  .hart_id_i(hart_id),

  ...
);
2019-09-03 14:18:39 +01:00
Rahul Behl
9b51b1143a CSR: Access checks on Debug CSRs
- The RISC-V Debug Spec v.0.13.2 (p.41) mandates that the core
    debug CSRs dcsr, dpc, dscratch0 and dscratch1 must not be
    accessible if not in debug mode. Fixes #275
2019-09-03 12:14:49 +01:00
Tom Roberts
892ad8a621 [RTL] - Add PMP module
- Instantiate generic PMP module
- Wire up I-side and D-side PMP faults
- The output of the PMP check is used to gate external bus requests from the
  I-side and LSU
- Each of those units progresses with their request as-if it was granted
  externally and registers the PMP error
- The error is then sent to the controller at the appropriate time to trigger
  an exception
2019-08-29 17:43:37 +01:00
Pirmin Vogel
6ecf83124a Register file: update comments
This commit updates the comments inside the latch-based register file.
Some of them were outdated or just wrong.
2019-08-29 15:24:18 +01:00