BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: CoProcessor faults and REG_CMDB_SPACE  (Read 9730 times)

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
CoProcessor faults and REG_CMDB_SPACE
« on: August 30, 2020, 05:48:25 PM »

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.

Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: CoProcessor faults and REG_CMDB_SPACE
« Reply #1 on: August 31, 2020, 12:20:29 PM »

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
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: CoProcessor faults and REG_CMDB_SPACE
« Reply #2 on: September 02, 2020, 01:59:56 PM »

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
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: CoProcessor faults and REG_CMDB_SPACE
« Reply #3 on: September 02, 2020, 02:43:36 PM »

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

Kaetemi

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: CoProcessor faults and REG_CMDB_SPACE
« Reply #4 on: September 05, 2020, 09:02:52 PM »

REG_CMDB_SPACE is always set to (REG_CMD_READ - REG_CMD_WRITE) & 0xfff.

(REG_CMD_READ - REG_CMD_WRITE - 4) & 0xfff
Logged