Hi Gabe,
 Thanks for your reply. Actually I forgot to mention that I am using M5 
ver 1.1 but the file m5/arch/alpha/isa_desc in ver1.1 is similar to the 
file you mentioned. Correct me if I am wrong.Also I am new to M5 so I 
dont know how to add a print statement in the above mentioned file. Can 
you please give me any example?
 I found an instruction rpcc which gives the current clock tick. I tried 
putting this instruction before the instruction for which I need the 
clock tick(in the assembly code for my C program), but I was unable to 
understand how it works. Can you help me with this?

Thanks again, 
Prabhat

On Thu, 29 Mar 2007, Gabe Black wrote:

>     If you want to know about all of the instructions that are being
> executed, you can add --trace-flag=InstExec to your command line after
> the m5 binary and before the configuration script. That will print the
> disassembly for each instruction as it executes, as well as some other
> information including the tick. If you want to change the code that's
> executed for a particular instruction, to, for instance, print out a
> message showing the current tick (curTick), you should look in
> src/arch/alpha/isa/decoder.isa, assuming you're using Alpha. That file,
> like everything else in the "isa" directory, is written in a custom
> language designed for describing ISAs in m5. You should be able to add a
> print statement there without too much trouble.
> 
> Gabe
> 
> Prabhat Kumar wrote:
> > I am using M5 to do some simulation and I am stuck with the following 
> > problem. I want to know what particular instruction is currently executed. 
> > Is it possible to do this in M5:
> >
> > e.g.,
> > ADD r1 r1 r3
> > SUB r3 r2 r1
> > ...
> > ...
> > SUB r1 r2 r3
> > ...
> > ...
> > ADD r4 r4 r3
> > ...
> > ...
> >
> > Is it possible to know at which clock tick 'SUB r1 r2 r3' instruction is 
> > executed my M5?
> >
> > In other words, how can I find the code which actually executes the 
> > instructions in the binary?
> >
> > Thanks,
> > Prabhat
> >
> >
> > _______________________________________________
> > m5-users mailing list
> > [email protected]
> > http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
> >   
> 
> _______________________________________________
> m5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
> 

_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to