chipsalliance / riscv-dv

Random instruction generator for RISC-V processor verification
Apache License 2.0
996 stars 323 forks source link

riscv_csr_test fails at generation #941

Open fraret opened 1 year ago

fraret commented 1 year ago

riscv_csr_test fails to generate due to:

  File "/mnt/riscv-dv/riscv-dv/scripts/gen_csr_test.py", line 434, in <module>
    main()
  File "/mnt/riscv-dv/riscv-dv/scripts/gen_csr_test.py", line 428, in main
    gen_csr_instr(get_csr_map(args.csr_file, args.xlen),
  File "/mnt/riscv-dv/riscv-dv/scripts/gen_csr_test.py", line 114, in get_csr_map
    csr_name, str(rv))
NameError: name 'rv' is not defined

Changing str(rv) for str(xlen) or even better, using rv_string directly and removing the "rv" in the formatted string would solve this issue.