gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Modifying internal hardware structures of a CPU

MB
Mehmet Burak Aykenar
Sat, Jan 7, 2012 12:29 PM

Hello everyone,

I have two questions:

  1. I see two ways (if I am not wrong) to modify the properties of the CPU
    and memory hierarchy. The first one is using command line options like "-n
    2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py"
    configuration file and adding objects and assign attributes of the objects
    new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)"

Is there any difference between these two ways to modify the CPU or memory
properties? Can someone please explain what is the benefit of using script
file (se.py)

  1. I want to change the internal structures of the CPU like "numIQEntries"
    or "commitWidth".. I think I need to change the O3CPU.py file in the /src
    directory and build the gem5 again.. Is there any easier option to do this
    modification? Building gem5 each time is a time consuming and inefficient
    way..

Thanks in advance,
Burak

*Mehmet Burak AYKENAR
Graduate Student of Computer Engineering
Research Assistant
TOBB ETU Z-10
Microprocessors Laboratory

*
mbaykenar.etu.edu.tr
mbaykenar(a)etu.edu.tr

Hello everyone, I have two questions: 1) I see two ways (if I am not wrong) to modify the properties of the CPU and memory hierarchy. The first one is using command line options like "-n 2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py" configuration file and adding objects and assign attributes of the objects new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)" Is there any difference between these two ways to modify the CPU or memory properties? Can someone please explain what is the benefit of using script file (se.py) 2) I want to change the internal structures of the CPU like "numIQEntries" or "commitWidth".. I think I need to change the O3CPU.py file in the /src directory and build the gem5 again.. Is there any easier option to do this modification? Building gem5 each time is a time consuming and inefficient way.. Thanks in advance, Burak -- *Mehmet Burak AYKENAR Graduate Student of Computer Engineering Research Assistant **TOBB ETU Z-10 Microprocessors Laboratory* * mbaykenar.etu.edu.tr mbaykenar(a)etu.edu.tr*
MN
Mahmood Naderan
Sat, Jan 7, 2012 12:44 PM

Hi

Can someone please explain what is the benefit of using script file (se.py)

Not all attibutes can be passed to command line. For example, number
of mshr, prefetcher, .... So they should be defined in script

Is there any easier option to do this modification?

See how Caches.py works and is called in se.py
Then you can also create a similar config file for cpu, and modify the
parameters you want.

Hope that helps

On 1/7/12, Mehmet Burak Aykenar <mbaykenar(a)etu.edu.tr> wrote:

Hello everyone,

I have two questions:

  1. I see two ways (if I am not wrong) to modify the properties of the CPU
    and memory hierarchy. The first one is using command line options like "-n
    2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py"
    configuration file and adding objects and assign attributes of the objects
    new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)"

Is there any difference between these two ways to modify the CPU or memory
properties? Can someone please explain what is the benefit of using script
file (se.py)

  1. I want to change the internal structures of the CPU like "numIQEntries"
    or "commitWidth".. I think I need to change the O3CPU.py file in the /src
    directory and build the gem5 again.. Is there any easier option to do this
    modification? Building gem5 each time is a time consuming and inefficient
    way..

Thanks in advance,
Burak

*Mehmet Burak AYKENAR
Graduate Student of Computer Engineering
Research Assistant
TOBB ETU Z-10
Microprocessors Laboratory

*
mbaykenar.etu.edu.tr
mbaykenar(a)etu.edu.tr

--

// Naderan *Mahmood;

