mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-09 13:15:26 +00:00
Fixed rvvi csr counting.
This commit is contained in:
parent
54e0289608
commit
57ea39d685
@ -123,7 +123,15 @@ module rvvisynth import cvw::*; #(parameter cvw_t P,
|
|||||||
assign CSRs[(index+1) * (P.XLEN + 12)- 1: index * (P.XLEN + 12)] = {CSRValue[index], CSRAddr[index]};
|
assign CSRs[(index+1) * (P.XLEN + 12)- 1: index * (P.XLEN + 12)] = {CSRValue[index], CSRAddr[index]};
|
||||||
assign EnabledCSRs[index] = |CSRWenPriorityMatrix[index];
|
assign EnabledCSRs[index] = |CSRWenPriorityMatrix[index];
|
||||||
end
|
end
|
||||||
assign CSRCountShort = +EnabledCSRs;
|
|
||||||
|
integer index2;
|
||||||
|
always_comb begin
|
||||||
|
CSRCountShort = '0;
|
||||||
|
for(index2 = 0; index2 < MAX_CSRS; index2++) begin
|
||||||
|
CSRCountShort += EnabledCSRs[index2];
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
assign CSRCount = {{{12-MAX_CSRS}{1'b0}}, CSRCountShort};
|
assign CSRCount = {{{12-MAX_CSRS}{1'b0}}, CSRCountShort};
|
||||||
assign rvvi = {CSRs, Registers, Required};
|
assign rvvi = {CSRs, Registers, Required};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user