Jason,

 

Thanks for the explanation and the super-fast fix below – definitely a more 
insightful message 

 

I was tracking the hierarchy diagrams and missed the abstract qualification – 
but I see it now & I’ll be more aware going forward.

 

Thanks for your leadership in this space

 

Raghu

 

From: Jason Lowe-Power via gem5-users <[email protected]> 
Sent: Friday, April 22, 2022 11:16 AM
To: gem5 users mailing list <[email protected]>
Cc: [email protected]; Jason Lowe-Power <[email protected]>
Subject: [gem5-users] Re: Adding PioDevice leads to TypeError: No constructor 
defined

 

I just pushed a change that will make this error message better.

 

"fatal: Cannot instantiate an abstract SimObject (system.dev 
<http://system.dev> )" is what the error now says :).

 

See https://gem5-review.googlesource.com/c/public/gem5/+/59049

 

Cheers,

Jason

 

On Fri, Apr 22, 2022 at 8:57 AM Jason Lowe-Power <[email protected] 
<mailto:[email protected]> > wrote:

Hello,

 

I believe the problem is that gem5 tries to do too much automatically for you! 
gem5 automatically creates a lot of the constructor/destructor codes. Given all 
of this hidden/automatic code generation, it's difficult to know exactly what's 
going wrong (for both you and for us).

 

That said, I think the problem is that `PioDevice` is an abstract SimObject, 
not a concrete SimObject. This may work if you instead use the `DmaDevice`.

 

Cheers,

Jason

 

On Thu, Apr 21, 2022 at 1:58 PM Raghu Shankar via gem5-users 
<[email protected] <mailto:[email protected]> > wrote:

By adding a PioDevice() to my version of two_level.py configuration script, I 
get this error

 

TypeError: _m5.param_PioDevice.PioDeviceParams: No constructor defined!

And checking io_device.cc the constructor looks empty 

 

Any help please? Thanks

 

Details:

 

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "build/X86/python/m5/main.py", line 455, in main
    exec(filecode, scope)


  File "/home/raghu/gem5/configs/learning_gem5/part1/two_level.py", line 187, 
in <module>
    m5.instantiate()
  File "build/X86/python/m5/simulate.py", line 116, in instantiate
    
  File "build/X86/python/m5/SimObject.py", line 1790, in createCCObject
    self.getCCParams()
  File "build/X86/python/m5/SimObject.py", line 1720, in getCCParams
    cc_params = cc_params_struct()

TypeError: _m5.param_PioDevice.PioDeviceParams: No constructor defined!

 

 

Io_device.cc

include "dev/io_device.hh"

#include "base/trace.hh"
#include "debug/AddrRanges.hh"
#include "sim/system.hh"

namespace gem5
{

PioDevice::PioDevice(const Params &p)
    : ClockedObject(p), sys(p.system), pioPort(this)
{}

PioDevice::~PioDevice()
{
}

 

_______________________________________________
gem5-users mailing list -- [email protected] <mailto:[email protected]> 
To unsubscribe send an email to [email protected] 
<mailto:[email protected]> 
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

_______________________________________________
gem5-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to