mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-06-28 01:32:49 -04:00
Update to new version of Sail
This commit is contained in:
parent
3b0f763674
commit
71d52bc6dc
5 changed files with 445 additions and 6 deletions
|
@ -259,9 +259,7 @@ string arch64priv[] = '{
|
||||||
"rv64i_m/privilege/src/misalign-blt-01.S",
|
"rv64i_m/privilege/src/misalign-blt-01.S",
|
||||||
"rv64i_m/privilege/src/misalign-bltu-01.S",
|
"rv64i_m/privilege/src/misalign-bltu-01.S",
|
||||||
"rv64i_m/privilege/src/misalign-bne-01.S",
|
"rv64i_m/privilege/src/misalign-bne-01.S",
|
||||||
"rv64i_m/privilege/src/misalign-jal-01.S"
|
"rv64i_m/privilege/src/misalign-jal-01.S",
|
||||||
// commented out for now because rv64gc supports Zicclsm, but Sail does not yet. Restore when Sail supports Zicclsm.
|
|
||||||
/* -----\/----- EXCLUDED -----\/-----
|
|
||||||
"rv64i_m/privilege/src/misalign-ld-01.S",
|
"rv64i_m/privilege/src/misalign-ld-01.S",
|
||||||
"rv64i_m/privilege/src/misalign-lh-01.S",
|
"rv64i_m/privilege/src/misalign-lh-01.S",
|
||||||
"rv64i_m/privilege/src/misalign-lhu-01.S",
|
"rv64i_m/privilege/src/misalign-lhu-01.S",
|
||||||
|
@ -270,7 +268,6 @@ string arch64priv[] = '{
|
||||||
"rv64i_m/privilege/src/misalign-sd-01.S",
|
"rv64i_m/privilege/src/misalign-sd-01.S",
|
||||||
"rv64i_m/privilege/src/misalign-sh-01.S",
|
"rv64i_m/privilege/src/misalign-sh-01.S",
|
||||||
"rv64i_m/privilege/src/misalign-sw-01.S"
|
"rv64i_m/privilege/src/misalign-sw-01.S"
|
||||||
-----/\----- EXCLUDED -----/\----- */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
string arch64zifencei[] = '{
|
string arch64zifencei[] = '{
|
||||||
|
|
|
@ -114,7 +114,7 @@ class sail_cSim(pluginTemplate):
|
||||||
reference_output = re.sub("/src/","/references/", re.sub(".S",".reference_output", test))
|
reference_output = re.sub("/src/","/references/", re.sub(".S",".reference_output", test))
|
||||||
execute += f'cut -c-{8:g} {reference_output} > {sig_file}' #use cut to remove comments when copying
|
execute += f'cut -c-{8:g} {reference_output} > {sig_file}' #use cut to remove comments when copying
|
||||||
else:
|
else:
|
||||||
execute += self.sail_exe[self.xlen] + f' --trace=step --test-signature={sig_file} {elf} > {test_name}.log 2>&1;'
|
execute += self.sail_exe[self.xlen] + f' --config {self.pluginpath}/{"rv64gc.json" if self.xlen == 64 else "rv32gc.json"} --trace=step --test-signature={sig_file} {elf} > {test_name}.log 2>&1;'
|
||||||
|
|
||||||
# Coverage
|
# Coverage
|
||||||
# Generate trace from sail log
|
# Generate trace from sail log
|
||||||
|
|
221
tests/riscof/sail_cSim/rv32gc.json
Normal file
221
tests/riscof/sail_cSim/rv32gc.json
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"writable_misa": false,
|
||||||
|
"writable_fiom": true,
|
||||||
|
"writable_hpm_counters": {
|
||||||
|
"len": 32,
|
||||||
|
"value": "0xFFFF_FFFF"
|
||||||
|
},
|
||||||
|
"mtval_has_illegal_instruction_bits": true
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"pmp": {
|
||||||
|
"grain": 0,
|
||||||
|
"count": 16
|
||||||
|
},
|
||||||
|
"misaligned": {
|
||||||
|
"supported": false,
|
||||||
|
"byte_by_byte": false,
|
||||||
|
"order_decreasing": false,
|
||||||
|
"allowed_within_exp": 0
|
||||||
|
},
|
||||||
|
"translation": {
|
||||||
|
"dirty_update": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"platform": {
|
||||||
|
"vendorid": 0,
|
||||||
|
"archid": 0,
|
||||||
|
"impid": 0,
|
||||||
|
"hartid": 0,
|
||||||
|
"reset_vector": 4096,
|
||||||
|
"cache_block_size_exp": 6,
|
||||||
|
"ram": {
|
||||||
|
"base": 2147483648,
|
||||||
|
"size": 2147483648
|
||||||
|
},
|
||||||
|
"rom": {
|
||||||
|
"base": 4096,
|
||||||
|
"size": 4096
|
||||||
|
},
|
||||||
|
"clint": {
|
||||||
|
"base": 33554432,
|
||||||
|
"size": 786432
|
||||||
|
},
|
||||||
|
"instructions_per_tick": 2,
|
||||||
|
"wfi_is_nop": true
|
||||||
|
},
|
||||||
|
"extensions": {
|
||||||
|
"M": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"A": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"FD": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"V": {
|
||||||
|
"supported": true,
|
||||||
|
"vlen_exp": 9,
|
||||||
|
"elen_exp": 6,
|
||||||
|
"vl_use_ceil": false
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"U": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicbom": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicboz": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicond": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicntr": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zifencei": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zihpm": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zimop": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zmmul": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zaamo": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zabha": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zalrsc": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zfa": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zfh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zfhmin": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zfinx": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zca": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcf": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcd": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcmop": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zba": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zbb": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zbs": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zbc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zbkb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zbkc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zbkx": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zknd": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zkne": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zknh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zkr": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zksed": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zksh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zhinx": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zvbb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvkb": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zvbc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvknha": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvknhb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvksh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sscofpmf": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Smcntrpmf": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sstc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Svinval": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Svbare": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv32": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv39": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv48": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv57": {
|
||||||
|
"supported": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
221
tests/riscof/sail_cSim/rv64gc.json
Normal file
221
tests/riscof/sail_cSim/rv64gc.json
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
{
|
||||||
|
"base": {
|
||||||
|
"writable_misa": false,
|
||||||
|
"writable_fiom": true,
|
||||||
|
"writable_hpm_counters": {
|
||||||
|
"len": 32,
|
||||||
|
"value": "0xFFFF_FFFF"
|
||||||
|
},
|
||||||
|
"mtval_has_illegal_instruction_bits": true
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"pmp": {
|
||||||
|
"grain": 0,
|
||||||
|
"count": 16
|
||||||
|
},
|
||||||
|
"misaligned": {
|
||||||
|
"supported": true,
|
||||||
|
"byte_by_byte": false,
|
||||||
|
"order_decreasing": false,
|
||||||
|
"allowed_within_exp": 0
|
||||||
|
},
|
||||||
|
"translation": {
|
||||||
|
"dirty_update": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"platform": {
|
||||||
|
"vendorid": 0,
|
||||||
|
"archid": 0,
|
||||||
|
"impid": 0,
|
||||||
|
"hartid": 0,
|
||||||
|
"reset_vector": 4096,
|
||||||
|
"cache_block_size_exp": 6,
|
||||||
|
"ram": {
|
||||||
|
"base": 2147483648,
|
||||||
|
"size": 2147483648
|
||||||
|
},
|
||||||
|
"rom": {
|
||||||
|
"base": 4096,
|
||||||
|
"size": 4096
|
||||||
|
},
|
||||||
|
"clint": {
|
||||||
|
"base": 33554432,
|
||||||
|
"size": 786432
|
||||||
|
},
|
||||||
|
"instructions_per_tick": 2,
|
||||||
|
"wfi_is_nop": true
|
||||||
|
},
|
||||||
|
"extensions": {
|
||||||
|
"M": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"A": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"FD": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"V": {
|
||||||
|
"supported": true,
|
||||||
|
"vlen_exp": 9,
|
||||||
|
"elen_exp": 6,
|
||||||
|
"vl_use_ceil": false
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"U": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicbom": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicboz": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicond": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zicntr": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zifencei": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zihpm": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zimop": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zmmul": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zaamo": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zabha": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zalrsc": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zfa": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zfh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zfhmin": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zfinx": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zca": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcf": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcd": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zcmop": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zba": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zbb": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zbs": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zbc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zbkb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zbkc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zbkx": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zknd": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zkne": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zknh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zkr": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zksed": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zksh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zhinx": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zvbb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvkb": {
|
||||||
|
"supported": false
|
||||||
|
},
|
||||||
|
"Zvbc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvknha": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvknhb": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Zvksh": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sscofpmf": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Smcntrpmf": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sstc": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Svinval": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Svbare": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv32": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv39": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv48": {
|
||||||
|
"supported": true
|
||||||
|
},
|
||||||
|
"Sv57": {
|
||||||
|
"supported": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -196,7 +196,7 @@ class spike(pluginTemplate):
|
||||||
reference_output = re.sub("/src/","/references/", re.sub(".S",".reference_output", test))
|
reference_output = re.sub("/src/","/references/", re.sub(".S",".reference_output", test))
|
||||||
simcmd = f'cut -c-{8:g} {reference_output} > {sig_file}' #use cut to remove comments when copying
|
simcmd = f'cut -c-{8:g} {reference_output} > {sig_file}' #use cut to remove comments when copying
|
||||||
else:
|
else:
|
||||||
simcmd = self.dut_exe + f' --isa={self.isa} +signature={sig_file} +signature-granularity=4 {elf}'
|
simcmd = self.dut_exe + f' {"--misaligned" if self.xlen == 64 else ""} --isa={self.isa} +signature={sig_file} +signature-granularity=4 {elf}'
|
||||||
else:
|
else:
|
||||||
simcmd = 'echo "NO RUN"'
|
simcmd = 'echo "NO RUN"'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue