gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Re: GEM5 within SystemC build issue

G
G
Thu, Jul 20, 2023 2:57 AM

Looks like this JIRA is low priority and has no progress since 2021.
Thanks a lot!

| |
G
|
|
gingerluo@163.com
|
---- Replied Message ----
| From | Yu-hsin Wangyuhsingw@google.com |
| Date | 7/20/2023 10:47 |
| To | Ggingerluo@163.com |
| Cc | gem5-users@gem5.orggem5-users@gem5.org |
| Subject | Re: [gem5-users] Re: GEM5 within SystemC build issue |
Hi Ginger,

We didn't try to run gem5 as dynamic lib inside SystemC. You may need to reach the maintainers. Here's a ticket you can refer. https://gem5.atlassian.net/browse/GEM5-874

Thanks.

On Wed, Jul 19, 2023 at 4:43 PM G gingerluo@163.com wrote:

Hi Yu-hsin,

Thanks for the reply, I'm trying to run gem5 as dynamic lib inside SystemC.
Did tried and can pass build without this option, but hit below assertion so I suspect it has to go with cxx-config portion.
main.cc:280: fatal: Config problem in sim object root: No sim object type Root is available

| |
G
|
|
gingerluo@163.com
|
---- Replied Message ----
| From | Yu-hsin Wangyuhsingw@google.com |
| Date | 7/19/2023 15:32 |
| To | Ggingerluo@163.com |
| Cc | gem5-users@gem5.orggem5-users@gem5.org |
| Subject | Re: [gem5-users] Re: GEM5 within SystemC build issue |
Hi Ginger,

I think the issue is --with-cxx-config only works in SimObject case. However the Gem5-TLM bridges are all sc_modules instead of SimObject. I can get compile success without --with-cxx-config.
Is that option required in your case?

Thanks.

On Wed, Jul 19, 2023 at 2:43 PM G gingerluo@163.com wrote:

Hello Yu-hsin,

Just saw you are the main edtor of tlm bridge to sysc, maybe you are the right person? :)

In the bridge, this->create() will return a Gem5ToTlmBridge type which is incompatible with SimObject as below declared, any comments? Thanks a lot!

SimObject *
Gem5ToTlmBridge32CxxConfigParams::simObjectCreate()
{
return this->create();
}

| |
G
|
|

|
---- Replied Message ----
| From | G via gem5-usersgem5-users@gem5.org |
| Date | 7/14/2023 17:24 |
| To | gem5-users@gem5.orggem5-users@gem5.org |
| Cc | Ggingerluo@163.com |
| Subject | [gem5-users] Re: GEM5 within SystemC build issue |
Hello, Anyone hit same issue when building "GEM5 within SystemC"? Or just succeeding?

| |
G
|
|
gingerluo@163.com
|
---- Replied Message ----
| From | G via gem5-usersgem5-users@gem5.org |
| Date | 7/3/2023 10:35 |
| To | gem5-users@gem5.orggem5-users@gem5.org |
| Cc | gingerluogingerluo@163.com |
| Subject | [gem5-users] GEM5 within SystemC build issue |
Hello,

Anyone went well with GEM5 and SystemC integration?

I triied to build libgem5_debug.so so I can integrate GEM5 in a standalone systemc environment with below commandline:

python3 which scons --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=1 build/RISCV/libgem5_$(BUILD_TYPE).so -j 32

But I got below issue with "--with-cxx-config" option.

build/RISCV/cxx_config/Gem5ToTlmBridge32.cc: In member function ‘virtual gem5::SimObject* gem5::Gem5ToTlmBridge32CxxConfigParams::simObjectCreate()’:
build/RISCV/cxx_config/Gem5ToTlmBridge32.cc:149:24: error: cannot convert ‘sc_gem5::Gem5ToTlmBridge<32>’ to ‘gem5::SimObject’ in return
149 | return this->create();
| ~~~~~~~~~~~~^~
| |
| sc_gem5::Gem5ToTlmBridge<32>*

if I do without this option, assertion fired in below, complaining:

main.cc:280: fatal: Config problem in sim object root: No sim object type Root is available

