1175 Commits

Author SHA1 Message Date
Jonathan Woodruff
5851d254ad Add a needed verilog file. 2020-03-12 11:48:09 +00:00
Jonathan Woodruff
0d525e4d11 Add RVFI_DII build Makefile. 2020-03-12 11:18:44 +00:00
Jonathan Woodruff
b24b6ab109 Bump the RVFI_DII library. 2020-03-12 10:47:30 +00:00
Jonathan Woodruff
79935d848f Reduce "verbosity". 2020-03-12 10:47:07 +00:00
Jonathan Woodruff
41fd6b2b60 Updated conditions to print the destination register and value correctly for various instruction types. 2020-03-12 10:46:00 +00:00
Jonathan Woodruff
a7a2854888 Declarations required for updated socket library. 2020-03-12 10:45:34 +00: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
Jonathan Woodruff
3eccf92544 Move to 8 MiB RVFI-DII memory. 2020-03-11 11:53:19 +00: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
b00f1d2eec Fixed a Tandem Verification trace generation bug for FMV.X.F and FMV.X.D
We were reporting the incremental value of fflags (=0)
instead of the final value of fflags (same as pre-value, which may not be 0).
2020-03-09 14:47:20 -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
0ac138b08f UART_Model.bsv fixes for better support of 32b/64b fabrics and 4-byte/8-byte address strides 2020-03-05 09:33:58 -05: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
rsnikhil
96a0897bf5 In MMIO_AXI4_Adapter.bsv, added check for unmapped addresses, provide err response immediately.
Previously, the request went out into the fabric, and we were relying
on the fabric returning an error response.  Some fabrics don't do this
reliably, so this removes that reliance on the fabric.
2020-02-28 14:07:45 -05:00
Niraj N Sharma
6f5d079e7c Modified synth and sim compile options in the Makefile
Regenerated synth and sim RTLs
2020-02-22 17:51:13 +05:30
Niraj Sharma
568f52fc0b Corrected typo in src_SSITH_P3 Makefile 2020-02-14 21:52:20 -05:00
rsnikhil
0264984136 Numerous fixes, so now generating correct Tandem-Verification traces for all 229 ISA tests. 2020-02-14 15:37:20 -05:00
rsnikhil
8434df2dac Fixes for Tandem Verification for store-values, CSR values on traps, etc. (detail below)
src_Core/CPU/CsrFile.bsv
    Various fixes for WARL'd values of mstatus and sstatus, medeleg,
    Added tval field in Trap_Updates returned by csrf.trap

src_Core/Core/Trace_Data2.bsv
    Added fields for store_data and store_data_BE

src_Core/Core/Trace_Data2_to_Trace_Data.bsv
    Added treatment of store_data and store_data_BE
    Fixed bug in next_pc for mkTrace_RET

src_Core/RISCY_OOO/procs/RV64G_OOO/CommitStage.bsv
    Fixed Trace_Data2 struct to TV for pc in case of xRET, and tval in case of trap

src_Core/RISCY_OOO/procs/RV64G_OOO/MemExePipeline.bsv
    Added store_data and store_data_BE in calls to rob_setExecuted_doFinishMem

src_Core/RISCY_OOO/procs/lib/ReorderBuffer.bsv
    Added store_data and store_data_BE in methods rob_setExecuted_doFinishMem
2020-02-12 19:43:04 -05:00
rsnikhil
ddcb784297 Bugfix: TV_Encode, after NDM_RESET, was not back to a neutral starting point. 2020-02-12 10:44:30 -05:00
Niraj Sharma
a99f046cdc Regenerated RTL in src_SSITH_P3 with TANDEM_VERIF 2020-02-12 09:24:33 +05:30
rsnikhil
30f124db7d Updated Tests/isa/ contents from newer versions in Flute 2020-02-11 20:45:03 -05:00
rsnikhil
c8fde208e9 Fixed typo in TV_Encode.bsv; now successfully running with both GDB and Tandem Verif 2020-02-11 19:55:26 -05:00
rsnikhil
82e56c2908 Fixed Tandem Verif trace gen for CSRRx on WARL regs: report post-WARL-xformed write-data 2020-02-11 15:46:24 -05:00
rsnikhil
db114186af More progress towards Tandem Verification trace generation (detail below)
Now handling all Alu and Fpu pipeline outputs, traps and xRets.
Still todo:
 (1) Mem pipeline outputs (Ld, Lr/Sc, Amo outputs to dest reg)
 (2) For CSRRx, currently reporting WARL pre-write updates; needs to be WARL'd update.
2020-02-10 15:08:08 -05:00
rsnikhil
08db480be3 Merge branch 'master' of https://github.com/bluespec/Toooba 2020-02-07 23:13:35 -05:00
rsnikhil
c0ae2776e8 Further additions to Tandem Verification trace info.
Rd value (destination register) of Integer ops supported
Trap updates (priv and CSR updates) supported.
Still pending: Memory ops Rd value, Fpu Rd value
2020-02-07 23:10:53 -05:00
Niraj Sharma
e35c48efff Merged src_SSITH_P3 and src_SSITH_P3_sim 2020-02-07 21:00:50 +05:30
rsnikhil
af0b1ef415 Incremental additions to Tandem Verification trace gen 2020-02-06 20:46:26 -05:00
rsnikhil
c14c9b3e6c Minor tweaks, mostly cosmetic and $displays 2020-02-06 14:18:16 -05:00
Niraj Sharma
8e0f0afb85 Reflected reset related changes from src_SSITH_P3 to src_SSITH_P3_sim 2020-02-06 17:19:17 +05:30
Niraj Sharma
e02b352bbb Resetting tv_encode whenever the proc is started 2020-02-06 17:17:28 +05:30
Niraj Sharma
454b83fe9a Added corew.start calls after NDM reset and PoR 2020-02-06 17:16:34 +05:30
Niraj Sharma
d8a3c3d754 Generated src_SSITH_P3_sim RTL 2020-02-06 17:14:59 +05:30
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
Rishiyur S. Nikhil
d8ca3c897b Merge pull request #10 from nirajnsharma/master
P3 Release related changes
2020-01-30 19:13:33 -08:00
Niraj Sharma
ce327a1615 Updated SoC_Map in src_SSITH_P3 (synth version)
Regenerated synth RTL
2020-01-30 14:04:29 -05:00
Niraj N Sharma
a0a4093088 Set verbosity to 0 in TV_Encode and Trace_Data2_to_Trace_Data
Updated src_SSITH_P3_sim SoC_Map
2020-01-30 13:39:54 -05:00
Niraj N Sharma
f89ed020d8 Added src_SSITH_P3_sim directory 2020-01-30 20:16:08 +05:30
rsnikhil
6078b7ce19 Removed EXTERNAL_DEBUG_MODULE stuff from CoreW.bsv; added Tandem Verif control flow 2020-01-29 13:19:31 -05:00
rsnikhil
d84ec657d7 Fixed SSITH_P3 version of SoC_Map; regenerated SSITH_P3 RTL 2020-01-28 21:33:56 -05:00
rsnikhil
154ed3d47f Fixed LLCDmaConnect to allow 1,2,4,8-byte accesses from Debug Module 2020-01-28 20:57:39 -05:00
rsnikhil
4a7dd01023 Removed -D EXTERNAL_DEBUG_MODULE in src_SSITH_P3 Makefile, and added an undef in src_Core/Core/CoreW.bsv 2020-01-23 12:25:21 -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