cpu: TraceGen fix for tick frequency check

Bug fix for check on protobuf file frequency being different than
global frequency.

The ASCII encoder script is also fixed, and the example trace used in
the regressions is updated.
This commit is contained in:
Matteo Andreozzi 2016-02-24 04:16:55 -05:00
parent e2cea54deb
commit 496a8c6c92
3 changed files with 6 additions and 8 deletions

View File

@ -420,11 +420,9 @@ TraceGen::InputStream::init()
ProtoMessage::PacketHeader header_msg;
if (!trace.read(header_msg)) {
panic("Failed to read packet header from trace\n");
if (header_msg.tick_freq() != SimClock::Frequency) {
panic("Trace was recorded with a different tick frequency %d\n",
header_msg.tick_freq());
}
} else if (header_msg.tick_freq() != SimClock::Frequency) {
panic("Trace was recorded with a different tick frequency %d\n",
header_msg.tick_freq());
}
}

View File

@ -1,2 +1,2 @@
gem51
)Converted ASCII trace tgen-simple-mem.trc€”ëÜ èçŠ<C3A7> @  ïý @
gem5)
Converted ASCII trace output.txt ”¥<E2809D> èçŠ<C3A7> @  ïý @

View File

@ -105,7 +105,7 @@ def main():
header = packet_pb2.PacketHeader()
header.obj_id = "Converted ASCII trace " + sys.argv[1]
# Assume the default tick rate
header.tick_freq = 1000000000
header.tick_freq = 1000000000000
protolib.encodeMessage(proto_out, header)
# For each line in the ASCII trace, create a packet message and