Skip to content

Commit

Permalink
cva6.py : add the capability to create a log for sv_seed
Browse files Browse the repository at this point in the history
  • Loading branch information
AyoubJalali committed Jan 10, 2025
1 parent 44c9817 commit 745f7b9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion verif/sim/cva6.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,13 @@ def analyze_tandem_report(yaml_path):
except KeyError:
logging.info("Incomplete TANDEM YAML report")

def log_uvm_seed(sv_seed , filename="uvm_seed.log"):
try:
with open(filename, 'a') as file:
timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
file.write(f"{timestamp} - UVM Seed: {sv_seed}\n")
except IOError as error:
print(f"Failed to log UVM seed: {error}")

def generate_yaml_report(yaml_path, target, isa, test, testlist, iss, initial_creation , iteration = None):
if not initial_creation:
Expand Down Expand Up @@ -712,7 +719,7 @@ def parse_args(cwd):
help="simulation run options")
parser.add_argument("--isscomp_opts", type=str, default="",
help="simulation comp options")
parser.add_argument("--isspostrun_opts", type=str, default="0x0000000080000000",
parser.add_argument("--isspostrun_opts", type=str, default="0x80000000",
help="simulation post run options")
parser.add_argument("-s", "--steps", type=str, default="all",
help="Run steps: gen,gcc_compile,iss_sim,iss_cmp", dest="steps")
Expand Down Expand Up @@ -1105,6 +1112,8 @@ def main():
else:
logging.error('gen_sv_seed can not take a negative value')

log_uvm_seed(args.sv_seed)

issrun_opts = "\""+args.issrun_opts+"\""

global isspostrun_opts
Expand Down

0 comments on commit 745f7b9

Please sign in to comment.