I got the simulator to run again.
I think the problem was that swig couldn't find the SPMemory destructor.
The destructor was coded in the header file. I just moved it to the .cc file
and it worked.
Problem solved, at least for now hehe
Thanks for the help!

On Thu, Nov 18, 2010 at 8:48 AM, Gustavo Henrique Nihei
<[email protected]>wrote:

> On Wed, Nov 17, 2010 at 7:52 PM, Gabe Black <[email protected]> wrote:
>
>> You might be accidentally assigning an individual SPMemory to the
>> parameter instead of a list of SPMemory objects.
>
>
> I don't know if that is the case.
> "System.spm" is the list of SPMemory objects. After the following loop, for
> a 3-cpu configuration, the list has the expected 3 SPMemory objects. An
> example of a output from the print:
> "[<m5.objects.SPM.SPMemory object at 0x149b250>, <m5.objects.SPM.SPMemory
> object at 0x149b850>, <m5.objects.SPM.SPMemory object at 0x149bdd0>]"
>
> Here is the code that sets up the list of objects:
>
> for i, cpu in enumerate(cpus):
>     cpu.addPrivateSplitL1Caches(L1(size = options.l1size, assoc = 1),
>                                 L1(size = options.l1size, assoc = 4))
>     cpu.addScratchpadMem(SPMemory(size = options.spmsize,
> latency = options.spmlatency))
>     system.spm.append(cpu.spm)
>     cpu.connectMemPorts(system.toL2bus)
>     system.spm[i]._parent = system
>
> I don't know it that's the right thing to do, but I had to forcibly change
> the parent of each SPMemory to "system" because m5 was throwing the
> following error:
> "RuntimeError: SimObjectVector elements have inconsistent parent value."
>
> The only line I added to the System.py file was:
> => spm = VectorParam.SPMemory([], "scratchpad memory")
>
> I forgot to mention in the first message that I'm using m5-dev.
>
> Gabe
>>
>> Gustavo Henrique Nihei wrote:
>> > Hi,
>> >
>> > I created a custom section in the object file, and I need this section
>> > to be loaded in several memory modules besides the PhysicalMemory.
>> > At first, each of these memory modules are connected to a CPU core,
>> > behaving like a scratchpad memory.
>> >
>> > Is there an easy way to achieve that?
>> >
>> > I've already modified the ObjectFile, ElfObject, Process and
>> > SparcLiveProcess classes.
>> > I also added a VectorParam of those memory modules (SPMemory) in the
>> > System.py script, which in turn generated a new std::vector in the
>> > SystemParams file.
>> >
>> > * spm = VectorParam.SPMemory([], "scratchpad memory")
>> >
>> > This vector is populated in the simulation script.
>> > Now, when trying to start the simulation, I'm stuck with the following
>> > error:
>> >
>> > * TypeError: object of type 'SwigPyObject' has no len()
>> > * swig/python detected a memory leak of type 'std::vector< SPMemory *
>> > > *', no destructor found.
>> >
>> > I am sure that the vector is not empty, since len() returns the
>> > expected number of elements.
>> >
>> > Thanks in advance.
>> >
>> > --
>> > Gustavo Henrique Nihei
>> >
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > 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
>>
>
>
>
> --
> Gustavo Henrique Nihei
> LAPS - Laboratório de Automação do Projeto de Sistemas
> NIME - Núcleo Interdepartamental de Microeletrônica
> Universidade Federal de Santa Catarina
> Florianópolis - Santa Catarina - Brasil
>
>


-- 
Gustavo Henrique Nihei
LAPS - Laboratório de Automação do Projeto de Sistemas
NIME - Núcleo Interdepartamental de Microeletrônica
Universidade Federal de Santa Catarina
Florianópolis - Santa Catarina - Brasil
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to