Closed elementary-particle closed 9 months ago
I was using the released Linux version sv2v v0.0.11-0-g6082cae
In cva6.sv
, acc_dispatcher
is indeed instantiated with cvxif_req_t = cvxif_pkg::cvxif_req_t
. The complaint about acc_dispatcher_71D35
is referring to this instantiation of acc_dispatcher
that references a struct field that doesn't seem to exist. I think this error is genuine. Am I missing something? See #155 for some additional background on this error checking.
Sorry, you are right, I was too confident with the code in the repository, I'll double check next time I submit a issue. Thanks for your reply!
I tried to convert the sources of cva6 https://github.com/openhwgroup/cva6.git (commit 5b37393a2ec3cac40bd46de055ea0344f662a71a) to verilog using the following command from the parent directory of cva6:
However, the program wrongly considers the parameter type acc_req_t in module acc_dispatcher(cva6/core/acc_dispatcher.sv) which is of type acc_pkg::accelerator_req_t as of cvxif_pkg::cvxif_req_t, causing an error on line 210 of cva6/core/acc_dispatcher.sv.
sv2v: field 'insn' not found in struct packed { logic x_compressed_valid; struct packed { logic [15:0] instr; logic [1:0] mode; logic [acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_ID_WIDTH - 1:0] id; } x_compressed_req; logic x_issue_valid; struct packed { logic [31:0] instr; logic [1:0] mode; logic [acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_ID_WIDTH - 1:0] id; logic [acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_NUM_RS - 1:0][acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_RFR_WIDTH - 1:0] rs; logic [acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_NUM_RS - 1:0] rs_valid; } x_issue_req; logic x_commit_valid; struct packed { logic [acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_ID_WIDTH - 1:0] id; logic x_commit_kill; } x_commit; logic x_mem_ready; struct packed { logic exc; logic [5:0] exccode; } x_mem_resp; logic x_mem_result_valid; struct packed { logic [acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_ID_WIDTH - 1:0] id; logic [acc_dispatcher_71D35.acc_req_t_cvxif_pkg_X_MEM_WIDTH - 1:0] rdata; logic err; } x_mem_result; logic x_result_ready; }, in expression acc_req_o.insn, within scope acc_dispatcher_71D35, near cva6/core/acc_dispatcher.sv:210:3 CallStack (from HasCallStack): error, called at src/Convert/Scoper.hs:377:22 in main:Convert.Scoper