Commit Graph

729 Commits

Author SHA1 Message Date
Peter Rugg
773d5c1107 Implement CSetHigh 2025-01-22 16:07:06 +00:00
Yuecheng-CAM
f71a3d61a9 implement C_GET_HIGH 2025-01-22 16:05:41 +00:00
Jonathan Woodruff
6ffde560b5 Some small timing optimistations in the direction predictor, and also a new optional smaller configuration for the tournament predictor. 2025-01-21 10:09:06 +00:00
Peter Rugg
6f30f2b703 Fix floating point illegal handling
As well as clarifying the logic in the main decode function (no
functionality change), this also fixes some cases that should be
illegal but weren't caught in the memory instructions.
2025-01-20 17:18:54 +00:00
Peter Rugg
3fd8f22f66 Fix many illegal instruction decode cases
The decode had a TODO to handle illegal instructions more precisely.
Some instructions in the new CHERI spec were not causing traps, and
seemed to wedge the core.
Switch to a new style where instructions are assumed illegal unless
explicitly declared legal.
This definitely at least covers many funct3 etc fields where only
some of the encodings are currently used.
2025-01-20 17:18:54 +00:00
Peter Rugg
0ae1d8a275 Clear compressed and uncompressed BTBs on mispred
This fixes a wedge in the frontend: the fetch stage could get stuck
in a loop, with the next address predictor deciding that the redirect
PC is a compressed instruction doing a close jump. On mispredict,
this would get retrained, but "mispedict" was denoted as an
untaken branch to PC+2. If unlucky, PC+2 could cross an alignment
boundary, causing the untaken branch to be interpreted as a long
branch, leaving an old competing entry in the compressed branch BTB,
which would then take priority.
Fix by always marking entries in both close and long BTBs when not
taken: to avoid hurting performance, this kind of update will not
insert into either BTB unless already present.
2025-01-20 16:50:40 +00:00
Jonathan Woodruff
ce2ded19ae Optimise timing/scheduling by always returning the head of the RAS stack.
This means that two returns decoded in the same cycle are likely to result in a misprediction.
The trouble here was that the Decode loop wouldn't build with slight changes due to a scheduling conflict through the RAS due to the dependence of the next ras.first method on the earlier ras.pop method.  This was indeed an unpleasant combinational path between concurrently decoding instructions.  This change allows all RAS predictions to be independent (by assuming no pushes or pops occur earlier in the bundle than a return).
2025-01-20 15:15:14 +00:00
Peter Rugg
1ae93da4f8 Restore per-instruction commit prints by default 2025-01-08 18:43:21 +00:00
Peter Rugg
1df304a820 Prevent various debug prints by default 2025-01-08 18:43:05 +00:00
Franz Fuchs
d1bea2faf0 Corrected CCSeal decoding function 2025-01-07 14:17:20 +00:00
Franz Fuchs
2983835e26 Fixed pc_wdata to be addresses instead of offsets 2024-12-16 12:13:59 +00:00
gameboo
817d0249c5 Revert "Use only 20 bits of address on the AXI lite port"
This reverts commit c766187368.
2024-11-12 17:44:11 +00:00
Franz Fuchs
90fb959788 Revert "implement C_GET_HIGH"
This reverts commit 303331cc8f.
2024-10-23 17:39:32 +01:00
Yuecheng-CAM
303331cc8f implement C_GET_HIGH 2024-10-20 23:17:01 +01:00
Jonathan Woodruff
57fcf7a52a Revert "Revert "Use only 20 bits of address on the AXI lite port""
This reverts commit 47e12b8e65.
2024-09-26 11:06:31 +01:00
Peter Rugg
1cfc58c2cc Fix debug module reset state machine
dmactive should only go low when the debug module has successfully
reset. Approximate this by waiting for 1024 cycles, allowing any
register access requests and system bus requests to come back.
2024-09-16 23:15:24 +01:00
Peter Rugg
6fc7327b93 Support narrow debug module register accesses 2024-09-16 18:45:19 +01:00
Peter Rugg
aeae9b1f63 Busy the system bus when performing writes
This was probably removed for performance, but now that we have
a faster workaround for loading kernels on the DE10, we should
probably prioritise accurate error information instead.
2024-09-16 18:45:19 +01:00
Peter Rugg
af8432d3f3 Return Abstract Command Error on unsupported CSRs 2024-09-16 18:45:19 +01:00
gameboo
47e12b8e65 Revert "Use only 20 bits of address on the AXI lite port"
This reverts commit c766187368.
2024-09-11 20:02:35 +01:00
gameboo
c766187368 Use only 20 bits of address on the AXI lite port 2024-07-08 17:12:47 +01:00
Franz Fuchs
1f382b1563 Add license again to TourPred.bsv 2024-05-18 17:12:43 +01:00
Franz Fuchs
3532d44d56 Performed merge with CHERI 2024-04-16 16:42:37 +01:00
Franz Fuchs
598ac6574e Added working Konata support
Konata: change M to F3

Added konata support to ALU pipeline

Added KONATA support to Fpu pipeline

Added KONATA support to Mem pipeline

Finished v1 of KONATA support

