From 9f22381088fb1ace24a0499125cdab093abadbbf Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Mon, 27 Nov 2017 00:15:20 +0100 Subject: [PATCH] Fixed transaction linking and gpio visualization --- html/ws.html | 3 ++- riscv.sc/src/sysc/core_complex.cpp | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/html/ws.html b/html/ws.html index b3b0441..56edd32 100644 --- a/html/ws.html +++ b/html/ws.html @@ -11,8 +11,9 @@ li { font-family: Courier; list-style-type: '>';} pre { margin-top:0; margin-bottom:0;} .term { background-color:black; color:white; font-weight:bold;padding-top:10px; padding-bottom:10px; max-height:400px; overflow: scroll;} span.timestamp { font-family: monospace; white-space: pre;width: 50px;} +span.value_z { background-color: darkblue;} span.value_1 { background-color: green;} -span.value_0 { background-color: blue;} +span.value_0 { background-color: yellow;} span.value_x { background-color: red;} diff --git a/riscv.sc/src/sysc/core_complex.cpp b/riscv.sc/src/sysc/core_complex.cpp index 36acdd3..a3f48c8 100644 --- a/riscv.sc/src/sysc/core_complex.cpp +++ b/riscv.sc/src/sysc/core_complex.cpp @@ -29,7 +29,7 @@ // POSSIBILITY OF SUCH DAMAGE. // // Contributors: -// eyck@minres.com - initial API and implementation +// eyck@minres.com - initial implementation // // //////////////////////////////////////////////////////////////////////////////// @@ -279,6 +279,7 @@ void core_complex::disass_output(uint64_t pc, const std::string instr_str) { tr_handle.record_attribute("INSTR", instr_str); tr_handle.record_attribute("MODE", lvl[cpu->get_mode()]); tr_handle.record_attribute("MSTATUS", cpu->get_state().mstatus.st.value); + tr_handle.record_attribute("LTIME_START", quantum_keeper.get_current_time().value()/1000); #endif } @@ -326,7 +327,9 @@ bool core_complex::read_mem(uint64_t addr, unsigned length, uint8_t *const data, auto delay{quantum_keeper.get_local_time()}; #ifdef WITH_SCV if(m_db!=nullptr && tr_handle.is_valid()){ - if(is_fetch && tr_handle.is_active()) tr_handle.end_transaction(); + if(is_fetch && tr_handle.is_active()){ + tr_handle.end_transaction(); + } auto preExt = new scv4tlm::tlm_recording_extension(tr_handle, this); gp.set_extension(preExt); } @@ -371,6 +374,12 @@ bool core_complex::write_mem(uint64_t addr, unsigned length, const uint8_t *cons gp.set_data_length(length); gp.set_streaming_width(length); auto delay{quantum_keeper.get_local_time()}; +#ifdef WITH_SCV + if(m_db!=nullptr && tr_handle.is_valid()){ + auto preExt = new scv4tlm::tlm_recording_extension(tr_handle, this); + gp.set_extension(preExt); + } +#endif initiator->b_transport(gp, delay); quantum_keeper.set(delay); LOG(TRACE) << "write_mem(0x" << std::hex << addr << ") : " << data;