Skip to content

Commit

Permalink
renode_log_to_trace_csv: Fix parsing Renode output
Browse files Browse the repository at this point in the history
  • Loading branch information
mszprejda committed Oct 8, 2024
1 parent 2c319b8 commit c1cd797
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/renode_log_to_trace_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def process_renode_sim_log(log_name, csv_name):
continue

# Decode state
fields = line.replace("REGDUMP:", "").split(",")
regs = {fields[i]: fields[i+1] for i in range(0, len(fields), 2)}
fields = line.replace("REGDUMP:", "").replace(" ", "").replace("FP/", "").split(",")
regs = {fields[i] if "/" not in fields[i] else fields[i].split("/")[1]: fields[i+2] for i in range(0, 18, 3)} | \
{fields[i].split("/")[0]: fields[i+2] for i in range(18, len(fields), 3)}

# Compute state difference
diff = {r: regs[r] for r in known_gpr \
Expand Down

0 comments on commit c1cd797

Please sign in to comment.