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,12 +420,10 @@ TraceGen::InputStream::init()
ProtoMessage::PacketHeader header_msg; ProtoMessage::PacketHeader header_msg;
if (!trace.read(header_msg)) { if (!trace.read(header_msg)) {
panic("Failed to read packet header from trace\n"); panic("Failed to read packet header from trace\n");
} else if (header_msg.tick_freq() != SimClock::Frequency) {
if (header_msg.tick_freq() != SimClock::Frequency) {
panic("Trace was recorded with a different tick frequency %d\n", panic("Trace was recorded with a different tick frequency %d\n",
header_msg.tick_freq()); header_msg.tick_freq());
} }
}
} }
void void

View file

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

View file

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