Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The gem5 is no longer compatible #4

Open
AbhishekUoR opened this issue Oct 24, 2019 · 19 comments
Open

The gem5 is no longer compatible #4

AbhishekUoR opened this issue Oct 24, 2019 · 19 comments

Comments

@AbhishekUoR
Copy link

The gem5 files situated in Simulators/gem5 are not compatible with the current commit of gem5.
Also, when used March 1 st 2017 commit, how do we build as the command in README causes an error unrecognized memory type NVMainMemory.

@mkatsa
Copy link

mkatsa commented Oct 29, 2019

I also have the same problem using NVMain with gem5.

@NoyaFangzhou
Copy link

I got the same issues when applying the latest version of NVMain with latest update on gem5
[gem5 commit id: 135595a4d79a30d715be64d3a2833a28434699c7].

When compiling with NVMain, it raises:

  • 'BaseSlavePort' does not name a type; did you mean 'SlavePort'?
  • no matching function for call to 'Packet::Packet(Request*&, MemCmd::Command)
  • class Packet' has no member named 'checkFunctional'

@AbhishekUoR
Copy link
Author

AbhishekUoR commented Apr 10, 2020 via email

@adityanarayan1191
Copy link

Hi Abhishek, I am getting the similar problem while building the latest version of gem5 with NVmain.

  1. no matching function for call to 'Packet::Packet(Request*&, MemCmd::Command)'
  2. 'class Packet' has no member named 'checkFunctional'

Could you please elaborate on what you mean by editing code with new function call names? Why is it an issue of the function call names?

@AbhishekUoR
Copy link
Author

AbhishekUoR commented May 20, 2020 via email

@adityanarayan1191
Copy link

Thank Abhishek, I see. Could you point me to previous gem5 version, if you are aware, that is compatible with such function names?
Also, how could I find the master and slave port names in gem5?

@miavgu
Copy link

miavgu commented Mar 5, 2021

@adityanarayan1191 Did you find the right gem5 version to be compatible?

@AbhishekUoR
Copy link
Author

@miavgu if you look at this line you will get the parent commit of gem5

@miavgu
Copy link

miavgu commented Mar 8, 2021

I can't find the commit with that hash

@YalandHong
Copy link

I think the patch is generated by HG (mercurial). The number 11688 refers to a version number in mercurial source control system and the patch is supposed to be used by mercurial's hg qpush command.

However, since the HG repository is no longer available, I can't find any ideal way to roll back to the correct version. :(

@herochen11
Copy link

herochen11 commented Mar 13, 2021

I tried this version with little modification. It can work.
https://gem5.googlesource.com/public/gem5/+/525ce650e1a5bbe71c39d4b15598d6c003cc9f9e

@YalandHong
Copy link

YalandHong commented Mar 15, 2021

Thank Abhishek, I see. Could you point me to previous gem5 version, if you are aware, that is compatible with such function names?
Also, how could I find the master and slave port names in gem5?

@adityanarayan1191 The errors mentioned above are caused by the following reasons:

  1. Class BaseSlavePort and BaseMasterPort have been removed in Aug 2019.
  2. checkFunctional has been renamed to trySatisfyFunctional in Jul 2018
  3. RequestPtr has been redefined using smart pointer instead of Request* in Jun 2018

I tried this version with little modification. It can work.
https://gem5.googlesource.com/public/gem5/+/525ce650e1a5bbe71c39d4b15598d6c003cc9f9e

@herochen11 Thanks! Theoretically, it should work, because your version had been committed just a few days before Jun 12 2018. It may be the last commit compatible with NVMain, provided that there is no sever bug with this version.

Besides, what do you mean "little modification"?

@WonderWei
Copy link

WonderWei commented Apr 11, 2021

I got a problem that the core dumped and can't work when I use nvmain with gem5 in fs mode and cpu is timingsimplecpu. Have you ever met similar problem when you use timingsimplecpu or DerivO3CPU?
image

@YalandHong
Copy link

I got a problem that the core dumped and can't work when I use nvmain with gem5 in fs mode and cpu is timingsimplecpu. Have you ever met similar problem when you use timingsimplecpu or DerivO3CPU?

I think you'd better open a new issue and post more information there for others to reproduce. I'm not sure whether your problem has something to do with the compatibility between gem5 and NVMain.

@WonderWei
Copy link

I got a problem that the core dumped and can't work when I use nvmain with gem5 in fs mode and cpu is timingsimplecpu. Have you ever met similar problem when you use timingsimplecpu or DerivO3CPU?

I think you'd better open a new issue and post more information there for others to reproduce. I'm not sure whether your problem has something to do with the compatibility between gem5 and NVMain

ok,thanks.

@seceng-jan
Copy link

seceng-jan commented Oct 29, 2021

Okay, so I figured it out and will briefly describe the steps I've taken since it really was a pain... Most of it comes from this slightly wired guide: https://www.codetd.com/en/article/9656074

  1. Checkout gem5 commit 525ce650e1a5bbe71c39d4b15598d6c003cc9f9e from here: https://gem5.googlesource.com/public/gem5
  2. Checkout the NVmain git and delete line 36 from the SConscript from gem5_scons import Transform
  3. Use python2 for scons: alias scons2="/usr/bin/env python2 $(which scons)"
  4. Build NVmain using scons2 build-type=fast
  5. Apply the NVmain patch to gem5 git apply /path/to/nvmain/patches/gem5/nvmain2-XYZ
  6. Add line 36 back to the NVmain SConscript from gem5_scons import Transform (reverts step 2)
  7. Run scons2 EXTRAS=../NVmain build/X86/gem5.opt -j16 in the gem5 folder and wait (change -j16 to the number of cores of your cpu)
  8. Test with ./build/X86/gem5.opt configs/example/se.py -c tests/test-progs/hello/bin/x86/linux/hello --mem-type=NVMainMemory --caches --l2cache --l1i_size 32kB --l1d_size 32kB --l2_size 2MB --cpu-type=TimingSimpleCPU --nvmain-config=../NVmain/Config/PerfectMemory.config

At some point the build failed for me which was either because I accidentally used scons instead of scons2 or because I compiled gem5 before adding NVmain. Deleting the build folder of gem5 solved the problem. I hope this helps.

@kalindkaria
Copy link

kalindkaria commented Jan 29, 2022

Hi @seceng-jan, @AbhishekUoR and others, I tried to integrate gem5 with NVmain using the command:
scons EXTRAS=../NVmain build/X86/gem5.opt -j 8

But I am facing the below error:
Error: SimObject(NVMainMemory.py...) must list c++ sim_objects or enums

Following are the versions of dependencies:
OS : Ubuntu 18.04
gcc : 7.5.0
g++ : 7.5.0
python : 3.6.9
scons : 3.0.1
swig : 3.0.12

Kindly suggest the way out. Thanks.

@miavgu
Copy link

miavgu commented Jan 30, 2022

Try with Python 2.7 and scons 2.5.1

@vax-r
Copy link

vax-r commented May 10, 2022

I have the same problem as above when I use the command
scons EXTRAS=../NVmain build/X86/gem5.opt

it gives me the error
螢幕擷取畫面 (1296)

I am running NVmain and gem5 in docker container with an ubuntu 18.04 image
Pls let me know if there's any solution to this situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests