Commit graph

1097 commits

Author SHA1 Message Date
udinator
2421472395
Integrate risc-v stream generator handshake into Ibex sim flow (#264) 2019-08-26 15:18:30 -07:00
udinator
ce8be4f2fd
Update google_riscv-dv to google/riscv-dv@faddfa4 (#263)
Update code from upstream repository https://github.com/google/riscv-
dv to revision faddfa49f456f3f8ef8c4231865994b7b13aa96d

* Obsolete test clean up (Tao Liu)
* Remove the old flow (Tao Liu)
* minor fix, update README for A extension support (Tao Liu)
* Add basic atomic instruction test (Tao Liu)
* Add RV32A/RV64A instructions (google/riscv-dv#95) (Tao Liu)
* Fix the missing GPR save operations for exception handling (Tao Liu)
* Generate handshake sequence to communicate with testbench (Udi)
* Fix compare error (Tao Liu)
* Fix compare error (Tao Liu)
* Initial signature enum for handshake protocol (Udi)
2019-08-26 11:41:37 -07:00
Felix Yan
5d1f8e16bc Correct a typo in doc/verification.rst 2019-08-23 09:02:06 +01:00
Philipp Wagner
399f0b7e77 Update documentation how to run riscv-compliance
Upstream has now included ibex support, we don't need to use a custom
fork any more. Update the documentation for that.

Fixes #214
2019-08-22 23:27:13 +01:00
Philipp Wagner
cfb6fc4963 CI: Run the compliance tests for all ISA variants
rv32imc doesn't include all i and m tests, we need to call the test
suite on these extensions separately.
2019-08-22 23:27:13 +01:00
taoliug
e2b9c17c0b
Update google_riscv-dv to e81acc9 (#257)
Update code from upstream repository https://github.com/google/riscv-
dv to revision e81acc9ab4f692ff205a207c2dc3d9f2b0284d39

* Merge pull request #89 from google/dev (taoliug)
* Fix mtvec alignement (Tao Liu)
2019-08-21 18:22:58 -07:00
taoliug
03df591266
Make mtvec writable, remove previous workaround (#256) 2019-08-21 18:16:51 -07:00
taoliug
2601e8d898
Test cleanup (#255) 2019-08-21 17:19:16 -07:00
taoliug
a752277247
Update google_riscv-dv to 73274f2 (#254)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 73274f227000f1316cb201a8503aad437e427948

* Merge pull request #88 from google/dev (taoliug)
* Fix spike log processing issue (Tao Liu)
* Merge pull request #87 from google/dev (udinator)
* Add vectored interrupt support (Tao Liu)
* Merge pull request #85 from udinator/debug (udinator)
* Add debug sub-programs, and extra options to generator (Udi)
* Merge pull request #84 from imphil/fix-apache-urls (taoliug)
* Fix license URLs in comments (Philipp Wagner)
2019-08-21 17:14:15 -07:00
udinator
9311b25fdb
Consolidate some debug generation options, and make the signature_addr handshake optional (#253) 2019-08-21 11:00:17 -07:00
udinator
3bc83365ef
Add more debug tests (#251) 2019-08-20 11:03:15 -07:00
Pirmin Vogel
221e46d0ea src_files.yml: Add ibex_core_tracing.sv
This file is needed when using the tracer.
2019-08-20 15:29:53 +01:00
Pirmin Vogel
501cc2bb62 ram_1p.sv: Fix rvalid_o generation
This signal must also be set in case of write transactions as it is
a request valid and not a read valid.
2019-08-20 14:59:28 +01:00
Ivan Ribeiro
2a47344dd1 Remove unused signal data_reg_offset 2019-08-20 14:45:47 +01:00
Philipp Wagner
e97931c8c7 Add Azure Pipelines build badge to README.md
This badge shows if our CI builds/tests complete successfully.
2019-08-19 17:26:09 +02:00
Philipp Wagner
78c16f90e9 CI: Use Azure Pipelines to run lint and some DV
This sets up Azure Pipelines to run the following two tasks:

- Run Verilator lint on the SystemVerilog code.
- Run the RISC-V compliance test suite for RV32IMC
2019-08-19 17:26:09 +02:00
udinator
6ccd2b698d Update google_riscv-dv to google/riscv-dv@7cce16c (#246)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 7cce16c0a212c8713a82516fbf8f2570d3dc4505

* Update spike log processing script to include full trace information
  (Tao Liu)
* Add new tests (Tao Liu)
* Add basic debug test functionality (Udi)
* fix spelling error, fix output directory arg (Udi)
* Add shorten option (dang hai)
* Support SAIL-RISCV ISSi, update README (Tao Liu)
* Fix CSR map copy issue (Tao Liu)
2019-08-16 09:43:27 -07:00
Pirmin Vogel
e1a7dcf37f ID stage: rework CSR-related pipeline flushes
This commit clarifies why CSR-related pipeline flushes are needed
(e.g. when enabling interrupts), only introduces them when doing the
critical modifications (write/set bits in `mstatus` and `mie` CSRs
for enabling interrupts, reads and clears are uncritical for these
CSRs), and makes sure the controller is actually able to start
handling interrupts while doing a CSR-related pipeline flush.

This resolves lowrisc/ibex#6.
2019-08-16 13:28:52 +01:00
Pirmin Vogel
396d6fa68a Adapt Verilator lint waiver
This commit updates some line numbers in the Verilator lint waiver file.
2019-08-16 12:58:34 +01:00
udinator
e4260dd075
Add basic debug test and modify sim flow (#243) 2019-08-15 11:18:07 -07:00
taoliug
0e91a30496 [DV] Enable aligned load/store test (#242)
* Add unaligned load/store test

* Enable unaligned load/store test, remove obsolete files
2019-08-14 17:41:13 -07:00
taoliug
7eecbd1b05
Update google_riscv-dv to 63fa0ca (#241)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 63fa0ca922ecf10f3cd733d15a0a79a7937a591e

* Merge pull request #74 from google/dev (taoliug)
* Add gcc compile options, fix unaligned load/store (Tao Liu)
* Merge pull request #72 from google/dev (taoliug)
* Properly disable branch instruction in push/pop stack operations
  (Tao Liu)
2019-08-14 17:16:44 -07:00
udinator
e087e32490 Update google_riscv-dv to google/riscv-dv@07599f6 (#240)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 07599f689a385794cb73932922008bdbe8131d82

* Fix introduced TypeError in run.py (Udi)
2019-08-13 15:03:12 -07:00
taoliug
9309621f04 Fix the verbose logging issue, fix coverage/waveform options (#235) 2019-08-13 10:23:07 -07:00
udinator
97105f42b1 Update google_riscv-dv to google/riscv-dv@e905e9f (#234)
Update code from upstream repository https://github.com/google/riscv-
dv to revision e905e9f134e0b7cf7da491218d1a30c75ce8649a

* add pass_val and fail_val into csr test flow for EOT correctness
  checking (Udi)
* Support unaligned load/store (Tao Liu)
* refactored test generation logic (Udi)
* refactored test generation logic (Udi)
* Give error when mutually exclusive between -co, and -so argument
  (dang hai)
* documentation, and small fixes (Udi)
* no_iss bug (Udi)
* no_iss/no_post_compare optional, CSR read_only is now only specified
  at field level granularity (Udi)
* made no_iss optional (Udi)
* rm print (Udi)
* setup_logging call (Udi)
* undo overriding --verbose in run.py, comment cleanup in csr gen
  script (Udi)
* missed verbose arguments (Udi)
* verbose arg (Udi)
* updated csr description, integrated csr test into flow (Udi)
* updated csr description, integrated csr test into flow (Udi)
* Enhance verbose information by logging instead of using print (dang
  hai)
* Report date time for output directory (dang hai)
* Add main entry point for run.py (dang hai)
* Separate command line parser by function (dang hai)
* Skip generating S/U mode program for machine mode test (Tao Liu)
* minor update to README.md (Tao Liu)
* Update the README.md to match command reference from --help (Tao
  Liu)
* Ignore untrack file from python script (dang hai)
* Make questa work for new YAML based regression flow (dang hai)
* Fix typo in README (Tao Liu)
* Fix README google/riscv-dv#54 (Tao Liu)
* changed formatting of generator option table (Udi)
2019-08-12 16:22:07 -07:00
udinator
9a231c9ba6
update ibex testbench (#232) 2019-08-12 13:14:07 -07:00
udinator
27bd4e73d9 update ibex simulation flow (#233) 2019-08-09 15:49:46 -07:00
Tom Roberts
44b033cf8b [rtl] Add support for instruction fetch errors
- Add required signals to top-level
- Propagate error through fetch stages
- Add new exception type
- Update documentation for new exception type
- Resolves issue #109
2019-08-09 10:44:37 +01:00
Pirmin Vogel
ca97cfb58e CSRs: add irq_ prefix to Interrupts_t members
This commit adds a prefix to the members of the `Interrupts_t` struct
to avoid linting errors in AMS mode.
2019-08-09 09:45:22 +01:00
taoliug
48f77c6a2c
Fix broken links in the verification doc (#230) 2019-08-08 10:22:54 -07:00
Ivan Ribeiro
19ffe9ac1d Make BASE field of mtvec CSR writeable
This commit makes the BASE field of the `mtvec` CSR writable to
allow changing the trap-vector base address at runtime without
changing the boot address input. Similar to the boot address,
the trap-vector base address must always be aligned to 256 bytes.
At bootup, the trap-vector base address is initialized to the boot
address.

This commit resolves lowrisc/ibex#118.

Most of this work has been done by @ivanmgribeiro as part of
lowrisc/ibex#193.
2019-08-08 10:50:34 +01:00
Pirmin Vogel
bf78a88e9e Fix linting warning 2019-08-08 09:21:30 +01:00
Pirmin Vogel
47edb43889 Doc: correct description of reset input 2019-08-07 17:12:22 +01:00
Pirmin Vogel
ea0296d74a Fix IF stalls preventing deassertion of regfile write enable (#222)
* ID stage: make single-cycle instr clear `instr_multicycle_done_q`

Previously, this signal was only cleared when starting the next
multi-cycle instruction.

* ID stage: only eval `instr_multicycle_done_q` for multi-cycle instr

This signal should only be evaluated if the ID/EX stage currently
executes a multi-cycle instruction. Without this commit, the signal
is also evaluated for single-cycle instructions and can for example
cause the register file write enable to not be de-asserted in case of
stalls in the IF stage.

This bug was repored by @udinator. This resolves lowrisc/ibex#216.
2019-08-06 09:04:57 -07:00
Philipp Wagner
e5bdf1ea9f Document register map of compliance test system 2019-08-06 11:48:50 +01:00
taoliug
50f8cbd463 Fix waveform/coverage dump mode (#215) 2019-08-05 14:42:00 -07:00
Philipp Wagner
24a9c64bf1 Add simulation for RISC-V compliance testing
This adds a Verilator simulation of Ibex for use in RISC-V Compliance
Testing. In addition to ibex itself, the simulation contains a RAM and
a memory-mapped helper module for the test software to interact with the
outside world. The test framework uses this to dump a "test signature",
which is written to a certain part of the memory, and to end the
simulation. (In the future, this could be extended to include printf()
like functionality.)
2019-08-05 15:49:15 +01:00
Philipp Wagner
b72f5db6bd DV: Add verilator simulation utility 2019-08-05 15:49:15 +01:00
Philipp Wagner
677153f549 Setup Verilator lint and waivers
This adds Verilator lint support to our fusesoc core file. A waiver file
is created to waive all well-understood lint warnings. The UNOPTFLAT
warnings are not well understood at the moment, they are waived for now
and further discussion is expected to happen in a GH issue (referenced
in the waiver).

Run with

```
fusesoc --cores-root . run --target=lint lowrisc:ibex:ibex_core
```

The waiver file support requires edalize >= 0.1.5.
2019-08-05 15:36:55 +01:00
Philipp Wagner
3c5e998445 Document specifications we aim to support
Fixes #124
2019-08-05 11:34:14 +01:00
Rhys Thomas
187f6c9c6f Fixed broken URL in readme. 2019-08-05 10:42:39 +01:00
taoliug
54fac2954a
Move DV README.md to doc/verification.rst (#208) 2019-08-02 15:05:02 -07:00
taoliug
584ceda381 Add README.md for the DV flow (#207) 2019-08-02 13:45:33 -07:00
taoliug
463f518424 Integrate with new end-to-end simulation (#206) 2019-08-02 08:31:12 -07:00
taoliug
ba5c63b8d1 Update google_riscv-dv to a07e0a7 (#203)
Update code from upstream repository https://github.com/google/riscv-
dv to revision a07e0a726edf0230314c08d31546eecbed23054b

* Merge pull request #53 from google/flow (taoliug)
* Update README file for the new flow (Tao Liu)
* Merge pull request #52 from google/flow (taoliug)
* Add timeout mechanism to the flow (Tao Liu)
* Merge pull request #51 from google/flow (taoliug)
* Simulation flow update (Tao Liu)
* Merge pull request #50 from udinator/master (taoliug)
* added license for csr_template.yaml (Udi)
* Merge pull request #49 from google/dev (taoliug)
* Update log process script (Tao Liu)
* Merge pull request #48 from google/dev (taoliug)
* Fix illegal instruction issue (Tao Liu)
* Merge pull request #47 from google/dev (taoliug)
* Refactor the simulation flow (Tao Liu)
* Merge pull request #45 from danghai/master (taoliug)
* Add .gitignore to remove untracked files (danghai)
* Fix warning from Questa optmize (danghai)
* Add optimize log file for Questa simulator (danghai)
* New YAML based simulation flow (Tao Liu)
* Merge pull request #40 from scottj97/typos-redone (taoliug)
* Fix typos in comments (Scott Johnson)
* Fix typos/grammar in README (Scott Johnson)
* Merge pull request #43 from udinator/master (taoliug)
* use hex format in YAML description (Udi)
* CSR test description (Udi)
* removed run script (Udi)
* Modified CSR test generation code to adhere to style guidelines.
  (Udi)
* Merge pull request #41 from vandanaprabhu/questa (taoliug)
* CSR Generation Script and YAML template (Udi)
* Prevent Xcelium from attempting to run a simulation during the
  compile step (Scott Johnson)
* Document support for Questa (Scott Johnson)
* Fix simulation-time warnings from Mentor Questa (Scott Johnson)
* Fix compile warnings from Mentor Questa (Scott Johnson)
* Fix warning from Questa compiler (Scott Johnson)
* Fix warning from Questa compiler (Scott Johnson)
* Adding support for using the Questa simulator (Vandana Prabhu)
* Pass proper seed to Cadence Xcelium simulator (Scott Johnson)
* Convert compile commands to functions instead of variables (Scott
  Johnson)
2019-08-01 09:53:26 -07:00
Rahul Behl
76ac3ef658 Updates to the sim timescale option
- Updated the timescale option to not include "=" in between the
    timescale directive and the value passed. See #181 for further
    details
2019-07-29 16:00:35 +01:00
Pirmin Vogel
cee2e9396f Remove csr_restore_dret_i signal
This signal was used to restore `mstatus` when executing DRET.
But this is not needed as `mstatus` is not modified when entering
debug mode.
2019-07-29 15:55:48 +01:00
Pirmin Vogel
964e62afee CSRs: remove `define for mstatus CSR handling 2019-07-29 15:55:48 +01:00
Pirmin Vogel
a7f344b02a Avoid linting errors 2019-07-29 15:52:42 +01:00
Pirmin Vogel
6d72aebc16 Correct cause number for illegal instruction exception
This bug has beed reported by @taoliug. This resolves #195.
2019-07-26 11:38:09 +01:00