riscof icon indicating copy to clipboard operation
riscof copied to clipboard

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

Open ptprasanna opened this issue 2 years ago • 3 comments

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 avatar Aug 24 '22 13:08 ptprasanna

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 avatar Aug 25 '22 09:08 ptprasanna

                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 avatar Aug 25 '22 09:08 ptprasanna

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

ptprasanna avatar Aug 26 '22 04:08 ptprasanna