Hi >Can someone please explain what is the benefit of using script file (se.py) Not all attibutes can be passed to command line. For example, number of mshr, prefetcher, .... So they should be defined in script >Is there any easier option to do this modification? See how Caches.py works and is called in se.py Then you can also create a similar config file for cpu, and modify the parameters you want. Hope that helps On 1/7/12, Mehmet Burak Aykenar <mbaykenar(a)etu.edu.tr> wrote: > Hello everyone, > > I have two questions: > > 1) I see two ways (if I am not wrong) to modify the properties of the CPU > and memory hierarchy. The first one is using command line options like "-n > 2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py" > configuration file and adding objects and assign attributes of the objects > new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)" > > Is there any difference between these two ways to modify the CPU or memory > properties? Can someone please explain what is the benefit of using script > file (se.py) > > 2) I want to change the internal structures of the CPU like "numIQEntries" > or "commitWidth".. I think I need to change the O3CPU.py file in the /src > directory and build the gem5 again.. Is there any easier option to do this > modification? Building gem5 each time is a time consuming and inefficient > way.. > > Thanks in advance, > Burak > -- > *Mehmet Burak AYKENAR > Graduate Student of Computer Engineering > Research Assistant > **TOBB ETU Z-10 > Microprocessors Laboratory* > * > mbaykenar.etu.edu.tr > mbaykenar(a)etu.edu.tr* > -- -- // Naderan *Mahmood;
MB
Mehmet Burak Aykenar
Sat, Jan 7, 2012 5:22 PM

Hi, thanks for quick reply Mahmood, I appreciate it..

I think I got the idea.. By looking inside the "config.ini" file I changed
internal module attributes of the CPU by adding lines

...
CPUClass.issueToExecuteDelay = 2
CPUClass.decodeWidth = 4
CPUClass.commitWidth = 4
CPUClass.issueWidth = 4
CPUClass.numIQEntries = 32
...

and for the next simulation, I got what I expected. 'config.ini' and
'stats.txt' has changed (the IPC reduced significantly for example)
I assume I did the correct thing :)  ,means if you noticed what I have done
is wrong please inform me :)

Regards,
Burak

2012/1/7 Mahmood Naderan <mahmood.nt(a)gmail.com>

Hi

Can someone please explain what is the benefit of using script file

(se.py)
Not all attibutes can be passed to command line. For example, number
of mshr, prefetcher, .... So they should be defined in script

Is there any easier option to do this modification?

See how Caches.py works and is called in se.py
Then you can also create a similar config file for cpu, and modify the
parameters you want.

Hope that helps

On 1/7/12, Mehmet Burak Aykenar <mbaykenar(a)etu.edu.tr> wrote:

Hello everyone,

I have two questions:

  1. I see two ways (if I am not wrong) to modify the properties of the CPU
    and memory hierarchy. The first one is using command line options like

"-n

2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py"
configuration file and adding objects and assign attributes of the

objects

new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)"

Is there any difference between these two ways to modify the CPU or

memory

properties? Can someone please explain what is the benefit of using

script

file (se.py)

  1. I want to change the internal structures of the CPU like

"numIQEntries"

or "commitWidth".. I think I need to change the O3CPU.py file in the /src
directory and build the gem5 again.. Is there any easier option to do

this

modification? Building gem5 each time is a time consuming and inefficient
way..

Thanks in advance,
Burak

*Mehmet Burak AYKENAR
Graduate Student of Computer Engineering
Research Assistant
TOBB ETU Z-10
Microprocessors Laboratory

*
mbaykenar.etu.edu.tr
mbaykenar(a)etu.edu.tr

--

// Naderan *Mahmood;


gem5-users mailing list
gem5-users(a)gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

!DSPAM:6374,4f083e3e7441685123195!

--
*Mehmet Burak AYKENAR
Graduate Student of Computer Engineering
Research Assistant
TOBB ETU Z-10
Microprocessors Laboratory

*
mbaykenar.etu.edu.tr
mbaykenar(a)etu.edu.tr

