From 7ecae9d9b9cfea4f379b21ddc794a6a618516a89 Mon Sep 17 00:00:00 2001 From: Alexander Richardson Date: Thu, 31 May 2018 10:25:11 +0100 Subject: Also dump the cap hwregs in dump_cp2_state Dump format is the same as for the cap GPRs with DEBUG CAP HWREG as the prefix--- cheri/cheri_prelude_common.sail | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cheri/cheri_prelude_common.sail b/cheri/cheri_prelude_common.sail index 47c8759c..8a2211c2 100644 --- a/cheri/cheri_prelude_common.sail +++ b/cheri/cheri_prelude_common.sail @@ -457,4 +457,15 @@ function dump_cp2_state () = { foreach(i from 0 to 31) { print(concat_str("DEBUG CAP REG ", concat_str(string_of_int(i), capToString(readCapReg(to_bits(5, i)))))) } + print(concat_str("DEBUG CAP HWREG 00", capToString(capRegToCapStruct(C00)))); + print(concat_str("DEBUG CAP HWREG 01", capToString(capRegToCapStruct(CTLSU)))); + print(concat_str("DEBUG CAP HWREG 08", capToString(capRegToCapStruct(CTLSP)))); + /* TODO: these two should not be mirrored to match the FPGA */ + print(concat_str("DEBUG CAP HWREG 22", capToString(capRegToCapStruct(C27)))); + print(concat_str("DEBUG CAP HWREG 23", capToString(capRegToCapStruct(C28)))); + /* KCC, KDC, EPCC */ + print(concat_str("DEBUG CAP HWREG 29", capToString(capRegToCapStruct(C29)))); + print(concat_str("DEBUG CAP HWREG 30", capToString(capRegToCapStruct(C30)))); + print(concat_str("DEBUG CAP HWREG 31", capToString(capRegToCapStruct(C31)))); + } -- cgit v1.2.3 From ebb3a7c46ceb01f6b461def9d34b732508c6333b Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Mon, 4 Jun 2018 13:05:35 +0100 Subject: add missing semi colon in arichardsons patch. --- cheri/cheri_prelude_common.sail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheri/cheri_prelude_common.sail b/cheri/cheri_prelude_common.sail index 8a2211c2..cc4c657a 100644 --- a/cheri/cheri_prelude_common.sail +++ b/cheri/cheri_prelude_common.sail @@ -456,7 +456,7 @@ function dump_cp2_state () = { print(concat_str("DEBUG CAP PCC", capToString(capRegToCapStruct(PCC)))); foreach(i from 0 to 31) { print(concat_str("DEBUG CAP REG ", concat_str(string_of_int(i), capToString(readCapReg(to_bits(5, i)))))) - } + }; print(concat_str("DEBUG CAP HWREG 00", capToString(capRegToCapStruct(C00)))); print(concat_str("DEBUG CAP HWREG 01", capToString(capRegToCapStruct(CTLSU)))); print(concat_str("DEBUG CAP HWREG 08", capToString(capRegToCapStruct(CTLSP)))); -- cgit v1.2.3