No, that's no related to USE_SYSTEMC=False. That's disabling the systemc kernel, and the error message is that the system port is not connected. Even though the names are similar, the system object doesn't have anything to do with systemc. The system port itself is a port that the system object (a type of gem5 SimObject) provides which is supposed to connect to the memory and give components that want to set up memory like kernel loaders, etc, direct access. If that port is not connected, gem5 assumes that's a mistake and will error out. You need to make sure it's connected to something in your configuration.
Gabe On Fri, Nov 20, 2020 at 5:20 AM Michele Marazzi < [email protected]> wrote: > Dear Gabe, > > Thanks for your help. > It does compile with USE_SYSTEMC=False, but unfortunately I suspect I do > need that part in order to use gem5 as planned. > > Indeed, the case scenario is to interface it to a slave memory controller. > After many tries of different configurations, I keep getting as error: > > panic: System port on system is not connected. > > In order to not get out of scope of this ML I guess it's better not to go > into details about my implementation, but rather to say that also the > example provided with gem5 (/gem5/util/tlm/build/examples/slave_port/ > gem5.sc) fails. > > I've followed the README explanation, first generating the config, and > then loading it: > > user@pc-10744:~/gem5/util/tlm$ build/examples/slave_port/gem5.sc >> m5out/config.ini -e 1000000 -v >> SystemC 2.3.1-Accellera --- Nov 20 2020 13:20:43 >> Copyright (c) 1996-2014 by all Contributors, >> ALL RIGHTS RESERVED >> Global frequency set at 1000000000000 ticks per second >> ============================================================ >> EventQueue Dump (cycle 0) >> ------------------------------------------------------------ >> <No Events> >> ============================================================ >> panic: System port on system is not connected. >> Memory Usage: 175632 KBytes >> Program aborted at tick 0 >> --- BEGIN LIBC BACKTRACE --- >> >> /home/user/gem5/build/X86/libgem5_opt.so(_Z15print_backtracev+0x30)[0x7fcd6722d390] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_Z12abortHandleri+0x56)[0x7fcd6723e216] >> /lib/x86_64-linux-gnu/libc.so.6(+0x46210)[0x7fcd659c3210] >> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fcd659c318b] >> /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7fcd659a2859] >> build/examples/slave_port/gem5.sc(+0x2c9a0)[0x56522a0e39a0] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_ZN6System4initEv+0xab)[0x7fcd6725ef2b] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_ZN16CxxConfigManager13forEachObjectEM9SimObjectFvvE+0x5f)[0x7fcd6722daaf] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_ZN16CxxConfigManager11instantiateEb+0xa2)[0x7fcd67233fa2] >> build/examples/slave_port/gem5.sc(+0x2ba9b)[0x56522a0e2a9b] >> build/examples/slave_port/gem5.sc(sc_main+0xfa)[0x56522a0cd8f3] >> build/systemc/libsystemc.so(sc_elab_and_sim+0xe2)[0x7fcd679fcda0] >> build/systemc/libsystemc.so(main+0x24)[0x7fcd679fcc4e] >> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fcd659a40b3] >> build/examples/slave_port/gem5.sc(+0x1673e)[0x56522a0cd73e] >> --- END LIBC BACKTRACE --- >> Aborted (core dumped) > > > The same happens if I try with a master configuration: > > user@pc-10744:~/gem5/util/tlm$ ../../build/X86/gem5.opt conf/tlm_master.py >> warn: CheckedInt already exists in allParams. This may be caused by the >> Python 2.7 compatibility layer. >> warn: Enum already exists in allParams. This may be caused by the Python >> 2.7 compatibility layer. >> warn: ScopedEnum already exists in allParams. This may be caused by the >> Python 2.7 compatibility layer. >> gem5 Simulator System. http://gem5.org >> gem5 is copyrighted software; use the --copyright option for details. >> gem5 version 20.0.0.3 >> gem5 compiled Nov 20 2020 00:52:43 >> gem5 started Nov 20 2020 13:30:19 >> gem5 executing on pc-10744, pid 20674 >> command line: ../../build/X86/gem5.opt conf/tlm_master.py >> Global frequency set at 1000000000000 ticks per second >> warn: No dot file generated. Please install pydot to generate the dot >> file and pdf. >> fatal: Can't find port handler type 'tlm_master' >> Memory Usage: 612264 KBytes > > > user@pc-10744:~/gem5/util/tlm$ build/examples/master_port/gem5.sc >> m5out/config.ini -e 1000000 -v >> SystemC 2.3.1-Accellera --- Nov 20 2020 13:20:43 >> Copyright (c) 1996-2014 by all Contributors, >> ALL RIGHTS RESERVED >> Global frequency set at 1000000000000 ticks per second >> ============================================================ >> EventQueue Dump (cycle 0) >> ------------------------------------------------------------ >> <No Events> >> ============================================================ >> panic: System port on system is not connected. >> Memory Usage: 568848 KBytes >> Program aborted at tick 0 >> --- BEGIN LIBC BACKTRACE --- >> >> /home/user/gem5/build/X86/libgem5_opt.so(_Z15print_backtracev+0x30)[0x7f44410f5390] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_Z12abortHandleri+0x56)[0x7f4441106216] >> /lib/x86_64-linux-gnu/libc.so.6(+0x46210)[0x7f443f88b210] >> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f443f88b18b] >> /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f443f86a859] >> build/examples/master_port/gem5.sc(+0x2e32c)[0x55f33154d32c] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_ZN6System4initEv+0xab)[0x7f4441126f2b] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_ZN16CxxConfigManager13forEachObjectEM9SimObjectFvvE+0x5f)[0x7f44410f5aaf] >> >> /home/user/gem5/build/X86/libgem5_opt.so(_ZN16CxxConfigManager11instantiateEb+0xa2)[0x7f44410fbfa2] >> build/examples/master_port/gem5.sc(+0x359a1)[0x55f3315549a1] >> build/examples/master_port/gem5.sc(sc_main+0xf8)[0x55f331535971] >> build/systemc/libsystemc.so(sc_elab_and_sim+0xe2)[0x7f44418c4da0] >> build/systemc/libsystemc.so(main+0x24)[0x7f44418c4c4e] >> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f443f86c0b3] >> build/examples/master_port/gem5.sc(+0x167be)[0x55f3315357be] >> --- END LIBC BACKTRACE --- >> Aborted (core dumped) > > > The generated config file for the slave case is: > https://pastebin.com/uNDrQYWr > > Is there anything I can do? Is this related to the USE_SYSTEMC=False flag? > > Thanks again > Michele > > > Il giorno gio 19 nov 2020 alle ore 13:32 Gabe Black <[email protected]> > ha scritto: > >> If I remember correctly, this is because there is a mistake in the way >> the cxx config support handles Param structs and SimObjects that works most >> of the time, but fails when it encounters some of the tricks necessary for >> gem5's built in systemc kernel. If you disable that (USE_SYSTEMC=False, I >> think), then it will leave out that code and should build successfully. If >> you plan to use gem5 as a library with other systemc code, for instance as >> a black box within a simulation that uses Accellera's systemc kernel, then >> you'll want to turn off gem5's built in systemc kernel anyway, since it >> would conflict with the other one and wouldn't link properly. >> >> Gabe >> >> On Thu, Nov 19, 2020 at 3:09 AM Michele Marazzi via gem5-dev < >> [email protected]> wrote: >> >>> Dear gem5 folks, >>> >>> I am trying to compile the most updated (master) version of gem5 as a >>> library. (note: I've also tried the same with the develop branch, >>> hoping it would work). >>> >>> The architecture I need is x86, so I simply run: >>> >>> > scons --no-cache --with-cxx-config --without-python >>> --without-tcmalloc build/X86/libgem5_opt.so -j 2 >>> >>> After I have - successfully - compiled gem5 with only >>> >>> > scons build/X86/gem5.opt -j 2 >>> >>> No matter what different configurations of compilers/python checkout I >>> use, if I keep the flag --with-cxx-config, the compilation results in >>> the following error: >>> >>> [ SHCXX] X86/cxx_config/Gem5ToTlmBridge32.cc -> .os >>> build/X86/cxx_config/Gem5ToTlmBridge32.cc: In member function 'virtual >>> SimObject* Gem5ToTlmBridge32CxxConfigParams::simObjectCreate()': >>> build/X86/cxx_config/Gem5ToTlmBridge32.cc:136:25: error: cannot >>> convert 'sc_gem5::Gem5ToTlmBridge<32>*' to 'SimObject*' in return >>> return this->create(); >>> ^ >>> [ SHCXX] X86/cxx_config/Gem5ToTlmBridge64.cc -> .os >>> scons: *** [build/X86/cxx_config/Gem5ToTlmBridge32.os] Error 1 >>> build/X86/cxx_config/Gem5ToTlmBridge64.cc: In member function 'virtual >>> SimObject* Gem5ToTlmBridge64CxxConfigParams::simObjectCreate()': >>> build/X86/cxx_config/Gem5ToTlmBridge64.cc:136:25: error: cannot >>> convert 'sc_gem5::Gem5ToTlmBridge<64>*' to 'SimObject*' in return >>> return this->create(); >>> ^ >>> >>> I'm running Ubuntu 18. >>> >>> user@pc-10744:~/gem5$ uname -a >>> Linux pc-10744 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC >>> 2020 x86_64 x86_64 x86_64 GNU/Linux >>> >>> I have tried gcc version 7.5 and 9.3, python is version 3.8.5 >>> >>> Is there any way of fixing this? Do you have any suggestion, or thing to >>> try? >>> >>> Thank you very much for your time >>> Michele >>> _______________________________________________ >>> gem5-dev mailing list -- [email protected] >>> To unsubscribe send an email to [email protected] >>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s >>> >> > > -- > Michele Marazzi >
_______________________________________________ gem5-dev mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