Added improvements to catch fragments in Konata

Kill fragments that have been merged

Fixed order of konata logs

Added commit stage output

Ensured that only the Commit stage can retire instructions in konata

Fixed printing commit stage log for Cap instructions

Changed Kanata to include the cycle counter for each line in the log file; please note that this requires post processing

Added reservation station support for Konata

Added parsing script for Toooba output

Removed double updated to D stage

Adressed Peter's comments
2024-04-15 16:59:53 +01:00
Franz Fuchs
449070e347 Copied over preliminary Konata support from 89b0c37a7b
The referenced commit did not merge well with our code base. Therefore, I copied over the changes manually. These changes do
not constitute a working Konata support for Toooba. In this commit, I commented out some things that did not compile, which will be fixed in future
2024-04-15 16:57:20 +01:00
Jonathan Woodruff
6f8c371a5c Roll back DTlB to two cycles for timing on DE10. 2024-03-25 12:52:51 +00:00
Jonathan Woodruff
e0eefbcfd0 Be a little more careful with outstanding requests. 2024-03-18 09:10:55 +00:00
Jonathan Woodruff
271bc9c0e8 Experimentally remove deburster.
This thing has a seraliser in it that serialises memory accesses, which
is a disaster for performance.
2024-02-16 09:50:07 +00:00
Jonathan Woodruff
6838b02274 Move to 4-way L1 caches to reduce area usage of splitting data ways into
seperate BRAMs.
2024-02-05 09:40:15 +00:00
Jonathan Woodruff
0784902e45 Tune the instruction fetch FIFO to the lower-latency ICache. 2024-02-02 13:26:15 +00:00
Jonathan Woodruff
b65994c00c Include the new single-cycle CCPipe as a seperate implementation, and
use it only in the L1 caches so that the L2 cache can have lower
resource utilisation and better timing.  (Resource utilisation is up
about 5% with the new design, and it's not necessary for the L2 cache.)
2024-02-02 11:50:45 +00:00
Jonathan Woodruff
ccc71952bf Use forwarding BRAMs in L2 Cache. Duh; this is required for the new
CCPipe structure.
2024-02-01 13:44:36 +00:00
Jonathan Woodruff
7608543da5 Move back to more traditional implementation of the forwarded BRAM,
which also workst.
2024-02-01 10:07:48 +00:00
Jonathan Woodruff
3416040a74 Forward using a working forwarding memory rather than logic in CCPipe.
This design runs CoreMark successfully.
2024-01-31 13:29:59 +00:00
Jonathan Woodruff
0e87595d73 Work toward eliminating a cycle of cache latency by doing data lookup in
parallel with tag lookup.
2024-01-31 10:15:51 +00:00
Jonathan Woodruff
8e4848c4bc Turn off tracing in instruction fetch. 2024-01-26 16:32:16 +00:00
Jonathan Woodruff
be26ac9f79 Fix a typo in a comment. 2024-01-26 16:31:49 +00:00
Jonathan Woodruff
9baadf58f3 Tune the size of the fetch pipeline fifos. This appears to make a 3%
performance improvement in CoreMark.
2024-01-26 16:02:18 +00:00
Jonathan Woodruff
e873bbd553 Clean up Fetch stage optimisations. This includes removing references
to Fetch3, which no longer exists since Fetch2 and Fetch1 are merged
(Fetch3 is now Fetch2).
2024-01-26 15:14:03 +00:00
Jonathan Woodruff
ca4e120a6c Use DReg instead of Reg, as intended. 2024-01-22 12:06:39 +00:00
Jonathan Woodruff
b586937953 Fix RVFI_DII by only going to the next ID when the instruction fetch is
going ahead.
2024-01-22 11:38:52 +00:00
Jonathan Woodruff
640f330d7d Briefly report flush when vm_info has a change in the itlb to give an
opportunity to flush the buffered translations.
2024-01-19 11:48:04 +00:00
Jonathan Woodruff
d30bd71e72 Allow consuming TLB response while TLB is being flushed. 2024-01-18 13:04:21 +00:00
Jonathan Woodruff
83c756a4f4 Tidy up data mem pipeline changes to remove duplicated code. 2024-01-17 16:09:42 +00:00
Jonathan Woodruff
9d12fefda8 Remove commented-out code. 2024-01-17 14:30:34 +00:00
Jonathan Woodruff
829a787be5 Move to vector functions as it's cleaner. 2024-01-17 13:41:43 +00:00
Jonathan Woodruff
5a1ed7c57f Allow a vector of translations to be remembered.
Just do 2 for now.
2024-01-17 13:21:38 +00:00
Jonathan Woodruff
4f91e54bd2 Properly remove pipline stage in fetch and use a seperate rule to do the
proper TLB lookup if necessary.
2024-01-16 17:00:10 +00:00
Jonathan Woodruff
eee5a2c23b Experiment with a zero-cycle TLB in instruction fetch as well. 2024-01-16 10:05:17 +00:00
Jonathan Woodruff
25a728b6d3 Optimise timing of TLB translation, ensuring that the translated address
proceeds with minimal conditions to the output.
2024-01-16 09:50:35 +00:00