Commit Graph

105 Commits

Author SHA1 Message Date
jon
19a07882ab CSome style cleanups from chat with Alexandre. 2020-12-11 16:44:59 +00:00
jon
1bae03da9c Implement all the remaining core (not cache) memory stat counters. 2020-12-11 15:48:10 +00:00
jon
d6243be1dd Add a few more core performance counters. 2020-12-04 18:34:56 +00:00
jon
bdc2d494f2 Change name something that makes sense. 2020-12-04 17:12:26 +00:00
jon
f42c3f3577 Merge branch 'cheri-perfmon' into CHERI 2020-12-04 16:29:51 +00:00
jon
4fcc18635a Supporting most architectural counters, wiring them out from
CommitStage.
Also support multiple events per cycle.
2020-12-02 15:28:41 +00:00
jon
e99e1e6274 Update CSR names to fullish standard names. 2020-12-02 10:18:25 +00:00
jon
259d34618c A design that actually passes one performance monitor trace from
TestRig.  The example counted redirections, which happend to match
between Flute and Toooba for this example.
2020-12-01 18:02:11 +00:00
Alexandre Joannou
98a9c076cd Update BlueStuff API and Bump BlueStuff and TagController 2020-12-01 14:22:12 +00:00
Jonathan Woodruff
0289bfe17d Fix a couple errors due to changes somehow merged over from the rich_predicted_state branch. 2020-11-09 11:14:11 +00:00
Jonathan Woodruff
69c697daf7 Changes needed to build for FPGA. 2020-11-06 11:44:33 +00:00
Peter Rugg
bf77ac74ba Fix performance reporting requests for multicore 2020-11-04 12:11:31 +00:00
jon
1f968b0c07 2-byte aligned instruction memory to simplify compressed instruction
fetch.
2020-07-24 12:38:37 +01:00
Jessica Clarke
0516db5e8d Bump BSV-RVFI-DII and refactor to support new parcel-based interface
This means FetchStage should now behave in the same way with RVFI-DII as
with an I-Cache. A Dii_Parcel_Id is fed alongside PC everywhere relevant
and follows very similar logic, but, importantly it's just extra state
on the side, it doesn't affect what we do with the branch predictor and
parcel combining/instruction decoding logic.
2020-07-21 14:36:36 +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
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
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
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
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
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
20e940eb66 Allow delegation of CHERI traps 2020-07-01 16:07:08 +01:00
Peter Rugg
c8e4a64128 Add sentries 2020-06-29 23:29:08 +01:00
Peter Rugg
70185dabac Allow debug access to SCR offsets 2020-06-29 23:27:23 +01:00
jon
49e384ab2e Don't wedge when peripherals return write errors. 2020-06-25 14:58:51 +01:00
jon
af6e562c84 Deq the incoming request when sending a fast error response to a bad mapping. 2020-06-25 14:20:28 +01:00
jon
86e143a9f7 Changes that are much more likely to work for uncached memory accesses,
up to 128-bits.  I'm getting a lockup in simulation that I haven't
resolved yet, but the request looks ok.
2020-06-24 19:45:34 +01:00
jon
312d0316da Use updated Bluestuff library, and also support uncached 128-bit transactions through MMIO. 2020-06-24 11:57:43 +01:00
Peter Rugg
8778369fe5 Merge remote-tracking branch 'upstream/master' into CHERI 2020-06-17 13:01:41 +01:00
Peter Rugg
0e7df46dce Allow read/write of dpc 2020-06-17 11:42:58 +01:00
jon
8492136abd Attempt to convert more functions in the MMIO platform to respect the
alignment of the original data.
Also eliminate the call to the reimplementation of the AMO functions.
(One call was already converted to use the common function, and I've now
converted the other.)
It's honestly unknown how much of this works, but it's more likely to
work than what was previously implemented, I think, given that the
previou implementation was based on some basic misconceptions concerning
data alignment.
2020-06-09 17:39:36 +01:00
jon
122e98b0c7 Attempt to provide correct alignment for MMIO requests in flits returned
to bus.
This does not yet attempt to fix writes which might likely also need
fixing.
2020-06-08 19:03:12 +01:00
Jessica Clarke
e579f895dc CPU_Decode_C.bsv: Sync from Flute
This incorporates the fix made to Piccolo and Flute to not trap on
C.FLWSP/C.FLDSP when rd == 0; unlike the compressed stack pointer
relative integer loads/stores, these are legal, since f0 is a real FPR
rather than a constant zero.
2020-06-05 17:43:26 +01:00
Peter Rugg
962ade1092 Fixes for synthesis 2020-06-05 17:40:28 +01:00
Jessica Clarke
1d12a97741 CPU_Decode_C.bsv: Sync from Flute
This incorporates the fix made to Piccolo and Flute to not trap on
C.FLWSP/C.FLDSP when rd == 0; unlike the compressed stack pointer
relative integer loads/stores, these are legal, since f0 is a real FPR
rather than a constant zero.
2020-06-03 18:14:58 +01:00
jon
078d39b9df Enable write bursts in LLC AXI4 adapter. 2020-06-02 09:40:37 +01:00
Peter Rugg
4b4b5836e8 Populate tval with CHERI trap information 2020-05-29 13:27:23 +01:00
jon
ffeed959a3 Believed-to-be-working attaching of tags to write bursts in the AXI4 LLC
wrapper.
2020-05-28 18:21:03 +01:00
jon
0f0d1a983b Remove references to ScrFile which were mysteriously still here. 2020-05-12 17:24:50 +01:00
Peter Rugg
461ca6a703 Merge branch 'CHERI' into pdr32-wip 2020-05-11 14:08:42 +01:00
Peter Rugg
27947f4df7 Refactoring around SCRs 2020-05-07 16:19:26 +01:00
Alexandre Joannou
b70498e00a Try new types to hold capabilities 2020-04-30 14:07:37 +01:00
jon
d3e0908785 Check PCC bounds in rename. 2020-04-28 19:08:07 +01:00
jon
5693af05e5 Changes to make PCC consistent.
Specifically, attach the bounds to PC all the way back into the branch predictors.
2020-04-27 15:13:36 +01:00
Jessica Clarke
a76af876a1 MMIOPlatform.bsv: Discard write response for uncached AMOs
Otherwise, the next MMIO access will see the 0 from the write response
instead of its response, and every subsequent access will see the
previous's response, further accumulating if more uncached AMOs are
performed.
2020-04-15 16:45:28 +01:00
Rishiyur S. Nikhil
7accf2c1a0 Merge pull request #11 from CTSRD-CHERI/mac_build
Resolve some issues to build on mac.
2020-04-07 09:13:19 -04:00
Jonathan Woodruff
81da99237e Move the register file to CapReg format, and pipe CapPipe around the pipeline. 2020-03-31 15:44:23 +01:00
Jonathan Woodruff
db41e2b9ed An initial implementation of mccsr. 2020-03-27 17:47:02 +00:00