Commit Graph

384 Commits

Author SHA1 Message Date
Jessica Clarke
5efd7d5cd8 Partially bring back tval
We need this to determine which 16b parcel of a 32b instruction caused
the fault (omitting this caused rv64uc-v-rvc to fail).
2020-07-15 04:27:25 +01:00
Jessica Clarke
682ff10d72 Regenerate verilog 2020-07-15 03:16:24 +01:00
Jessica Clarke
7eff218288 Replace enums-for-constants with structs wrapping a plain Bit#(n)
BSC does not play nicely with enums whose labels do not start at 0 and
increase linearly. Instead, in such cases, it generates a whole bunch of
conditions to "legalise" any read values, which causes an explosion of
logic in places like the ROB. Thus, use this ugly (but still typed)
alternative that, other than naming conventions enforced by BSC, looks
almost the same as an enum.
2020-07-15 03:16:24 +01:00
Jessica Clarke
b65576b112 Copy TAP file generation code from Flute 2020-07-15 03:16:24 +01:00
Jessica Clarke
e8c1de7793 Regenerate verilog 2020-07-14 19:01:47 +01:00
Jessica Clarke
956c9686a6 src_SSITH_P3: Optimise unspecified values
We have a lot of ?s floating around that needlessly constrain logic. As
with Flute, enable optimisations on these in the hope that timing and/or
area improve further.
2020-07-14 17:53:01 +01:00
Jessica Clarke
6356d5f8a1 Drop check against whether the ROB row already has a trap
The only other thing setting this is enq, but RenameStage marks
already-trapping instuctions as Executed so they should never go to the
ALU.
2020-07-14 16:46:29 +01:00
Jessica Clarke
f2d9c78824 Drop unused exception parameter on FPU ROB ports
This gives traceBundle its own set of ports. Also fix the nonsensical
calculations for those Ehr ports; the number of FPUs should not be
calculated as ALUs/2!
2020-07-14 16:37:59 +01:00
Jessica Clarke
0b7d635cbf Drop unused store_data/store_data_BE arguments when TV is disabled 2020-07-14 16:23:10 +01:00
Jessica Clarke
5a42b0102a Turn pc back into a Reg
This is from before we fed bounds all the way back to the BTB and RAS.
We no longer need this and can go back to what upstream does.
2020-07-14 16:22:52 +01:00
Jessica Clarke
9bdf71ee4e Only store the actual address for completed loads/stores
This is only needed for RVFI tracing and for xtval if we trap, so we
never need the full capability.
2020-07-14 16:22:50 +01:00
Jessica Clarke
e89f7a8130 Regenerate verilog 2020-07-13 18:54:53 +01:00
Jessica Clarke
26a5376f9c FetchStage: Tidy up comment that no longer applies
Block is now entirely for debugging only.
2020-07-13 18:23:01 +01:00
jon
83b734ed87 Remove commented-out code. 2020-07-13 18:20:56 +01:00
jon
f638644b84 Remove tval from the reorder buffer and just use PC.
It's currently unknown to me what the function of tval in the reorder
buffer was, which is a bit scary.
It seemed to have some additional calculation to do with instruction
alignment, but verification with compressed instructions still seems to
work.
2020-07-13 18:13:21 +01:00
Jessica Clarke
6d4b00c865 Don't push capabilities into FpuMulDivExePipeline
We needlessly casted to CapPipe then FpuMulDivExePipeline had to
internally get the address and construct null-derived capabilities. Push
all this out to the Core so that it just deals with Data again. This is
unlikely to affect area as any sane optimiser would have optimised all
this away, but this is cleaner code, with the benefit that the FPU no
longer cares if the physical register file is unified or split between
GPCRs and FPRs.
2020-07-13 15:52:27 +01:00
jon
4792581d8c Move mux out of Reorder buffer rows into Alu Pipelines. 2020-07-13 12:10:41 +01:00
Jessica Clarke
eeb6c91b9d Don't use -D_GLIBCXX_USE_CXX11_ABI=0 for bluesim builds
Same problem as Piccolo/Flute, and this was a terrible workaround on
Bluespec's part.
2020-07-12 21:32:29 +01:00
Jessica Clarke
c66d0183b5 Fix missing serv_socket_init at run time for bluesim RVFI-DII build 2020-07-12 21:28:46 +01:00
Jessica Clarke
ece8423119 Regenerate verilog 2020-07-11 17:26:00 +01:00
jon
98e95b1297 Bump cheri-cap-lib. 2020-07-10 20:48:59 +01:00
jon
c85ab736d0 Share paths and registers between CSR reads and Special capability
registers.
2020-07-10 18:41:29 +01:00
Peter Rugg
6a317d1a00 Prevent instruction fetch to unexpected devices 2020-07-10 17:35:06 +01:00
Jessica Clarke
5e9b478371 Cover interesting fetch and rename state for DEBUG_WEDGE configs 2020-07-10 15:59:40 +01:00
Jessica Clarke
0f65994955 Plumb through a lot more ROB debug state
In particular, the previous set of debug info only looked at one of the
superscalar ways, assuming the 0th was always the next instruction, but
there's a level of indirection to map ports to ways that was missed. But
now we dump out both ways and more. And yes, I fully recognise the
atrocity that is the type in use here... please forgive me. It doesn't
help that bsc is buggy and gets confused about the structure of nested
tuples[1].