Hi, thanks for quick reply Mahmood, I appreciate it.. I think I got the idea.. By looking inside the "config.ini" file I changed internal module attributes of the CPU by adding lines ... CPUClass.issueToExecuteDelay = 2 CPUClass.decodeWidth = 4 CPUClass.commitWidth = 4 CPUClass.issueWidth = 4 CPUClass.numIQEntries = 32 ... and for the next simulation, I got what I expected. 'config.ini' and 'stats.txt' has changed (the IPC reduced significantly for example) I assume I did the correct thing :) ,means if you noticed what I have done is wrong please inform me :) Regards, Burak 2012/1/7 Mahmood Naderan <mahmood.nt(a)gmail.com> > Hi > > >Can someone please explain what is the benefit of using script file > (se.py) > Not all attibutes can be passed to command line. For example, number > of mshr, prefetcher, .... So they should be defined in script > > > >Is there any easier option to do this modification? > See how Caches.py works and is called in se.py > Then you can also create a similar config file for cpu, and modify the > parameters you want. > > Hope that helps > > On 1/7/12, Mehmet Burak Aykenar <mbaykenar(a)etu.edu.tr> wrote: > > Hello everyone, > > > > I have two questions: > > > > 1) I see two ways (if I am not wrong) to modify the properties of the CPU > > and memory hierarchy. The first one is using command line options like > "-n > > 2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py" > > configuration file and adding objects and assign attributes of the > objects > > new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)" > > > > Is there any difference between these two ways to modify the CPU or > memory > > properties? Can someone please explain what is the benefit of using > script > > file (se.py) > > > > 2) I want to change the internal structures of the CPU like > "numIQEntries" > > or "commitWidth".. I think I need to change the O3CPU.py file in the /src > > directory and build the gem5 again.. Is there any easier option to do > this > > modification? Building gem5 each time is a time consuming and inefficient > > way.. > > > > Thanks in advance, > > Burak > > -- > > *Mehmet Burak AYKENAR > > Graduate Student of Computer Engineering > > Research Assistant > > **TOBB ETU Z-10 > > Microprocessors Laboratory* > > * > > mbaykenar.etu.edu.tr > > mbaykenar(a)etu.edu.tr* > > > > > -- > -- > // Naderan *Mahmood; > _______________________________________________ > gem5-users mailing list > gem5-users(a)gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > > > !DSPAM:6374,4f083e3e7441685123195! > > > -- *Mehmet Burak AYKENAR Graduate Student of Computer Engineering Research Assistant **TOBB ETU Z-10 Microprocessors Laboratory* * mbaykenar.etu.edu.tr mbaykenar(a)etu.edu.tr*
AS
Ali Saidi
Sat, Jan 7, 2012 5:42 PM

That's ok, but it would break if you had a different CPU model activated. The better thing to do is something like:

class MyO3Cpu(DerivO3CPU)
issueToExecuteDelay = 2
decodeWidth = 4

and every where in Simulation.py replace DerivO3CPU with MyO3Cpu

Ali

On Jan 7, 2012, at 11:22 AM, Mehmet Burak Aykenar wrote:

Hi, thanks for quick reply Mahmood, I appreciate it..

I think I got the idea.. By looking inside the "config.ini" file I changed internal module attributes of the CPU by adding lines

...
CPUClass.issueToExecuteDelay = 2
CPUClass.decodeWidth = 4
CPUClass.commitWidth = 4
CPUClass.issueWidth = 4
CPUClass.numIQEntries = 32
...

and for the next simulation, I got what I expected. 'config.ini' and 'stats.txt' has changed (the IPC reduced significantly for example)
I assume I did the correct thing :)  ,means if you noticed what I have done is wrong please inform me :)

Regards,
Burak

2012/1/7 Mahmood Naderan <mahmood.nt(a)gmail.com>
Hi

Can someone please explain what is the benefit of using script file (se.py)

Not all attibutes can be passed to command line. For example, number
of mshr, prefetcher, .... So they should be defined in script

Is there any easier option to do this modification?

See how Caches.py works and is called in se.py
Then you can also create a similar config file for cpu, and modify the
parameters you want.

Hope that helps

On 1/7/12, Mehmet Burak Aykenar <mbaykenar(a)etu.edu.tr> wrote:

Hello everyone,

I have two questions:

  1. I see two ways (if I am not wrong) to modify the properties of the CPU
    and memory hierarchy. The first one is using command line options like "-n
    2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py"
    configuration file and adding objects and assign attributes of the objects
    new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)"

Is there any difference between these two ways to modify the CPU or memory
properties? Can someone please explain what is the benefit of using script
file (se.py)

  1. I want to change the internal structures of the CPU like "numIQEntries"
    or "commitWidth".. I think I need to change the O3CPU.py file in the /src
    directory and build the gem5 again.. Is there any easier option to do this
    modification? Building gem5 each time is a time consuming and inefficient
    way..

