How is the CPU speed implemented in GEM5?

I'm browsing the source code, but can't seem to find the portion that
actually establishes how many simulation ticks actually constitute a
CPU cycle.

I'm trying to find this out for the following reason:
- I generated memory access traces with GEM5. Each access in the trace
has a timestamp (which is measured in 1 ps ticks).
- However, when I divide the alleged processor cycle time by the
timestamps in the trace, i'm getting a fraction (instead of an
integer).

I'll elaborate.  I use the following command to invoke gem5:

./gem5.opt  --trace-file=output.txt configs/example/se.py
--cpu-type=detailed --sys-clock=1.1GHz --cpu-clock=1.1GHz --caches -c
a2time01

This combined to a small modification in the SimpleDRAM code yielded
the trace below (only showing a couple of lines...):

   1818: system.physmem: Memory request of 64 bytes for address: READ b80
  39087: system.physmem: Memory request of 64 bytes for address: READ bc0
  78174: system.physmem: Memory request of 64 bytes for address: READ c00
  82846: system.physmem: Memory request of 64 bytes for address: READ 5e40
  87518: system.physmem: Memory request of 64 bytes for address: READ 87f00
  92190: system.physmem: Memory request of 64 bytes for address: READ bc0
 122715: system.physmem: Memory request of 64 bytes for address: READ 5e80
 128169: system.physmem: Memory request of 64 bytes for address: READ 60c0
 162711: system.physmem: Memory request of 64 bytes for address: READ 5ec0
 170892: system.physmem: Memory request of 64 bytes for address: READ 87dc0
(the number on the left represents the simulation tick).

My point is: a 1.1GHz frequency means a cycle time of approx.
909.09ps. Given the 1ps simulation tick from GEM5, I was expecting
each processor cycle to contain 909 simulation ticks.

Although most of the trace timestamps are divisible by 909, there are
counter examples:
92190/909=101.4191419141914191419141914191419141914191419141914191419141914191\
419141914191419141914191419141914191

This makes no sense, given that the processor and the system clock are the same.


Although this is not exactly important for my experiments, it is
really bothering me. I need to know this so I can have some peace of
mind :)




Thanks in advance,
   Leonardo Ecco.
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to