riscv-software-src / riscof

BSD 3-Clause "New" or "Revised" License
61 stars 39 forks source link

flen has to be added inline to the coverage command string, that riscof build through the sail plugin #58

Open ptprasanna opened 2 years ago

ptprasanna commented 2 years ago

https://github.com/riscv-software-src/riscof/blob/66bb6c468afaa3775ab5a757459a560ceaa5ee8c/riscof/Templates/setup/sail_cSim/riscof_sail_cSim.py#L116

Currently there isn't any support in riscof to feed in the flen to isac. Something similar as below would fix the issue.

                coverage_cmd = 'riscv_isac --verbose info coverage -d \
                        -t {0}.log --parser-name c_sail -o coverage.rpt  \
                        --sig-label begin_signature  end_signature \
                        --test-label rvtest_code_begin rvtest_code_end \
                        -e ref.elf -c {1} -x{2} -f{3} {4};'.format(\
                        test_name, ' -c '.join(cgf_file), self.xlen,self.flen, cov_str)

But again the question is from where do we get this flen in riscof, from config file is one option we may consider.

ptprasanna commented 2 years ago

Found a new fix for this where we pass the value from test.py where we already compute flen. replacing self.xlen with below would fix the issue list(testList.values())[0]['macros'][2].split("=")[1]

ptprasanna commented 2 years ago
                coverage_cmd = 'riscv_isac --verbose info coverage -d \
                        -t {0}.log --parser-name c_sail -o coverage.rpt  \
                        --sig-label begin_signature  end_signature \
                        --test-label rvtest_code_begin rvtest_code_end \
                        -e ref.elf -c {1} -x{2} -f{3} {4};'.format(\
                        test_name, ' -c '.join(cgf_file), list(testList.values())[0]['macros'][2].split("=")[1],self.flen, cov_str)
ptprasanna commented 2 years ago

Discussion Points on the ACT SIG (25 Aug 2022): This has to update in this template, @pawks agreed to make this change. Until then please use this.

@allenjbaum @pawks feel free to add if i have missed any