Commit graph

1306 commits

Author SHA1 Message Date
udinator
a28bcfa485
[DV] Fix TB read responses (#531)
Signed-off-by: Udi <udij@google.com>
2019-12-18 10:53:29 -08:00
udinator
45e7522d1a
Update google_riscv-dv to google/riscv-dv@9ecee87 (#530)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 9ecee87bbc41650ca0f8846de9a277bec2783e18

* fix mmu_stress_test generation failure (Udi Jonnalagadda)

Signed-off-by: Udi <udij@google.com>
2019-12-18 10:46:36 -08:00
udinator
5c07ced1e3
Update google_riscv-dv to google/riscv-dv@74b8cb6 (#529)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 74b8cb65838f575d6e59e1c80a145d305fbca381

* fix ebreak generation in debug ROM (Udi Jonnalagadda)
* enable nested traps (Udi Jonnalagadda)

Signed-off-by: Udi <udij@google.com>
2019-12-17 10:54:38 -08:00
udinator
7fef1b5afc
[DV] fix incorrect irq_seq handle name (#525)
Signed-off-by: Udi <udij@google.com>
2019-12-16 16:18:47 -08:00
udinator
74e8c3fec6
[DV] update MISA csr yaml description (#513) 2019-12-16 13:39:00 -08:00
udinator
5d66a865cd
[DV] Enable sending multiple interrupts at once (#519) 2019-12-16 13:15:12 -08:00
udinator
c246a2aeb9
[DV] update override to riscv_asm_program gen in Makefile (#520) 2019-12-16 13:13:59 -08:00
Greg Chadwick
328aabb548 [RTL] Only restore from mstack in nmi mode
Fixes #492
2019-12-16 19:51:22 +00:00
udinator
0d6ccbf1f6
Update google_riscv-dv to google/riscv-dv@5b1dd4e (#523)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 5b1dd4e2eb11d49d3275da80953efc0c50f90447

* Add compliance mode to coverage model (google/riscv-dv#361)
  (taoliug)
* Revert " Make assign_operand become a method of class
  RiscvInstructionTraceEntry  (google/riscv-dv#357)" (google/riscv-
  dv#360) (taoliug)
* Fix script issue (google/riscv-dv#358) (taoliug)
*  Make assign_operand become a method of class
  RiscvInstructionTraceEntry  (google/riscv-dv#357) (Hai Hoang Dang)
* Remove unused variable (google/riscv-dv#348) (Hai Hoang Dang)
* Functional coverage improvement (google/riscv-dv#356) (taoliug)
* Fix list access exception thrown when parsing ovpsim illegal
  instruction (Udi Jonnalagadda)
* Add compliance mode and RTL mode to the coverage model
  (google/riscv-dv#354) (taoliug)
* Fix lr/sc sequence (google/riscv-dv#353) (taoliug)
* Fix minor illegal instruction issue (google/riscv-dv#351) (taoliug)
* Migrate to new instruction class (google/riscv-dv#350) (taoliug)
* misc issue fixes (google/riscv-dv#349) (taoliug)
* Update README to add contact info for the collaboration request
  (google/riscv-dv#347) (taoliug)
* Support running specific multiple tests (google/riscv-dv#346) (Hai
  Hoang Dang)
* Fix rv64 coverage model issue (google/riscv-dv#344) (taoliug)
* Fix the link for yaml/base_testlist.yaml (google/riscv-dv#343) (Hai
  Hoang Dang)
* refactor debug ROM generation (Udi Jonnalagadda)
* Add a runtime option to run with experimental features
  (google/riscv-dv#341) (taoliug)
* Fix a few issues with the new instruction class (google/riscv-
  dv#340) (taoliug)
* Improve performance of new experimental instruction class
  (google/riscv-dv#339) (taoliug)
* Fix CSR randomization bug when generating loops (google/riscv-
  dv#337) (udinator)
* Add support coverage flow for qrun, and minor fix for cov.py
  (google/riscv-dv#335) (Hai Hoang Dang)
* [ovpsim] Coding style fixes, fix floating point compare mismatch
  (google/riscv-dv#334) (taoliug)
* Fix ius flow issue (google/riscv-dv#333) (taoliug)
* Fix a few new instruction class issues (google/riscv-dv#332)
  (taoliug)
* Added two includes and starting variables for adding bitmanip
  extension (google/riscv-dv#328) (simond-imperas)
* Integrate experimental instruction class (google/riscv-dv#331)
  (taoliug)
* Minor fixes to run.py (google/riscv-dv#330) (taoliug)
* Run.py: minor refactor the code for compile, and simulate
  (google/riscv-dv#326) (Hai Hoang Dang)
* Add requirements for install dependencies (google/riscv-dv#325) (Hai
  Hoang Dang)
* Adding support qrun simulator (google/riscv-dv#324) (Hai Hoang Dang)
* Add new experimental instruction class (google/riscv-dv#323)
  (taoliug)
* Added command line control of coverage and added hooks for vector
  coverage development (google/riscv-dv#317) (simond-imperas)
* Fix compilation issue (google/riscv-dv#322) (taoliug)

Signed-off-by: Udi <udij@google.com>
2019-12-16 11:47:53 -08:00
udinator
8568e6b3b5 [DV] add support_unaligned_load_store setting (#521)
Signed-off-by: Udi <udij@google.com>
2019-12-13 13:44:18 -08:00
udinator
f23b3f39fa
[DV] Fix xRET wait checks (#515)
Signed-off-by: Udi <udij@google.com>
2019-12-12 11:28:16 -08:00
Tom Roberts
b2bbe50704 [doc] Add a comment on mhpmcounter optimization
- fixes #473

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2019-12-11 15:02:29 +00:00
Tom Roberts
088cd11593 [dbg] Add minimal hardware breakpoint support
- Add the minimum amount of trigger system to support GDB hbreak
- Only a single trigger is implemented
- Only instruction address matching
- Only break into debug mode (no native debug)
- Fixes #382

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2019-12-11 15:02:06 +00:00
Tobias Wölfel
cd39a31498 [verilator] Clarify ELF BSS handling
Add a requirement for the software loaded by the simulator for zero-ing
the BSS section.

Fixes lowRISC/ibex#496
2019-12-04 19:42:11 -05:00
Tobias Wölfel
6793dc0550 [examples] Fix spelling for description type 2019-12-04 13:59:46 +00:00
Tom Roberts
0f4e802b20 [csr] Add U Mode support to misa 2019-12-04 13:28:54 +00:00
Taras Dulibianyk
50682bd314 RTL simulation scripts for Cadence tool was added 2019-12-04 07:32:27 +00:00
Mehrdad Biglari
cead186836 Add Synopsys VCS Support for Ibex Simple System
Add VCS to core description. Add stimuli. Fix compile error for assigmnet from multiple blocks.
2019-12-03 16:41:26 +00:00
Taras Dulibianyk
9c981b198e Pluseargs parsing was corrected 2019-12-03 16:23:50 +00:00
Tom Roberts
4a3abee9b2 [ci] Add CS registers TB to CI
Add a return code to TB which Verilator sims can check
Build and run TB, checking for failures

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2019-12-03 15:38:56 +00:00
Tobias Wölfel
43268b7604 [examples] Add fstream header
The fstream header is needed for `ofstream()` in ibex_simple_system.
2019-12-02 13:20:49 +01:00
Philipp Wagner
82e0faf50b Make VerilatorSimCtrl class a singleton
The VerilatorSimCtrl class was always intended to be used only once in
an application, since it sets up a global signal handler and needs to be
accessible from DPI modules. This accessibility was achieved through a
global variable `simctrl`.

With this commit the VerilatorSimCtrl is switched to a singleton class.
The instance is accessible through `VerilatorSimCtrl::GetInstance()`.
The downside of that approach is that we loose the constructor
arguments, and need to deal with a class which potentially hasn't top or
the clock and reset signals set.
2019-12-02 10:57:24 +00:00
Philipp Wagner
afdee5c596 ibex_simple_system: Remove unused includes 2019-12-02 10:32:16 +00:00
Nils Graf
260ed5a98c [syn] Add initial Yosys synthesis script with example lib
This PR includes the following:
- add script syn_yosys.sh, which runs sv2v and yosys for ibex_core
- add example std. cell lib cmos_cells.lib (copied from yosys repo)
- add dummy prim_clock_gating.v module
- add initial yosys synthesis script syn.ys
2019-11-29 17:03:44 +00:00
Philipp Wagner
71a635ec6b Reverse return code of simutil_verilator_set_mem()
All functions in simutil_verilator return booleans to indicate
success/failure, where 1 == true, and 0 == false.
simutil_verilator_set_mem() returns an int due to DPI interface
restrictions. Before, 0 meant success, and 1 meant error.

To keep things nice and consistent, turn things around and align with
the bool meaning.
2019-11-28 18:45:11 +00:00
Tobias Wölfel
ce7e38351e [DV] Add Verilator memory initialization from ELF
Support initialization of memory by loading content from ELF files.
All segments of the ELF file with the type `PT_LOAD` are merged into a
temporary buffer and then forwarded to a predefined memory.
This is an addition for setting the memories with VMEM files.

Memories must implement `simutil_verilator_set_mem` to support the
setting of values with a width of 32 bits. A return value of 0 must
indicate a successful operation and 1 an error.

Memories are defined by a call to `RegisterMemoryArea()` before the
execution of the simulation, at which point the arguments are parsed and
the initialization is started. The memories are identified by unique
name. The design specific location is used to set the SystemVerilog
scope.

Registered memories can be printed by using `-l list`. The unique name
is used for `-l name,file.elf` together with the file path.
An optional part of the argument is the type of the file, `elf` or
`vmem`, and if not provided it is attempted to detect the type by
looking at the file extension.
The memory specific arguments which already existed accept now also ELF
files. They use predefined names and are included to keep the interface
stable.

Contents of an ELF segment which has a bigger memory size than file size
are not set. This is typically required for BSS sections for zero-ing
the memory.
2019-11-27 11:35:07 +00:00
Greg Chadwick
11749c7e4d [rtl] Implement FENCE.I
Fixes #391
2019-11-27 08:47:26 +00:00
Tobias Wölfel
e5ee5fa81a [make] Add CS Register testbench targets
New targets to build and run the testbench.
Minor cleanup for parallel make runs.
2019-11-26 15:02:37 +01:00
Tobias Wölfel
845c9aa38c Update gitignore to include simple system files 2019-11-25 14:13:17 +01:00
Tobias Wölfel
bbca883c25 Update gitignore for tag file 2019-11-25 14:13:17 +01:00
udinator
bb7acbdb7a
Update google_riscv-dv to google/riscv-dv@d691906 (#491)
Update code from upstream repository https://github.com/google/riscv-
dv to revision d69190682078470bc6d5661d72f873ae9850ae53

* enable CSR randomization only for csr instructions (google/riscv-
  dv#321) (udinator)
* fix csr test script pathname (Udi Jonnalagadda)

Signed-off-by: Udi <udij@google.com>
2019-11-22 10:17:24 -08:00
udinator
1a2270ce40
[DV] streamline Makefile gen flow (#488)
Signed-off-by: Udi <udij@google.com>
2019-11-21 16:51:41 -08:00
udinator
1040d5e7e9 [DV] Update flow to match RISCV-DV changes (#487)
Signed-off-by: Udi <udij@google.com>
2019-11-21 16:22:49 -08:00
udinator
6a582cc11f
Update google_riscv-dv to google/riscv-dv@39ca859 (#486)
Update code from upstream repository https://github.com/google/riscv-
dv to revision 39ca85903eea94350d3a610256307346da407e5b

* Add directed stream to access higher privilege CSRs (google/riscv-
  dv#316) (udinator)
* add config knob for mstatus.tw (Udi Jonnalagadda)
* Fix ovpsim floating point instruction parsing issue (google/riscv-
  dv#313) (taoliug)
* Fix SATP configure issue (google/riscv-dv#312) (taoliug)
* Support import testlist (google/riscv-dv#311) (taoliug)
* Add a rand address load/store test (google/riscv-dv#310) (taoliug)
* Fix ovpsim log parsing issue (google/riscv-dv#309) (taoliug)
* Add a generic approach to check command return value (google/riscv-
  dv#308) (taoliug)
* Fix compile issue (google/riscv-dv#307) (taoliug)
* Basic U-mode support (Udi Jonnalagadda)

Signed-off-by: Udi <udij@google.com>
2019-11-21 11:22:34 -08:00
udinator
2a01d1ce4c [DV] Test accesses to higher privileged CSRs (#483)
Signed-off-by: Udi <udij@google.com>
2019-11-21 11:18:39 -08:00
Tom Roberts
0b87370ee0 [dv] Prepare CS registers TB for CI
- Switch from Makefile calling fusesoc to fusesoc calling Makefile
- Pass parameters through DPI rather than as env variables

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2019-11-21 09:55:40 +00:00
Tobias Wölfel
a264ee6e7f [make] Add Makefile for common tasks
Instead of copying the commands from the documentation or using the
shell history to find the commands use a Makefile as a convenience to
run some common tasks.
A shell's completion system can make use of the targets and provide tab
completion.
2019-11-20 12:12:06 +01:00
Pirmin Vogel
99a12ff6d5 [doc] Update mhartid CSR description
This commit removes outdated bit-field descriptions for `mhartid` CSR.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2019-11-19 15:15:42 +01:00
Pirmin Vogel
46608d9f76 [doc] Document debug CSRs
This resolves lowRISC/ibex#307.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2019-11-19 15:15:42 +01:00
Pirmin Vogel
d117b24a17 [rtl] Do not update CSRs upon exceptions in debug mode
In debug mode, exceptions shall not update any CSRs including `mcause`,
`mepc`, `mtval`, `dpc` and `mstatus`, see Debug Spec v0.13.2, p.39.

This resolves lowRISC/ibex#168.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2019-11-19 15:15:42 +01:00
udinator
8112ba5a24
[DV] umode_tw test (#481)
Signed-off-by: Udi <udij@google.com>
2019-11-18 13:43:02 -08:00
Tobias Wölfel
21f2a842d8 [DV] Add exit check for setup call
Check the return value and exit program execution.
2019-11-18 12:31:38 +01:00
Philipp Wagner
7465a68615 Fix typo in comment 2019-11-18 10:30:14 +00:00
Tom Roberts
88158e6fa8 [csr tb] Declare registers as a macro list
All CSR addresses supported by the TB are now delared as an X
macro list. This list is then used to autogenerate the enum
type, string print helper and an array of all addresses.

The array of addresses can now be used by the randomize generator
to turn an arbitrary integer index into an address. This removes
the restriction on only generating contiguous address ranges noted
in #443.

Add missing signal csr_restore_dtret_i

Signed-off-by: Tom Roberts <tomroberts@lowrisc.org>
2019-11-18 09:16:42 +00:00
Pirmin Vogel
40d6368983 [dv] Remove clock gating primitive in dv/uvm/tb
This commit removes a copy of the dummy clock gating primitive from
tree previously used for UVM-based DV. There is another, identical copy
of the same primitive in `shared/rtl` that can be used instead.

This resolves lowRISC/ibex#213.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2019-11-16 00:25:32 +01:00
Pirmin Vogel
aefbcdceb3 [rtl] Add new assertions
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2019-11-15 10:23:03 +01:00
Pirmin Vogel
40e3db5f23 [rtl] Rework assertions
This commit modifies the assertions to not fire as long as the reset
is active. Also, it updates some assertions.

This resolves lowRISC/ibex#274.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
2019-11-15 10:23:03 +01:00
udinator
c05634cfdf
[DV] Enable user-mode in DV environment, add basic tests (#471)
Signed-off-by: Udi <udij@google.com>
2019-11-14 16:11:32 -08:00
Tobias Wölfel
103b7357f0 Update fusesoc usage 2019-11-14 13:20:19 +01:00
Tobias Wölfel
76f6a3d4c3 Use shared code for Arty A7-100T example
Move Xilinx specific code into shared folder so it can be re-used by
different examples.
Use the shared RAM code and make use of byte enable signal.
Fixes lowrisc/ibex#144
2019-11-14 13:20:19 +01:00