疑问描述
Keywords: endpoint, serial, logical, design, environment, RIO, rapid, CORE Generator
When performing Maintenance Write and the particular register you are writing to is the DeviceID (Offset 0x60), the returned response will have the new device ID in the source device ID field.
RapidIO Common Transport spec section 2.3 states:
------------------------------------------------------------------------------------------
When the destination of a request packet generates a response
packet, it swaps the source and destination fields from the request, making the
original source the new destination and itself the new source. Packets are routed
through the fabric based on the destination device ID.
------------------------------------------------------------------------------------------
Xilinx RapidIO Core generates response packets in this manner; however, in the case of Maintenance Write and writing a new device ID, the core will perform the write to CSR/CAR first, and then extract the new device ID as the source. Therefore, the response packet is generated with the new device ID as the source device ID (rather than the old device ID).
This is done to reduce the resource usage; by not passing the device ID around, this saves on the order of 100 flops plus 20-40 LUTs.
解决方案
If this is an issue, the following are possible ways to work around it:
1. Define device ID during core generation, eliminating the need to change device ID dynamically.
2. Do not require the capture of a destination ID on an arriving request packet, and do not require the provision of a source ID on outgoing packets. (Ignore the source ID mis-match on the maintenance responses.)
3. Send the maintenance packet with a destination ID as the new value you are writing.
For example:
XCore Initial deviceID = 0xFF
If you want to update to 0x55, send a maintenance packet from the bus master (for example, deviceID 0x00) to the Xilinx Core with:
DestinationID = 0x55
SourceID = 0x00
Offset = 0x60
Data = 0x0055.0000
When the Xilinx Core (still with DeviceID 0xFF) receives this packet, it will not discard it (even though there is a device ID mismatch because the core does not do internal comparisons). The Xilinx core assumes that as an endpoint all packets received are meant for this endpoint.
The resulting maintenance response packet from the core will be tagged with:
DestinationID = 0x00
SourceID = 0x55
Status = OK
XCore final DeviceID = 0x55
4. Xilinx core will be updated in v4.4 to change this behavior. Please contact Xilinx Support for the availability of the fix:
http://www.xilinx.com/support/mysupport.htmPlease mention
(Xilinx Answer 29936) when opening a technical case and ask for a RapidIO expert.