Commit Graph

37 Commits

Author SHA1 Message Date
Peter Rugg
e8487e2a1c Revert "Provide opt-in wedge debugging info"
This reverts commit 68d3bd484e.
2021-01-19 22:00:16 +00:00
Peter Rugg
20f1ddf587 Revert "Plumb through a lot more ROB debug state"
This reverts commit 0f65994955.
2021-01-19 21:40:59 +00:00
Peter Rugg
a6ab823d1d Revert "Cover interesting fetch and rename state for DEBUG_WEDGE configs"
This reverts commit 5e9b478371.
2021-01-19 21:39:59 +00:00
jon
bab989d6d2 Support for stat counters from the tag controller.
The order of the events is very not tested; 50% chance of being correct.
2020-12-17 12:38:52 +00:00
jon
fa9931b64c Implement a couple Cache counters in the LLCache.
These aren't too useful... We don't seem to have normal counters for
loads and stores in the baseline.
2020-12-15 18:16:21 +00:00
Peter Rugg
bf77ac74ba Fix performance reporting requests for multicore 2020-11-04 12:11:31 +00: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
Peter Rugg
c406d357c9 Add CHERI+RVFI_DII grant codes and copyrights 2020-07-06 17:39:25 +01:00
Peter Rugg
8778369fe5 Merge remote-tracking branch 'upstream/master' into CHERI 2020-06-17 13:01:41 +01:00
Alexandre Joannou
b5b2b4fe5c Port AXI4 changes from Flute 2020-03-27 16:45:26 +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
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
83829590dd Fixed up logic for "Non-Debug-Module reset" request/response from the Debug Module
Now able to run multiple ISA tests in a single simulation run
connected to remote debugger DSharp, using either hart_reset or
ndm_reset between tests to bring the system back into reset state.
All Debug Module commands working:
 - dm_reset, hart_reset, ndm_reset
 - break    (set breakpoint)
 - step
 - continue (until breakpoint of 'halt' command)
 - halt
 - read/write GPR, FPR, CSR, memory
 - elf_load
2020-02-04 16:02:53 -05:00
rsnikhil
4960a59da0 Fixes for GDB control: can run consecutive tests in single simulation, without intermediate reset.
After a test, GDB can write DCSR to restore to Machine privilege,
write to PC (DPC) to restore boot value,
write MSTATUS to restore to initial value,
then can load and run next test.
2020-01-30 22:46:51 -05:00
rsnikhil
6078b7ce19 Removed EXTERNAL_DEBUG_MODULE stuff from CoreW.bsv; added Tandem Verif control flow 2020-01-29 13:19:31 -05:00
rsnikhil
fa5e141550 Fixed resume-after-break problem (details below).
When controlled from a debugger (build with INCLUDE_GDB_CONTROL macro);
when stopped due a EBREAK instruction; on a 'resume' command ('continue' in GDB),
was getting stuck.  This is now working.
At this point, all debugger functionality (almost: see below) is working:
   halt, step, breakpoints, resume, read/write gpr/fpr/csr, read/write memory.
Still todo: "NDM reset" (non-debug module reset).
2020-01-17 20:08:04 -05:00
rsnikhil
977e3c92cd Fixed some ifdef INCLUDE_GDB_CONTROL issues. Passing all 229 ISA tests. 2020-01-16 16:04:32 -05:00
rsnikhil
56698d469e Integration of Debug_Module basically complete (except resume-after-break, details follow)
Stop, set breakpoint: working, stopping successfully.
Step: working: stops after a step.
Continue (resume) working after Stop and Step, but not after stop by breakpoint (needs debugging)
Read/Write GPRs, FPRs, CSRs, memory working.
2020-01-16 14:36:19 -05:00
rsnikhil
16cb92e2c1 Register reads now working. All functionality is in; need testing, cleanup, merge into master. 2020-01-15 15:54:50 -05:00
rsnikhil
2e909a90a9 Work-in-progress integrating Debug Module. Now able to load ELF file from debugger and execute it 2020-01-14 23:29:32 -05:00
rsnikhil
2807edf1b2 Work-in-progress on integrating Debug Module 2020-01-13 21:22:54 -05:00
rsnikhil
dcfb285c29 Work-in-progress. Now able to single-step from debugger. 2020-01-13 15:34:27 -05:00
rsnikhil
27c3c7cb4d Work in progress on Debug Module integration. Got further on start/step/halt 2020-01-12 22:25:14 -05:00
rsnikhil
cd779e1cbe Work in progress: updates to handle stop/step/run from Debug Module 2020-01-08 20:17:50 -05:00
Jonathan Woodruff
b79a11b44d Merge branch 'master' into RVFI_DII 2019-12-09 16:33:51 +00:00
Jonathan Woodruff
96d092c300 Changes that enable RVFI_DII to run.
It doesn't yet pass any set of tests, but tests do run and reduce.
2019-11-26 10:46:56 +00:00
James Clarke
a0fd5a8f37 Print cycle counter like Piccolo/Flute on write to to_host 2019-11-02 20:37:34 +00:00
rsnikhil
666dd2ad92 Small tweak to remove unnecessary explicit boot rom addrs (subsumed by IO) 2019-04-22 15:12:30 -04:00
Darius Rad
4d1030df47 Add support for external debug module. 2019-04-09 14:08:36 -04:00
rsnikhil
4e305ac98d Updated so SoC addrs are taken from SoC_Map.bsv 2019-04-01 14:34:49 -04:00
rsnikhil
113f888d37 Added support for 'debug_external_interrupt_req'
New method 'debug_external_interrupt_req' to support emulation of a
debug module starts at P3_Core interface and is plumbed all the way in
to the CSR register MIP as interrupt [14].  The corresponding MIE[14]
is always 1, so it is never masked. Still todo: should not be masked
by MSTATUS interrupt-enables either.  Also expanded
interrupt-detection logic, mcause etc. to extend up to interrupt 14.

Builds in standalone mode, runs ISA tests.

Builds in src_SSITH_P3, generating RTL.
2019-04-01 12:26:54 -04:00
rsnikhil
ee24a93944 Initial load of files 2019-03-26 14:49:40 -04:00