Drops the commit debug output to only the low 32 bits of PCC's address
and no instruction bits; as this has been committed it should be (and
has always been observed to be) within bounds and, thus, fit in 32 bits
when running in M-mode, with the instruction bits obtainable from the
binary. I'd much rather know about potentially-dodgy speculative
addresses than things we can reliably infer given the limited number of
DMI registers free (though we could hijack other encodings if
necessary).

[1] https://github.com/B-Lang-org/bsc/issues/199
2020-07-10 15:59:40 +01:00
Peter Rugg
627c60b4e3 Don't generate .depends.mk if bluespec doesn't parse 2020-07-09 15:21:19 +01:00
jon
a0c5d5a9af Roll back changes to SpecPoisonFifo which were accidentally committed. 2020-07-09 15:19:39 +01:00
jon
59eddfbb4c Move register in reorder buffer that is only used for Tandem
Verification to that case only.
2020-07-09 10:26:08 +01:00
jon
40b44d51e2 Merge branch 'CHERI' of https://github.com/CTSRD-CHERI/Toooba into CHERI 2020-07-08 12:45:43 +01:00
jon
0b8a031184 Checkpoint FIFO scheduler work. 2020-07-08 12:39:13 +01:00
Jessica Clarke
68d3bd484e Provide opt-in wedge debugging info
When DEBUG_WEDGE is defined, expose the last committed and next in the
reorder buffer PC and corresponding instruction via DMI registers, since
even when the core is wedged and we can't read GPRs etc we can still
interact with the debug module itself. Hopefully this proves useful for
debugging wedges.
2020-07-07 23:59:35 +01:00
Jessica Clarke
40f8109263 Regenerate verilog 2020-07-06 19:32:56 +01:00
Jessica Clarke
e9d212fcbc LLC_AXI4_Adapter.bsv: Make more obviously correct
Previously we were relying on the beat count registers being exactly the
right number of bits such that we'd overflow from 7 back to 0 after the
final flit. This change aligns the LLC adapter with the MMIO adapter,
which already does things in a safer way. We can also just look at rlast
for read respones rather than a full 3-bit comparison (the MMIO adapter
also makes this micro-optimisation).
2020-07-06 19:01:56 +01:00
Peter Rugg
c406d357c9 Add CHERI+RVFI_DII grant codes and copyrights 2020-07-06 17:39:25 +01:00
Jessica Clarke
a154207d3f CreditCounter.bsv: Actually rate-limit
If DRAM latency is too high and the cache is performing frequent writes,
it would be possible to overflow this counter, which means we don't rate
limit, the cache could erroneously believe it's safe to do I/O
accesses/cache refills/page table walks, and the cache would block due
to the guard on decr when it finally gets enough write responses back.
We should block the incr method to automatically stall the cache until
it receives a new write response.
2020-07-06 15:59:47 +01:00
Jessica Clarke
9c12b97a09 Regenerate verilog 2020-07-06 01:55:30 +01:00
Jessica Clarke
190e84dfd1 .gitignore. Ignore .depends.mk files 2020-07-06 01:55:12 +01:00
Jessica Clarke
17ed2dfde8 Revert CACHE_SIZE back to LARGE
The default was erroneously changed, causing P3 builds to have smaller
caches, so switch it back. The RVFI-DII builds override this with a TEST
configuration anyway now.
2020-07-05 21:44:17 +01:00
Jessica Clarke
7b1259b41b Add a Bluesim RVFI-DII config 2020-07-05 21:43:21 +01:00
Jessica Clarke
badf5c8e37 Include xCHERI in ARCH and build directory names
Also use RVFI_DII not RVFIDII in the directory names.

This makes everything match Piccolo/Flute rather than having Toooba be a
weird, inconsistent and plain wrong.
2020-07-05 21:41:28 +01:00
Jessica Clarke
46ae8ea159 Port parallel build support to bluesim 2020-07-05 21:31:44 +01:00
Jessica Clarke
106f70e42b Fix Bluesim build (synced from Verilator Makefile) 2020-07-05 21:28:19 +01:00
Jessica Clarke
027b769904 Reduce diff to upstream 2020-07-05 21:28:12 +01:00
Jessica Clarke
0b0b863baa Replace home-grown dependency script with Bluespec-provided makedepend.tcl
This one has the advantage of being able to be called with the same
flags as bsc, rather than needing to pass things through special
environment variables. As a result, revert all our changes to dealing
with BSC_COMPILATION_FLAGS (some of this diff therefore looks strangely
formatted, but it's to match upstream verbatim, and should be left that
way to minimise diffs and avoid conflicts).
2020-07-05 21:26:18 +01:00
Jessica Clarke
cd8e2a15ef Regenerate verilog 2020-07-02 03:00:55 +01:00
Jessica Clarke
1173cbb2c6 CsrFile.bsv: Actually respect CHERI fault delegation
Also remove a dangerous default case item that masked this bug. It's
completely unnecessary upstream too and a bad idea.
2020-07-02 02:44:09 +01:00
Peter Rugg
dcc506a365 Regenerate verilog 2020-07-01 17:08:08 +01:00
Peter Rugg
20e940eb66 Allow delegation of CHERI traps 2020-07-01 16:07:08 +01:00
Peter Rugg
9a00bde2b7 Revert accidentally making simulation memory uncached 2020-06-30 11:33:43 +01:00
Peter Rugg
f8972768a2 Regenerate verilog 2020-06-30 00:00:29 +01:00