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

How to use the example scripts? #2

Open
mytbk opened this issue Feb 25, 2019 · 2 comments
Open

How to use the example scripts? #2

mytbk opened this issue Feb 25, 2019 · 2 comments

Comments

@mytbk
Copy link
Contributor

mytbk commented Feb 25, 2019

I'm currently doing some research on defending against Spectre. I'd like to reproduce the results of InvisiSpec. I'm new to gem5. Sorry for asking you about using the experiment environment.

I saw in the example script run_spec_from_ckpt.sh that you use --checkpoint-restore=10000000000. Does this mean the skip the first 10 billion instructions; then, we simulate 1 billion instructions in the paper? And if I use --take-checkpoints=10000000000 to take a checkpoint running the unsafe baseline processor, can I use this checkpoint to run on other processors like IS-Sp?

@mjyan0720
Copy link
Owner

Sorry for replying late.

Yes, you can use different configurations IS-Sp/Fu-Sp etc on the same checkpoints.
You can generate a checkpoint using "--take-checkpoints=N --at-instruction" if you want to skip the first N instructions. Please consult complete commands you should use from the gem5 mannual website.
Then you can do detailed simulation using "--checkpoint-restore=N --at-instruction --maxinsts=M" if you want to do detailed simulation for M instructions.
Hope it helps.

@mytbk
Copy link
Contributor Author

mytbk commented Apr 23, 2019

Thanks. I'm now using AtomicSimpleCPU to make a checkpoint.
I think it's also needed to set the ruby cache parameters, I think the configuration in the paper is:

diff --git a/configs/ruby/MESI_Two_Level.py b/configs/ruby/MESI_Two_Level.py
index 65d711e5e..44118be2d 100644
--- a/configs/ruby/MESI_Two_Level.py
+++ b/configs/ruby/MESI_Two_Level.py
@@ -37,8 +37,13 @@ from Ruby import send_evicts
 #
 # Declare caches used by the protocol
 #
-class L1Cache(RubyCache): pass
-class L2Cache(RubyCache): pass
+class L1Cache(RubyCache):
+    tagAccessLatency = 1
+    dataAccessLatency = 1
+
+class L2Cache(RubyCache):
+    tagAccessLatency = 8
+    dataAccessLatency = 8
 
 def define_options(parser):
     return

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

2 participants