Commit Graph

85 Commits

Author SHA1 Message Date
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
Alexandre Joannou
b5b2b4fe5c Port AXI4 changes from Flute 2020-03-27 16:45:26 +00:00
Jonathan Woodruff
f2f2285f75 Check the bounds on PCC and report the correct exception in Xcause registers.
This required makeing the Exception type wider by one.
The actual "inBounds" check is currently implemented in the reorder buffer rows, which duplicates the logic ~80 times (number of outstanding instructions), which isn't ideal, but it's using the quick in-bounds check that only compares the mantissa-sized things.
2020-03-25 15:20:03 +00:00
Jonathan Woodruff
2aa902f61a Change tabs to 8 spaces, this time being careful to do this only in BSV files. 2020-03-23 14:44:39 +00:00
Jonathan Woodruff
a6e5a7bff0 Revert "Fix whitespace in src_Core directory."
This reverts commit a137a6ede7.
2020-03-23 14:40:02 +00:00
Jonathan Woodruff
a137a6ede7 Fix whitespace in src_Core directory.
Replace all tabs with 8 spaces.
2020-03-23 14:28:00 +00:00
Jonathan Woodruff
a299a763ed Add a special capability register file and pass it's interfaces to all the places that the current CSR file goes.
We may need to trim some of these later, but most of them seem like places that we'll need access.
2020-03-23 10:10:11 +00:00
Jonathan Woodruff
d77c158b76 Merge branch 'mac_build' into RVFI_DII 2020-03-20 11:35:11 +00:00
Jonathan Woodruff
b830f4bf41 Resolve some issues to build on mac.
This includes renaming Fifo.bsv to Fifos.bsv to account for a case insensitive file system which confuses this library with FIFO.bsv.
Also this includes an update of the verilator flags that are needed for modern verilator.
Finally, some verilator flag changes for building with LLVM.
2020-03-19 19:21:59 +00:00
Jonathan Woodruff
3a79b022ea Merge branch 'master' into RVFI_DII, a complex merge for the fetch stage! 2020-03-18 11:35:59 +00:00
rsnikhil
a6a227ed66 Incorporated patches/additions from Joe Stoy after GFE debugging (w. amendment ...)
Amendment: RegUNInit.v updated, removing an extraneous RST line.
2020-03-13 16:38:54 -04:00
rsnikhil
c278e4fe68 Fixed a bug, and a related Tandem-Verification bug, re. CSR MIP MEIP/MTIP/MSIP.
Two of these were not properly restricted as read-only from CSRRX instructions,
and there was a bug in the WARL function for writing MIP,
and there was a bug in the TV-reporting of MIP updates.
2020-03-12 21:44:00 -04:00
rsnikhil
f02e9af515 Improved avoidance of initial timer interrupt in MMIOPlatform; removed spurios MSTATUS TV report on CSRRS/C with rs1==0 2020-03-11 22:42:18 -04:00
rsnikhil
a19eb97f34 Small tweak to MMIOPlatform.bsv to avoid spurious timer interrupt at start of time. 2020-03-09 22:58:04 -04:00
rsnikhil
976494a8ff Fixed Tandem-Verification trace generation issue re. MSTATUS on CSRRx instructions that write to FCSR.
When a CSRRx instruction writes to FCSR/FFLAGS/FRM, the CPU also
changes MSTATUS.FS and, by implication, MSTATUS.SD because the
floating point state has become "dirty".  Tandem Verification
trace-generation was not reporting this update.
2020-03-08 21:29:30 -04:00
rsnikhil
fafd99c983 Fixes reported by Joe Stoy: PLIC, MMIO_AXI4_Adapter and Core.bsv (details below)
PLIC: updated to latest version from Piccolo/Flute.

MMIO_AXI4_Adapter: added workaround for Xilinx IP problem on 64-bit
    AXI4 fabrics. Writes that specify 8-byte size, but only write in
    upper or lower word using strobes, are converted into 4-byte size.

Core.bsv: added a notification to the Debug Module re. CPU halt.
2020-03-08 15:39:57 -04:00
rsnikhil
4bdbcbfd88 Additional fix to previous commit (75df204e) which only fixed MIP/MIE; this fixes SIP/SIE as well. 2020-03-04 13:14:31 -05:00
rsnikhil
75df204e31 Fixed a Tandem-Verification bug (reporting incorrect MIP/MIE/SIP/SIE post-write values)
MIP/MIE/SIP/SIE fields are WARL (Write-Any/Read-Legal). The CSR
register forces the user-privilege bits ([8,4,0]) to 0 since riscy-ooo
does not support user-level interrupts.  However, function
Csrfile.fv_warl_xform() was not mirroring this correctly.
2020-03-04 09:50:39 -05:00
rsnikhil
40b55d2c32 Fixed a Tandem-Verification issue (report MIP change due to interrupts).
CSR MIP can change due to external/timer interrupts.  These non-instruction-related
changes were not being reported to the Tandem Verifier.
2020-03-03 18:34:00 -05:00
rsnikhil
ac6043ce2d Fixed two bugs: (1) not trapping on unimplemented CSRs (2) MSTATUS.FS initialization
(1) riscy-ooo was mapping all unimplemented CSRs to a benign, user-privilege read-write CSR
    Instead, we now catch this RenameStage and steer it to a trap.
(2) MSTATUS.FS was initialized to 2'b00 (absent/off); should be 2'b01 (present and initial)
2020-03-03 13:56:31 -05:00
rsnikhil
e02dac1449 In CsrFile.bsv, changed user-privilege bits in MIP/SIP/MIE/SIE to read-only 0 since MISA.N=0 2020-03-02 16:20:07 -05:00