Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Error in CTG commands for generating floating point riscv-tests #111

Open
Shreesh-Kulkarni opened this issue Apr 26, 2024 · 2 comments
Open

Comments

@Shreesh-Kulkarni
Copy link

The command to generate floating point assembly tests in the fadd.d_b1-01.S filehttps://github.com/riscv-non-isa/riscv-arch-test/blob/main/riscv-test-suite/rv32i_m/D/src/fadd.d_b1-01.S does not work when invoked in the riscv-ctg repository via the corresponding cgf file https://github.com/riscv-software-src/riscv-ctg/blob/master/sample_cgfs/sample_cgfs_fext/RV32D/fadd.d.cgf.

The command in the comment is missing some arguments(--base-isa) which had to be passed along with --flen instead of --xlen.
Even after passing the arguments as requested by riscv-ctg, the following error pops up :

image

@KotorinMinami
Copy link

I believe the error in your screenshot is due to the fact that you haven't specified the configuration file for the dataset. Even if you're using the "randomize" parameter, you still need to specify the dataset.

Furthermore, due to the limitations of the configuration (as stated below), it seems that fadd.d only supports flen=64. In fact, that's the case. You may need to specify flen as 64.

fadd.d:
  sig:
    stride: 2
    sz: 'SIGALIGN'
  val:
    stride: 2
    sz: 'FLEN/8'
    val_template: "'NAN_BOXED($val,$width,FLEN)'"
    load_instr: "FLREG"
  xlen: [32,64]
  isa: 
    - IFD_Zicsr
  flen: [64]
  rm_val_data: '[7,0,1,2,3,4]'
  fcsr_data: '[x<<5|y for x,y in itertools.product([0,1,2,3,4],range(0,2**5))]'
  std_op:
  formattype: 'rformat'
  rs1_op_data: *all_fregs
  rs2_op_data: *all_fregs
  rd_op_data: *all_fregs
  template: |-

Additionally, when executing the instruction, you may encounter the issue related to #102 . Although I'm not entirely sure what issues are involved in the merge, if you want to attempt generating a test file, you can modify it based on #102 first.

And you can try:

riscv-ctg --base-isa rv64i --flen 32 --cgf ./sample_cgfs/dataset.cgf --cgf ./sample_cgfs/sample_cgfs_fext/RV32D/fadd.d.cgf -d ./tests/ --randomize -v debug -p2

to generate test . It takes time , however

@UmerShahidengr
Copy link
Collaborator

@Abdulwadoodd , @MuhammadHammad001 , @ahadali-10x can you please look at this error?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants