Thanks Steve. I read thru the config hierarchy. I didnt get how I can add a module without touching the c++ files. If I want to add a NewMem, how do I add it in the System unless I add relevant lines (like creating function port) in the system.cc file?
Sujay ----- Original Message ----- From: "Steve Reinhardt" <[email protected]> To: "M5 users mailing list" <[email protected]> Sent: Tuesday, July 28, 2009 4:17 PM Subject: Re: [m5-users] adding a new memory module in the System That should just work as you have it (adding a comma at the end of the newmem line of course). Basically you can add child objects anywhere you want; even though the syntax is the same as parameters, you don't need to touch the C++ to do that. See http://m5sim.org/wiki/index.php/Simulation_Scripts_Explained#The_configuration_hierarchy Steve On Tue, Jul 28, 2009 at 11:45 AM, Sujay Phadke<[email protected]> wrote: > Hello, > I want to add a new memory module in the system. (say NewMem). It > connects to dram on one side. I need to include this NewMem in the > instantiation of the system as: > > system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)], > physmem = PhysicalMemory(range=AddrRange("512MB")), > newmem = NewMem(...) > membus = Bus(), mem_mode = test_mem_mode) > > > Is this correct? For this, do I have to modify the original system.cc file > to include the definition for NewMem or is there a better way of doing > this? > > Thanks, > Sujay > > _______________________________________________ > 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
