Yes.  'type' is reserved.  You can't use it.

If by line 37 of params.py, you really mean line 409, I'm fine with that.

  Nate

On Mon, Jun 2, 2008 at 10:24 PM, Gabe Black <[EMAIL PROTECTED]> wrote:
> I figured out both of these problems shortly after writing this email. I
> hate it when I do that too. I have two "type" fields in X86E820Entry, one
> for the metaclass, one for the class class. I'm supposing I have to rename
> the class class one? Also, line 37 of params.py should go away. The Addr
> type used to be defined in arch/isa_traits.hh, but fairly far back it was
> moved to sim/hosts.hh which is always being included. I can make a patch for
> that but I wanted to pass it by at least Nate first.
>
> Gabe
>
> Gabe Black wrote:
>>
>>   I'm trying to make a SimObject to represent e820 entries so they can be
>> manipulated by python, but for some reason it's not making a create method.
>> My python class looks like this:
>>
>>
>> class X86E820Entry(SimObject):
>>   type = 'X86E820Entry'
>>   cxx_namespace = 'X86ISA'
>>   cxx_class = 'E820Entry'
>>
>>   addr = Param.Addr(0, 'address of the beginning of the region')
>>   size = Param.MemorySize('0B', 'size of the region')
>>   type = Param.UInt64('type of the region')
>>
>>
>> and the params header file it's generating looks like this:
>>
>> #ifndef __PARAMS__X86E820Entry
>> #define __PARAMS__X86E820Entry
>>
>> #include "arch/isa_traits.hh"
>> #include "sim/host.hh"
>> namespace X86ISA { class E820Entry; }
>>
>> #include "params/SimObject.hh"
>>
>> struct X86E820EntryParams : public SimObjectParams
>> {
>>   Addr addr;
>>   uint64_t size;
>>   uint64_t type;
>> };
>>
>> #endif
>>
>>
>> This looks basically the same as a corresponding E820Table class, except
>> that one works. Also, I'm not sure why specifically it's there, but I don't
>> think the #include "arch/isa_traits.hh" is necessary in this case. That's
>> probably not a big deal other than lengthening compiles and an outside
>> chance of introducing circular includes.
>>
>> Gabe
>> _______________________________________________
>> m5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/m5-dev
>
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>
>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to