Thanks in advance,
Burak

*Mehmet Burak AYKENAR
Graduate Student of Computer Engineering
Research Assistant
TOBB ETU Z-10
Microprocessors Laboratory

*
mbaykenar.etu.edu.tr
mbaykenar(a)etu.edu.tr

--

// Naderan *Mahmood;


gem5-users mailing list
gem5-users(a)gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

!DSPAM:6374,4f083e3e7441685123195!

--
Mehmet Burak AYKENAR
Graduate Student of Computer Engineering
Research Assistant
TOBB ETU Z-10
Microprocessors Laboratory

mbaykenar.etu.edu.tr
mbaykenar(a)etu.edu.tr


gem5-users mailing list
gem5-users(a)gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

That's ok, but it would break if you had a different CPU model activated. The better thing to do is something like: class MyO3Cpu(DerivO3CPU) issueToExecuteDelay = 2 decodeWidth = 4 … and every where in Simulation.py replace DerivO3CPU with MyO3Cpu Ali On Jan 7, 2012, at 11:22 AM, Mehmet Burak Aykenar wrote: > Hi, thanks for quick reply Mahmood, I appreciate it.. > > I think I got the idea.. By looking inside the "config.ini" file I changed internal module attributes of the CPU by adding lines > > ... > CPUClass.issueToExecuteDelay = 2 > CPUClass.decodeWidth = 4 > CPUClass.commitWidth = 4 > CPUClass.issueWidth = 4 > CPUClass.numIQEntries = 32 > ... > > and for the next simulation, I got what I expected. 'config.ini' and 'stats.txt' has changed (the IPC reduced significantly for example) > I assume I did the correct thing :) ,means if you noticed what I have done is wrong please inform me :) > > Regards, > Burak > > 2012/1/7 Mahmood Naderan <mahmood.nt(a)gmail.com> > Hi > > >Can someone please explain what is the benefit of using script file (se.py) > Not all attibutes can be passed to command line. For example, number > of mshr, prefetcher, .... So they should be defined in script > > > >Is there any easier option to do this modification? > See how Caches.py works and is called in se.py > Then you can also create a similar config file for cpu, and modify the > parameters you want. > > Hope that helps > > On 1/7/12, Mehmet Burak Aykenar <mbaykenar(a)etu.edu.tr> wrote: > > Hello everyone, > > > > I have two questions: > > > > 1) I see two ways (if I am not wrong) to modify the properties of the CPU > > and memory hierarchy. The first one is using command line options like "-n > > 2" or "--l1d_size=L1D_SIZE" etc.. The second one is modifying the "se.py" > > configuration file and adding objects and assign attributes of the objects > > new values for example: "cpu = SimpleCPU(clock = '2GHz', width = 2)" > > > > Is there any difference between these two ways to modify the CPU or memory > > properties? Can someone please explain what is the benefit of using script > > file (se.py) > > > > 2) I want to change the internal structures of the CPU like "numIQEntries" > > or "commitWidth".. I think I need to change the O3CPU.py file in the /src > > directory and build the gem5 again.. Is there any easier option to do this > > modification? Building gem5 each time is a time consuming and inefficient > > way.. > > > > Thanks in advance, > > Burak > > -- > > *Mehmet Burak AYKENAR > > Graduate Student of Computer Engineering > > Research Assistant > > **TOBB ETU Z-10 > > Microprocessors Laboratory* > > * > > mbaykenar.etu.edu.tr > > mbaykenar(a)etu.edu.tr* > > > > > -- > -- > // Naderan *Mahmood; > _______________________________________________ > gem5-users mailing list > gem5-users(a)gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > > > !DSPAM:6374,4f083e3e7441685123195! > > > > > > -- > Mehmet Burak AYKENAR > Graduate Student of Computer Engineering > Research Assistant > TOBB ETU Z-10 > Microprocessors Laboratory > > mbaykenar.etu.edu.tr > mbaykenar(a)etu.edu.tr > _______________________________________________ > gem5-users mailing list > gem5-users(a)gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users