On Thu, 7 Jun 2012, xuxin wrote:


Dear all

 I'm sorry to bother you.

 I read tutorials and find special opcodes in M5 is very useful.
I want to insert a new operation into the source codejust for notifying each
CPU how many times this operation does.
1. is that practical in gem5 ?
2. if it's possible, how to do it ?


Yes, it is possible to insert instructions in to the source code that are not part of the ISA definition. You might want to take a look at this page -- http://gem5.org/M5ops. It seems old, but would get you started.

Then, take a look at the files in util/m5, opcodes for some of the common operations have been defined. You can insert calls to functions defined util/m5/m5op.h, and then compile your application with the *.S file appropriate for your architecture.

--
Nilay
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to