General Category > Discussion - EVE

CoProcessor faults and REG_CMDB_SPACE

(1/1)

Rudolph:
The programming guide states for REG_CMD_READ:
"In the case of an error, the co-processor engine writes 0xfff to this register."

As I was reading REG_CMD_READ for my  EVE_busy() function anyways I put the reset-on-fault code
in EVE_busy() as well.

Now I changed my library from writing to RAM_CMD+offset to use REG_CMDB_WRITE.
And it seems obvious to use REG_CMDB_SPACE in EVE_busy().
When the FIFO is empty the value in REG_CMDB_SPACE is 0xffc.

Now my question is, does the coprocessor also write 0xfff to REG_CMDB_SPACE in the case of an error?
The documents do not say anything about this but it seems logical.

BRT Community:
Hello,

I have doubled checked and yes you are correct the documentation does not mentioned the value for REG_CMDB_SPACE when the co-processor is in an error state. I will ask the development team if they can clarify this.

Best Regards,
BRT Community

BRT Community:
Hello,

I've heard back regarding your question.

REG_CMDB_SPACE is always set to (REG_CMD_READ - REG_CMD_WRITE) & 0xfff.
In regular operation REG_CMD_READ and REG_CMD_WRITE are 32-bit aligned, so the low 2 bits of REG_CMDB_SPACE are 00.

But when there is a fault, REG_CMD_READ is set to 0xfff, so the low 2 bits of REG_CMDB_SPACE immediately read as 11.

Therefore if ((REG_CMDB_SPACE & 0x3) != 0) there is a coprocessor fault.
Otherwise it holds the available FIFO space.

Best Regards,
BRT Community

Rudolph:
Excellent, thank you, this will bring back my busy() function to only read one register. :-)

Kaetemi:

--- Quote from: BRT Community on September 02, 2020, 01:59:56 PM ---REG_CMDB_SPACE is always set to (REG_CMD_READ - REG_CMD_WRITE) & 0xfff.

--- End quote ---

(REG_CMD_READ - REG_CMD_WRITE - 4) & 0xfff

Navigation

[0] Message Index

Go to full version