Hi Hongyuan,

From my personal experience, tool #1 has been broken for quite some time and when I looked at it, it was far too complicated for me to reverse-engineer and fix.

I've had much more success with #2, but for various reasons, I can't make my updated version available yet. It probably wouldn't do what you need it to anyway.

#2 might look a bit complex, but all it does is take a template McPAT XML file (mcpat-template.xml) and plug in values from gem5's config.ini and stats.txt. Most of the values in mcpat-template.xml are hardwired, but some are of the form value="{...}". The script just replaces everything inside {} with values from gem5.

If I remember correctly, the problems with tool #2 are that the format of stats.txt has changed slightly, there are some values in the template that shouldn't be hardwired but are, and in some cases the template is picking up the wrong value from gem5.

To get #2 to work, the first thing you'd need to do is get m5-mcpat.pl to correctly fill in the template. Depending on how comfortable you are with Perl, you might be better off rolling your own script in something like Python to complete the template--m5-mcpat.pl has some particularly nasty Perl in it. Then it's just case of figuring out what the values in mcpat-template.xml correspond to in config.ini and stats.txt. Here you can focus on the parameters you're actually researching. For the CPU core, this isn't too difficult; if you're working on something like cache or NoC, it could be hard.

Keep in mind that McPAT isn't nearly as configurable as gem5, so a lot of the things you can do in gem5 won't readily translate over to McPAT.

Hope this helps.

-Erik


On 05/10/12 04:26, Ding, Hongyuan wrote:
Dear All,
I'm new to gem5. Recently I tired to integrate McPAT on gem5. I found two possible tools: 1. m5-mcpat-parse-se.py, http://cseweb.ucsd.edu/~rstrong/ <http://cseweb.ucsd.edu/%7Erstrong/> 2. m5-mcpat.pl, https://www.cl.cam.ac.uk/~acr31/sicsa/ <https://www.cl.cam.ac.uk/%7Eacr31/sicsa/>

I tried a simple example in gem5 to get the output files:
/*build/ARM/gem5.opt configs/example/se.py -c tests/test-progs/hello/bin/arm/linux/hello*/
/*
*/
I used m5-mcpat-parse-se.py to transform the output files but got the following error information:
/*ERROR, UNEXPECTED EXCEPTION */
/*int() argument must be a string or a number, not 'NoneType' */
/*Traceback (most recent call last): */
/* File "m5-mcpat-parse-se.py", line 1896, in <module> */
/* exit_code = main() */
/* File "m5-mcpat-parse-se.py", line 1847, in main */
/* run() */
/* File "m5-mcpat-parse-se.py", line 1036, in run */
/* parseSystemConfig(config_file_path, stat_file_path, out_file_path, out_file_path_2, component_hash, stats_hash) */
/* File "m5-mcpat-parse-se.py", line 1682, in parseSystemConfig */
/* createComponentTree (cht, sht) */
/* File "m5-mcpat-parse-se.py", line 1568, in createComponentTree */
/* generateCalcStats(cht, sht) */
/* File "m5-mcpat-parse-se.py", line 1494, in generateCalcStats */
/* cht[options.system_name].statistics["total_cycles"] = str(int(sht["%s.sim_ticks"%(options.system_name)])/int(fastest_clock))*/ /*TypeError: int() argument must be a string or a number, not 'NoneType' */
/*
*/
I used m5-mcpat.pl to get the xml file and used mcpat-exec.pl to run McPAT, but also got errors:
*/Parse error (couldn't find runtime_sec in XML file)/*
*/
/*
Then I used McPAT directly to run the XML file generated by m5-mcpat.pl, but got the following error information:
*/ERROR: no valid tag organizations found/*
*/
/*
I guess these two tools are too old to support the current version of gem5. Does anyone has a modified tools for McPAT integration or some clues on how to fix it?
Thank you very much for any comments!

--
Best regards,
Hongyuan Ding


_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to