mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Lots more small python script cleanup
This commit is contained in:
parent
1369914979
commit
dfe15414b0
@ -256,7 +256,7 @@ def ReportAsText(benchmarkDict):
|
|||||||
if(args.summary):
|
if(args.summary):
|
||||||
mean = benchmarkDict['Mean']
|
mean = benchmarkDict['Mean']
|
||||||
print('Mean')
|
print('Mean')
|
||||||
for (name, typ, entries. size, val) in mean:
|
for (name, typ, entries, size, val) in mean:
|
||||||
sys.stdout.write('%s %s %0.2f\n' % (name, entries if not args.size else size, val if not args.invert else 100 - val))
|
sys.stdout.write('%s %s %0.2f\n' % (name, entries if not args.size else size, val if not args.invert else 100 - val))
|
||||||
|
|
||||||
if(not args.summary):
|
if(not args.summary):
|
||||||
|
@ -78,7 +78,7 @@ if __name__ == "__main__":
|
|||||||
for i in range(dcache_num_ways):
|
for i in range(dcache_num_ways):
|
||||||
wl(comment=f"start way test #{i+1}")
|
wl(comment=f"start way test #{i+1}")
|
||||||
wl(f'li t0, {hex(mem_addr)}')
|
wl(f'li t0, {hex(mem_addr)}')
|
||||||
wl(f'.align 6') # start at i$ set boundary. 6 lsb bits are zero.
|
wl('.align 6') # start at i$ set boundary. 6 lsb bits are zero.
|
||||||
wl(comment=f"i$ boundary, way test #{i+1}")
|
wl(comment=f"i$ boundary, way test #{i+1}")
|
||||||
write_repro_instrs()
|
write_repro_instrs()
|
||||||
mem_addr += dcache_way_size_in_bytes # so that we excercise a new D$ way.
|
mem_addr += dcache_way_size_in_bytes # so that we excercise a new D$ way.
|
||||||
|
@ -1,17 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
|
||||||
import shlex
|
|
||||||
import logging
|
import logging
|
||||||
import random
|
|
||||||
import string
|
|
||||||
from string import Template
|
|
||||||
|
|
||||||
import riscof.utils as utils
|
import riscof.utils as utils
|
||||||
from riscof.pluginTemplate import pluginTemplate
|
from riscof.pluginTemplate import pluginTemplate
|
||||||
import riscof.constants as constants
|
|
||||||
from riscv_isac.isac import isac
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
@ -72,11 +65,11 @@ class sail_cSim(pluginTemplate):
|
|||||||
self.sailargs += "--enable-zcb"
|
self.sailargs += "--enable-zcb"
|
||||||
if "Q" in ispec["ISA"]:
|
if "Q" in ispec["ISA"]:
|
||||||
self.isa += 'q'
|
self.isa += 'q'
|
||||||
objdump = "riscv64-unknown-elf-objdump".format(self.xlen)
|
objdump = "riscv64-unknown-elf-objdump"
|
||||||
if shutil.which(objdump) is None:
|
if shutil.which(objdump) is None:
|
||||||
logger.error(objdump+": executable not found. Please check environment setup.")
|
logger.error(objdump+": executable not found. Please check environment setup.")
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
compiler = "riscv64-unknown-elf-gcc".format(self.xlen)
|
compiler = "riscv64-unknown-elf-gcc"
|
||||||
if shutil.which(compiler) is None:
|
if shutil.which(compiler) is None:
|
||||||
logger.error(compiler+": executable not found. Please check environment setup.")
|
logger.error(compiler+": executable not found. Please check environment setup.")
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
|
||||||
import subprocess
|
|
||||||
import shlex
|
|
||||||
import logging
|
import logging
|
||||||
import random
|
|
||||||
import string
|
|
||||||
from string import Template
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import riscof.utils as utils
|
import riscof.utils as utils
|
||||||
import riscof.constants as constants
|
|
||||||
from riscof.pluginTemplate import pluginTemplate
|
from riscof.pluginTemplate import pluginTemplate
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
Loading…
Reference in New Issue
Block a user