Commit graph

323 commits

Author SHA1 Message Date
Michael Schaffner
0292852fae Fix lint warnings 2019-06-04 10:36:17 +02:00
Jonathan Richard Robert Kimmitt
957ba3adaf Remove duplicated interface aliases 2019-06-04 10:36:17 +02:00
Michael Schaffner
fca6a7738c Add ifndef VERILATOR in instruction tracer files 2019-06-04 10:36:17 +02:00
Michael Schaffner
1c4940f4cd Scoreboard refactoring for better timing 2019-06-04 10:36:17 +02:00
Florian Zaruba
a868829d57 synthesis: Fix problems with Synopsys DC 2019-06-04 10:36:17 +02:00
Florian Zaruba
93e27812c7 csr_file: Fix propper setting of sd flag 2019-06-04 10:36:17 +02:00
msfschaffner
c02597c2ff fpu: Bump submodule (#232) 2019-06-04 10:36:17 +02:00
Florian Zaruba
830540b757 frontend: Clean-up instruction frontend
The instuction frontend has become an increasingly messy part an needed
cleaning-up. The current solution contains 2 x 32 bit instruction data
fifos and 1 x 64 bit address fifo. Hence, it should be significantly
more area efficient that the previous one. The interface to `id_stage`
is a ready/valid handshake. The credit based system has been replaced in
favour of a replay mechanism as it was very brittle and overly
pessimistic.

Branch-prediction has been cleaned up: The front-end was also partially
predicting on jumps, this could have potentially let to performance bugs
if the branch detection wasn't correct in the frontend.
2019-06-04 10:36:17 +02:00
Florian Zaruba
6902d2e53b btb: Remove clear flag
In anticipation of cleaning up the branch-prediction a clear flag is no
longer needed. We know at prediction time whether the instruction is a
branch or not. This makes the effect of aliasing very unlikely.
2019-06-04 10:36:17 +02:00
Florian Zaruba
1ebca456ad ariane: Replace branchpredict_t with bp_resolve_t
The new name better captures the meaning of the signal.
2019-06-04 10:36:17 +02:00
Michael Schaffner
d30369da8a fpu: Add distributed pipe regs to ease FPGA timing 2019-06-04 10:36:17 +02:00
Florian Zaruba
43d8bf3765 commit_log: Align compressed encoding to Spike 2019-06-04 10:36:17 +02:00
Michael Schaffner
720910dad0 🎨 Beautify 2019-06-04 10:36:17 +02:00
Michael Schaffner
63021b9d4f Adds cacheable region rules to the configuration script, modify instruction traces such that it can be used with VCS 2019-06-04 10:36:17 +02:00
Florian Zaruba
e4cbe7f7c1 perf_counters: Fix bug in address encoding
The performance counters were accessible in user mode although
`mcounteren` or `scounteren` are not implemented. This commit moves the
writeable performance counters to machine mode. Access from
user/supervisor-space will trap as this is not implemented in Ariane.
2019-06-04 10:36:17 +02:00
Florian Zaruba
785dfc205f config_system: Switch from mask to length 2019-06-04 10:36:17 +02:00
Florian Zaruba
08374fb402 pma: Check for execute flag on instruction access
When speculation is on it can happen that the core is trying to fetch
from a wrong, speculated address. Depending on the SoC this can cause
lock-ups. Solution until now was to flush all branchprediction which is
quite costly in terms of performance. This commit fixes this and lets
the `frontend` check whether the access is actually legal.
2019-06-04 10:36:17 +02:00
Florian Zaruba
ddbc23819a config_system: Add new config system using structs
The "old" config system is quite rigid in terms of user
parameterization. To avoid adding more and more generics to the
parameter port I've packaged the parameters to use a single struct
`ariane_cfg_t` which can then be passed to all submodules in need of the
parameter value.

We can slowly transition to this new system. One drawback is the missing
capability to calculate parameters based on other parameters. Functions
would be needed to do so. Or, imho, the better approach would be a
Python script which generates the appropriate parameters.
2019-06-04 10:36:17 +02:00
Florian Zaruba
1fa1489512 debug_req: Move request association to id_stage
The `debug_req_i` signal is associated to a new exception value which is
in the private reserved space of RISC-V. So it should never collide with
future exception values, although this should be transparent to software
anyway.  Furthermore this patch makes the atomic commit logic simpler as
we are not getting any unexpected exceptions past the `id_stage`.

This patch is in preparation to fixing speculative reads to I/O regions.
2019-06-04 10:36:17 +02:00
Florian Zaruba
ab2b75a3ff irq_subsystem: Move interrupts to id_stage
This make execution more deterministic as we can decide early
whether the remaining pipeline is speculative or not. Furthermore it
removes a couple of logic gates during commit and clean-s up the tight
integration between `commit_stage` and `csr_regfile` which often lead
to combinational loops.

This patch is in preparation to fixing speculative reads to I/O regions.
2019-06-04 10:36:17 +02:00
Florian Zaruba
5eed9ef91d Move AXI Id widths to SoC package 2019-03-18 11:51:58 +01:00
Florian Zaruba
ad223cfd9f Clean-up naming to distinguish OP from GP Ariane (#193)
* Clean-up naming to distinguish  OP from GP Ariane

* Rename wb to wt in hidden CI files

* Fix verilator install script
2019-03-18 11:51:58 +01:00
Florian Zaruba
a5f3184a65 Improve Tandem Simulation, switch-able caches and fix a cache-bug (#192)
* Add spike isa sim

* Fix AMO problem in verilator

* 🎨 Tidy up FPU wrapper

* Bump axi_exclusive submodule

* Refactor serpent AXI adapter, bump dbg and atomics submodules, add separate bootrom for linux on OpenPiton (#190)

* Refactor serpent AXI adapter

* Disable FPU in OpenPiton by default

* Bump dbg and atomics submodules

* Fix cache testbenches (interface change)

* FPGA bootrom changes for OpenPiton SDHC

* Introduce two bootroms, one for baremetal apps (pitonstream), and one for linux boot from SD

* Testing barrier-based synchronisation instead of CLINT-based

* This bootrom works for 2 core on g2 and if you change MAX_HARTS to 4, then 4 cores on vc707

* Add MAX_HARTS switch to makefile

* Fix gitlab CI

* Revert standard FPGA bootrom

* Update Flist

* Make UART_FREQ a parameter

* Fix typo in tb.list and an error in define switch in ariane_pkg

* Copy over SD-driver in bootloader from @leon575777642

* Fix compilation issues of bootrom

* Change signal name in serpent periph portlist

* Correct generate statement in serpent dcache memory

* Add Piton SD Controller, FPGA fixes

* Fix race condition in dcache misshandler

* Add tandem spike to Make flow

* Remove OpenPiton SD Card controller again
2019-03-18 11:51:58 +01:00
msfschaffner
0ffef2ae1a Refactor serpent AXI adapter, bump dbg and atomics submodules, add separate bootrom for linux on OpenPiton (#190)
* Refactor serpent AXI adapter

* Disable FPU in OpenPiton by default

* Bump dbg and atomics submodules

* Fix cache testbenches (interface change)

* FPGA bootrom changes for OpenPiton SDHC

* Introduce two bootroms, one for baremetal apps (pitonstream), and one for linux boot from SD

* Testing barrier-based synchronisation instead of CLINT-based

* This bootrom works for 2 core on g2 and if you change MAX_HARTS to 4, then 4 cores on vc707

* Add MAX_HARTS switch to makefile

* Fix gitlab CI

* Revert standard FPGA bootrom

* Update Flist

* Make UART_FREQ a parameter

* Fix typo in tb.list and an error in define switch in ariane_pkg

* Copy over SD-driver in bootloader from @leon575777642

* Fix compilation issues of bootrom

* Change signal name in serpent periph portlist

* Correct generate statement in serpent dcache memory
2019-03-18 11:51:58 +01:00
msfschaffner
07df142624 Maturity fixes and AXI extensions for write-through cache system (#188)
* : Fix PITON_ARIANE define issues
* Fix write-back / cache read collision issue in serpent dcache.
* Add separate bootrom / device tree for openpiton (hardcoded for 1x1 tile config at the moment).
* Bootrom generation update (better compatibility with older python versions), new bootrom for OpenPiton+Ariane.
* Fix assertion in icache.
* Correct JTAG timing constraints.
* Fix parameter type in fpga toplevel (fix #168).
* Remove conflicting bootrom from fpga file list.
* This flushs the branch predictors when entering exception handlers in order to avoid speculative fetches from virtual addresses (to be improved with PMAs).
* Fix byte offset of IPIs in CLINT
* Disable DCache flushes on fence for write-through cache (not needed in that case)
* Fix blocking assignments in ff process.
* Fix register access issue in debug mode, only affects A0 (fix #179).
* Fix multiple driver issue in PLIC
* Do not assume replicated data in serpent dcache when reading from an NC region.
* Another byte offset fix in IPIs (CLINT)
* Add AXI64 compliance switch to dcache_mem
* Fix genesys 2 constraints
* Map serpent atomic requests onto AXI atomic/exclusive transactions.
* Cleanup of AXI memory plumbing, add separate AXI adapter module.
* Remove unneeded interface signals, increase wbuffer #pending tx
* Fix verilator compilation issues in AXI adapter.
* Delete unnecessary constraint
* Delete duplicate module instance
* Update gitlab CI script
* Small fixes to make riscv atomics work with serpent_axi_adapter.
* Update travis and gitlab-ci scripts
* Register b responses for better timing.
* Remove fpu div submodule, update Makefile paths and src lists
* Constant bits in haltsum reduction must be 1 (AND reduction).
* Switch to DTM from riscv-dbg submodule
* Further cleanup fixes in AXI/serpent atomics
* Bump riscv-dbg version
2019-03-18 11:51:58 +01:00
Florian Zaruba
843300302f Add Exclusive Adapter (#187)
* Add atomic adapter as submodule

* Change UART frequency

* Add atomic memory adapter

* Bump AXI exclusive submodule version

* Re-name ariane_next to ariane-dev

* Switch to official `atop` branch on `axi_node`
2019-03-18 11:51:58 +01:00
Florian Zaruba
b1bdc0c02c Add System Verilog FPU (#163)
* Change reset strategy in ariane_verilog_wrap.sv, remove unneeded sigs in serpent_peripherals.

* saving...

* ⬆️ Updates for new FPU

* Add sv fpu to FPGA flow

* Use multi-threading capabilities of verilator

- Deactivate non-standard floating point arguments
- Make multi-threading conditional on the availability of verilator 4

* Remove DPI threadsafety

* Reduce FPGA clock frequency

- Remove couple of -v- tests to reduce test-time

* Fix documentation and fpga flow

- Fix cycle time to accommodate FPU
- Fix FPGA constraints

* Change UART frequency
2019-03-18 11:51:58 +01:00
Michael Schaffner
7951802a01
This patch makes the dm relocatable to an arbitrary base address (last 12bit need to be zero however). 2019-01-24 12:44:21 +01:00
Michael Schaffner
be3c614f71
Fix #158 2019-01-07 20:53:14 +01:00
Michael Schaffner
a9e3368f6a
: Fix PITON_ARIANE define issues. 2018-11-26 18:18:09 +01:00
Michael Schaffner
8312516bec
License headers updated, some indentation cleanup, consolidate common tb.svh file. 2018-11-26 13:20:19 +01:00
Michael Schaffner
41fb4d225e
Rename SERPENT_PULP define to PITON_ARIANE. 2018-11-26 12:07:54 +01:00
Michael Schaffner
179054a0ec
Merge remote-tracking branch 'upstream/ariane_next' into serpent 2018-11-21 20:15:32 +01:00
Michael Schaffner
4c329753b0
Add a second dscratch register to the csrs. 2018-11-19 14:40:17 +01:00
Michael Schaffner
fb92e8603a
Change defines.vh to defines.tmp.h 2018-11-18 11:33:45 +01:00
Florian Zaruba
3c40965e8a
Merge remote-tracking branch 'origin/ariane_next' into fpga_dev 2018-11-17 22:38:54 +01:00
Florian Zaruba
99a2fae447
Enable D$ by default and extend README 2018-11-16 17:20:58 +01:00
Florian Zaruba
1d173b3742
🐛 Fix non-conditional SC 2018-11-16 16:12:44 +01:00
Michael Schaffner
a99a176add
Adapt parameterization assertions l15 adapter to allow for different associativity in I and D cache. 2018-11-15 12:26:19 +01:00
Florian Zaruba
beda3f526e
Optionally flush TLB 2018-11-15 11:26:14 +01:00
Michael Schaffner
fcba756c39
This adds configuration propagation from OpenPiton Verilog defines to SV parameters in packages. 2018-11-13 14:56:58 +01:00
Florian Zaruba
300b7771ea
Remove pmps and fix dcache bypass 2018-11-13 13:38:41 +01:00
Florian Zaruba
ebce1bc07f
Add skeleton for NBDache TB (copy from serpent) 2018-11-06 12:21:23 +01:00
Florian Zaruba
c57d36079c
Make tval on illegal instruction optional 2018-11-05 15:37:55 +01:00
Florian Zaruba
d7b9bea4f0
Merge branch 'fpga_dev' of github.com:pulp-platform/ariane into fpga_dev 2018-11-05 01:34:43 +01:00
Florian Zaruba
64eb9d8625
Improve Spike alignment 2018-11-05 01:24:10 +01:00
Florian Zaruba
9db50883da
Improve Spike - Ariane alignment
- Don't increment instret on exception
- Align cycle counter with instret counter (-> IPC 1 as in Spike)
- Add mock uart functionality
- Make the preloading elf a plus-arg
2018-11-04 16:20:19 +01:00
Florian Zaruba
c907270502
First instructions passing on Spike 2018-11-03 22:44:45 +01:00
Florian Zaruba
ab2d5908d1
🐛 Fix wrong interrupt stack behaviour 2018-11-03 09:20:36 +01:00
Michael Schaffner
cb0b0bec03
Align serpent cache size with openpiton, add FPGA synthesizable clock gate to ariane_verilog_wrap.sv. 2018-10-31 14:45:52 +01:00