diff --git a/src/simulator/simulator/player/StlPlayer.cpp b/src/simulator/simulator/player/StlPlayer.cpp index 2b29d794..fb3c2017 100644 --- a/src/simulator/simulator/player/StlPlayer.cpp +++ b/src/simulator/simulator/player/StlPlayer.cpp @@ -95,12 +95,17 @@ Request StlPlayer::nextRequest() } sc_core::sc_time delay = readoutIt->delay; + sc_core::sc_time offset = playerPeriod - (sc_core::sc_time_stamp() % playerPeriod); if (traceType == TraceType::Absolute) { - delay = std::max(sc_core::sc_time_stamp(), delay); + delay = std::max(sc_core::sc_time_stamp() + offset, delay); delay -= sc_core::sc_time_stamp(); } + else // if (traceType == TraceType::Relative) + { + delay = offset + delay; + } Request request(*readoutIt); request.delay = delay; diff --git a/src/simulator/simulator/request/RequestIssuer.cpp b/src/simulator/simulator/request/RequestIssuer.cpp index 27c76a1b..a7371fc6 100644 --- a/src/simulator/simulator/request/RequestIssuer.cpp +++ b/src/simulator/simulator/request/RequestIssuer.cpp @@ -79,6 +79,9 @@ void RequestIssuer::sendNextRequest() tlm::tlm_phase phase = tlm::BEGIN_REQ; sc_core::sc_time delay = request.delay; + if (request.address == 0x4000f000) + int x = 0; + if (transactionsSent == 0) delay = sc_core::SC_ZERO_TIME; @@ -107,6 +110,11 @@ bool RequestIssuer::nextRequestSendable() const return true; } +sc_core::sc_time RequestIssuer::alignToClock(sc_core::sc_time time) const +{ + +} + void RequestIssuer::peqCallback(tlm::tlm_generic_payload &payload, const tlm::tlm_phase &phase) { if (phase == tlm::END_REQ) diff --git a/src/simulator/simulator/request/RequestIssuer.h b/src/simulator/simulator/request/RequestIssuer.h index 1d5b3939..7c7d8c69 100644 --- a/src/simulator/simulator/request/RequestIssuer.h +++ b/src/simulator/simulator/request/RequestIssuer.h @@ -82,8 +82,8 @@ private: std::function nextRequest; void sendNextRequest(); - bool nextRequestSendable() const; + sc_core::sc_time alignToClock(sc_core::sc_time time) const; tlm::tlm_sync_enum nb_transport_bw(tlm::tlm_generic_payload &payload, tlm::tlm_phase &phase, diff --git a/tests/tests_regression/compare.sh b/tests/tests_regression/compare.sh index e5262576..859e8044 100755 --- a/tests/tests_regression/compare.sh +++ b/tests/tests_regression/compare.sh @@ -1,7 +1,9 @@ #!/bin/bash -if [[ $(sqldiff ${CMAKE_CURRENT_SOURCE_DIR}/${standard}/expected/${output_filename} ${output_filename}) ]]; then - exit -1 -else - exit 0 -fi +# When comparing the whole database, we do not care if there are differences or not. +# The tables that need to be checked have their own tests. +# The purpose of this script is solely to output the differences of the two databases +# so that they can be inspected easily. + +sqldiff ${CMAKE_CURRENT_SOURCE_DIR}/${standard}/expected/${output_filename} ${output_filename} +exit 0 diff --git a/tests/tests_regression/compare_table.sh b/tests/tests_regression/compare_table.sh index 8978e49d..1e709f07 100755 --- a/tests/tests_regression/compare_table.sh +++ b/tests/tests_regression/compare_table.sh @@ -1,6 +1,9 @@ #!/bin/bash -if [[ $(sqldiff --table ${table} ${CMAKE_CURRENT_SOURCE_DIR}/${standard}/expected/${output_filename} ${output_filename}) ]]; then +stdout=$(sqldiff --table ${table} ${CMAKE_CURRENT_SOURCE_DIR}/${standard}/expected/${output_filename} ${output_filename}) + +if [[ $stdout ]]; then + echo $stdout exit -1 else exit 0