For pulp hwloops with hwloop count programmed to 0, count decrements at the end of loop to set lpcount to 0xFFFF_FFFF #880
Labels
Component:RTL
For issues in the RTL (e.g. for files in the rtl directory)
PARAM:PULP_XPULP
Issue depends on the PULP_XPULP parameter
Status:Resolved
Issue has been resolved, but closure is pending on git merge and/or issuer confirmation
Type:Bug
For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Issue Description
When HWLOOP count CSR lpcount0 is configured to 0, the loop count decrement after the last instruction of the loop sets the lpcount to 0xFFFF_FFFF.
In case of non-zero loop count, at the time of the last loop iteration the count is 1 and this final decrement sets it to 0.
But in the failing case the check for count > 0 is not done and decrements happens on already set 0 loop count value, causing the loop count to set to 0xFFFF_FFFF.
Refrence model does not do this decrement thus creating the mismatch.
Failing Test example using cv.setup instruction. By x29 reg (val = 0x0)
From the test trace log:
00000e00 004ec72b cv.setup 0, x29, 0x4 x29:00000000
Test Log:
lpcount0 decrements to 0xFFFF_FFFF in the cv32e40p RTL
cv32e40p/rtl/cv32e40p_controller.sv Line 819
Component
Component:RTL
Steps to Reproduce
cv32e40p branch/hash - dev -> c520546
core-v-verif setup :
The text was updated successfully, but these errors were encountered: