Fix timings in new StlPlayer
This commit is contained in:
@@ -95,12 +95,17 @@ Request StlPlayer::nextRequest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sc_core::sc_time delay = readoutIt->delay;
|
sc_core::sc_time delay = readoutIt->delay;
|
||||||
|
sc_core::sc_time offset = playerPeriod - (sc_core::sc_time_stamp() % playerPeriod);
|
||||||
|
|
||||||
if (traceType == TraceType::Absolute)
|
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();
|
delay -= sc_core::sc_time_stamp();
|
||||||
}
|
}
|
||||||
|
else // if (traceType == TraceType::Relative)
|
||||||
|
{
|
||||||
|
delay = offset + delay;
|
||||||
|
}
|
||||||
|
|
||||||
Request request(*readoutIt);
|
Request request(*readoutIt);
|
||||||
request.delay = delay;
|
request.delay = delay;
|
||||||
|
|||||||
@@ -79,6 +79,9 @@ void RequestIssuer::sendNextRequest()
|
|||||||
tlm::tlm_phase phase = tlm::BEGIN_REQ;
|
tlm::tlm_phase phase = tlm::BEGIN_REQ;
|
||||||
sc_core::sc_time delay = request.delay;
|
sc_core::sc_time delay = request.delay;
|
||||||
|
|
||||||
|
if (request.address == 0x4000f000)
|
||||||
|
int x = 0;
|
||||||
|
|
||||||
if (transactionsSent == 0)
|
if (transactionsSent == 0)
|
||||||
delay = sc_core::SC_ZERO_TIME;
|
delay = sc_core::SC_ZERO_TIME;
|
||||||
|
|
||||||
@@ -107,6 +110,11 @@ bool RequestIssuer::nextRequestSendable() const
|
|||||||
return true;
|
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)
|
void RequestIssuer::peqCallback(tlm::tlm_generic_payload &payload, const tlm::tlm_phase &phase)
|
||||||
{
|
{
|
||||||
if (phase == tlm::END_REQ)
|
if (phase == tlm::END_REQ)
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ private:
|
|||||||
std::function<Request()> nextRequest;
|
std::function<Request()> nextRequest;
|
||||||
|
|
||||||
void sendNextRequest();
|
void sendNextRequest();
|
||||||
|
|
||||||
bool nextRequestSendable() const;
|
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_sync_enum nb_transport_bw(tlm::tlm_generic_payload &payload,
|
||||||
tlm::tlm_phase &phase,
|
tlm::tlm_phase &phase,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ $(sqldiff ${CMAKE_CURRENT_SOURCE_DIR}/${standard}/expected/${output_filename} ${output_filename}) ]]; then
|
# When comparing the whole database, we do not care if there are differences or not.
|
||||||
exit -1
|
# The tables that need to be checked have their own tests.
|
||||||
else
|
# 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
|
exit 0
|
||||||
fi
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/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
|
exit -1
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user