| |
G
|
|
gingerluo@163.com
|

Looks like this JIRA is low priority and has no progress since 2021. Thanks a lot! | | G | | gingerluo@163.com | ---- Replied Message ---- | From | Yu-hsin Wang<yuhsingw@google.com> | | Date | 7/20/2023 10:47 | | To | G<gingerluo@163.com> | | Cc | gem5-users@gem5.org<gem5-users@gem5.org> | | Subject | Re: [gem5-users] Re: GEM5 within SystemC build issue | Hi Ginger, We didn't try to run gem5 as dynamic lib inside SystemC. You may need to reach the maintainers. Here's a ticket you can refer. https://gem5.atlassian.net/browse/GEM5-874 Thanks. On Wed, Jul 19, 2023 at 4:43 PM G <gingerluo@163.com> wrote: Hi Yu-hsin, Thanks for the reply, I'm trying to run gem5 as dynamic lib inside SystemC. Did tried and can pass build without this option, but hit below assertion so I suspect it has to go with cxx-config portion. main.cc:280: fatal: Config problem in sim object root: No sim object type Root is available | | G | | gingerluo@163.com | ---- Replied Message ---- | From | Yu-hsin Wang<yuhsingw@google.com> | | Date | 7/19/2023 15:32 | | To | G<gingerluo@163.com> | | Cc | gem5-users@gem5.org<gem5-users@gem5.org> | | Subject | Re: [gem5-users] Re: GEM5 within SystemC build issue | Hi Ginger, I think the issue is --with-cxx-config only works in SimObject case. However the Gem5-TLM bridges are all sc_modules instead of SimObject. I can get compile success without --with-cxx-config. Is that option required in your case? Thanks. On Wed, Jul 19, 2023 at 2:43 PM G <gingerluo@163.com> wrote: Hello Yu-hsin, Just saw you are the main edtor of tlm bridge to sysc, maybe you are the right person? :) In the bridge, this->create() will return a Gem5ToTlmBridge type which is incompatible with SimObject as below declared, any comments? Thanks a lot! SimObject * Gem5ToTlmBridge32CxxConfigParams::simObjectCreate() { return this->create(); } | | G | | | ---- Replied Message ---- | From | G via gem5-users<gem5-users@gem5.org> | | Date | 7/14/2023 17:24 | | To | gem5-users@gem5.org<gem5-users@gem5.org> | | Cc | G<gingerluo@163.com> | | Subject | [gem5-users] Re: GEM5 within SystemC build issue | Hello, Anyone hit same issue when building "GEM5 within SystemC"? Or just succeeding? | | G | | gingerluo@163.com | ---- Replied Message ---- | From | G via gem5-users<gem5-users@gem5.org> | | Date | 7/3/2023 10:35 | | To | gem5-users@gem5.org<gem5-users@gem5.org> | | Cc | gingerluo<gingerluo@163.com> | | Subject | [gem5-users] GEM5 within SystemC build issue | Hello, Anyone went well with GEM5 and SystemC integration? I triied to build libgem5_debug.so so I can integrate GEM5 in a standalone systemc environment with below commandline: python3 `which scons` --with-cxx-config --without-python --without-tcmalloc USE_SYSTEMC=1 build/RISCV/libgem5_$(BUILD_TYPE).so -j 32 But I got below issue with "--with-cxx-config" option. build/RISCV/cxx_config/Gem5ToTlmBridge32.cc: In member function ‘virtual gem5::SimObject* gem5::Gem5ToTlmBridge32CxxConfigParams::simObjectCreate()’: build/RISCV/cxx_config/Gem5ToTlmBridge32.cc:149:24: error: cannot convert ‘sc_gem5::Gem5ToTlmBridge<32>*’ to ‘gem5::SimObject*’ in return 149 | return this->create(); | ~~~~~~~~~~~~^~ | | | sc_gem5::Gem5ToTlmBridge<32>* if I do without this option, assertion fired in below, complaining: main.cc:280: fatal: Config problem in sim object root: No sim object type Root is available | | G | | gingerluo@163.com |