mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-02 09:45:18 +00:00
Update CacheSim scripts with new wsim and directory structure. Give simulator choice and switch default to verilator.
This commit is contained in:
parent
fa772c652a
commit
9a70480ef6
2
.gitignore
vendored
2
.gitignore
vendored
@ -123,7 +123,7 @@ sim/test1.rep
|
||||
sim/questa/vsim.log
|
||||
tests/coverage/*.elf
|
||||
*.elf.memfile
|
||||
sim/*Cache.log
|
||||
sim/*/*Cache.log
|
||||
sim/branch
|
||||
tests/fp/combined_IF_vectors/IF_vectors/*.tv
|
||||
/sim/branch-march14.tar.gz
|
||||
|
@ -41,7 +41,6 @@
|
||||
# Add -d or --dist to report the distribution of loads, stores, and atomic ops.
|
||||
# These distributions may not add up to 100; this is because of flushes or invalidations.
|
||||
|
||||
import sys
|
||||
import math
|
||||
import argparse
|
||||
import os
|
||||
|
@ -27,7 +27,6 @@
|
||||
## either express or implied. See the License for the specific language governing permissions
|
||||
## and limitations under the License.
|
||||
################################################################################################
|
||||
import sys
|
||||
import os
|
||||
import argparse
|
||||
|
||||
@ -57,16 +56,17 @@ tests64gc = ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m",
|
||||
tests64gc = ["arch64i"]
|
||||
|
||||
cachetypes = ["ICache", "DCache"]
|
||||
simdir = os.path.expanduser("~/cvw/sim")
|
||||
simdir = os.path.expandvars("$WALLY/sim")
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description="Runs the cache simulator on all rv64gc test suites")
|
||||
parser.add_argument('-p', "--perf", action='store_true', help="Report hit/miss ratio")
|
||||
parser.add_argument('-d', "--dist", action='store_true', help="Report distribution of operations")
|
||||
parser.add_argument('-s', "--sim", help="Simulator", choices=["questa", "verilator", "vcs"], default="verilator")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
testcmd = "vsim -do \"do wally-batch.do rv64gc {}\" -c > /dev/null"
|
||||
testcmd = "wsim --sim " + args.sim + " rv64gc {} > /dev/null"
|
||||
cachecmd = "CacheSim.py 64 4 56 44 -f {}"
|
||||
|
||||
if args.perf:
|
||||
@ -76,8 +76,9 @@ if __name__ == '__main__':
|
||||
|
||||
for test in tests64gc:
|
||||
print(f"{bcolors.HEADER}Commencing test", test+f":{bcolors.ENDC}")
|
||||
print(testcmd.format(test))
|
||||
os.system(testcmd.format(test))
|
||||
for cache in cachetypes:
|
||||
print(f"{bcolors.OKCYAN}Running the", cache, f"simulator.{bcolors.ENDC}")
|
||||
os.system(cachecmd.format(cache+".log"))
|
||||
os.system(cachecmd.format(args.sim+"/"+cache+".log"))
|
||||
print()
|
||||
|
Loading…
Reference in New Issue
Block a user