From 1da209140cd7bf267315b10698bf14c21a76b1b8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 7 Jan 2013 13:05:37 -0500 Subject: cpu: Add support for protobuf input for the trace generator This patch adds support for reading input traces encoded using protobuf according to what is done in the CommMonitor. A follow-up patch adds a Python script that can be used to convert the previously used ASCII traces to protobuf equivalents. The appropriate regression input is updated as part of this patch. --- tests/configs/tgen-simple-dram.py | 5 +++++ tests/configs/tgen-simple-mem.py | 5 +++++ tests/quick/se/70.tgen/tgen-simple-mem.trc | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/configs/tgen-simple-dram.py b/tests/configs/tgen-simple-dram.py index 76762cdc8..0e9edc171 100644 --- a/tests/configs/tgen-simple-dram.py +++ b/tests/configs/tgen-simple-dram.py @@ -38,6 +38,11 @@ import m5 from m5.objects import * +# both traffic generator and communication monitor are only available +# if we have protobuf support, so potentially skip this test +require_sim_object("TrafficGen") +require_sim_object("CommMonitor") + # even if this is only a traffic generator, call it cpu to make sure # the scripts are happy cpu = TrafficGen(config_file = "tests/quick/se/70.tgen/tgen-simple-dram.cfg") diff --git a/tests/configs/tgen-simple-mem.py b/tests/configs/tgen-simple-mem.py index ae7364214..d402e557c 100644 --- a/tests/configs/tgen-simple-mem.py +++ b/tests/configs/tgen-simple-mem.py @@ -38,6 +38,11 @@ import m5 from m5.objects import * +# both traffic generator and communication monitor are only available +# if we have protobuf support, so potentially skip this test +require_sim_object("TrafficGen") +require_sim_object("CommMonitor") + # even if this is only a traffic generator, call it cpu to make sure # the scripts are happy cpu = TrafficGen(config_file = "tests/quick/se/70.tgen/tgen-simple-mem.cfg") diff --git a/tests/quick/se/70.tgen/tgen-simple-mem.trc b/tests/quick/se/70.tgen/tgen-simple-mem.trc index e260f8a65..58f0e1115 100644 --- a/tests/quick/se/70.tgen/tgen-simple-mem.trc +++ b/tests/quick/se/70.tgen/tgen-simple-mem.trc @@ -1,2 +1,2 @@ -r,19088743,64,1000 -w,48879,64,4000 +gem51 +)Converted ASCII trace tgen-simple-mem.trc 犍 @  @ \ No newline at end of file -- cgit v1.2.3