Hi Andreas,
Thanks for your response. Can you please tell me how to instantiate the
probe. I tried modifying the se.py file as:
# Create a separate clock domain for the CPUs
system.cpu_clk_domain = SrcClockDomain(clock = options.cpu_clock,
voltage_domain =
system.cpu_voltage_domain)
# to calculate stack distance
system.monitor = CommMonitor()
system.monitor.stackdist = StackDistProbe(verify = True)
And also changed BaseCPU.py as:
def addTwoLevelCacheHierarchy(self, ic, dc, l2c, iwc = None, dwc = None):
self.addPrivateSplitL1Caches(ic, dc, iwc, dwc)
self.toL2Bus = L2XBar()
self.connectCachedPorts(self.toL2Bus)
self.l2cache = l2c
self.toL2Bus.master = self.l2cache.cpu_side
self._cached_ports = ['l2cache.mem_side']
# to calculate stack distance
self.l2MONITOR = StackDistProbe(verify = True)
self._cached_ports = self.l2MONITOR.slave
self.l2MONITOR.master = l2cache.mem_side
When I tried to run my program I got an error as "fatal: Communication
monitor is not connected on both sides."
Can you please tell me if I am approaching in the right direction and what
are the other things to be done.
Thanks
On Mon, Nov 2, 2015 at 2:10 PM, Andreas Hansson <[email protected]>
wrote:
> Hi Bhaskar,
>
> There are a few steps you need to take, and it involves a few
> widely-adopted gem5 concepts:
>
> - First, the stack distance calculator is a probe, and the output is in
> the shape of gem5 stats. Thus, you need to instantiate the probe, and
> attach it to a probe point.
>
> - Second, to be able to attach the probe in various locations in the
> memory system (core to L1, before the L2, in front of the system memory),
> we use a module called a CommMonitor, which has a bunch of generic stats,
> but also suitable packet probe points.
>
> Consequently, you need to modify your script that assembles and configures
> the system, in your case se.py, and instantiate a CommMonitor, connect it
> where you want to monitor the communication, then instantiate a
> StackDistProbe and attach it to the monitor you just instantiated. The bad
> news is that it involves quite a few steps. The good news is that these are
> all things you will need to do as a gem5 user in any case, so better get
> used to it :-).
>
> For an example, have a look at one of the regression scripts,
> tests/config/tgen-simple-mem.py. This script includes both trace
> generation, and calculation of stack distance. Note that you don’t need to
> set "verify = True" on the StackDistProbe. If you do you will calculate the
> stack distance both using a clever algorithm, and a “naïve” stack which is
> a lot slower.
>
> Andreas
>
>
> From: gem5-users <[email protected]> on behalf of Bhaskar
> Kalita <[email protected]>
> Reply-To: gem5 users mailing list <[email protected]>
> Date: Sunday, 1 November 2015 at 22:08
> To: "[email protected]" <[email protected]>
> Subject: [gem5-users] How to use stack distance calculator in gem5.
>
> Hi
> I am Bhaskar. I am a final year B.E student. For my final year project I
> am using the gem5 simulator. I need to collect the stack distance of
> programs using gem5. I used the --debug-flag="StackDist", but it did not
> print anything. I also tried setting the verifyStack flag in
> mem/stack_dist_calc.hh to true as:
> // Flag to enable verification of stack. (Slows down the simulation)
> const bool verifyStack=true;
> but it did not work too. For reference this is the command line am usuing:
> build/X86/gem5.debug --debug-flag='StackDist' --debug-file='sdp.trc.gz'
> --stats-file=forij.txt --dump-config=for.ini --json-config=for.json
> configs/example/se.py --num-cpus=1 --cpu-type=DerivO3CPU --caches
> --l1i_size=32kB --l1d_size=32kB --l2cache --num-l2caches=1 --l2_size=256kB
> --l2_assoc=4 -c "bench/x86/forij;"
>
> Can you please guide me through my problem and tell me to do the necessary
> steps.
>
> Thanks for your support
>
> -Bhaskar
>
>
>
> ------------------------------
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users