UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 14855

LogiCORE SPI-4.2 (POS-PHY L4) v4.x - When sending odd number-sized packets, the transmitter fails to zero out the invalid byte of the 16-bit PL4 bus word

Description

General Description.

When sending odd number-sized packets, the transmitter fails to zero out the invalid byte of the 16-bit SPI 4.2 bus word. (Depending upon the SPI 4.2 receiver device, this may or may not cause adverse effects.)

Solution

This issue is fixed in version 5.2 of the SPI 4.2 (PL4) core.

Xilinx strongly recommends that v4.x users of the SPI 4.2 core upgrade to v5.2.

If the v4.x core cannot be upgraded, use the following workaround:

You must zero out all the invalid bytes before sending the data to the PL4 source core. Essentially, you must send "0000 0000" to all invalid bytes of SrcFFData[63:0]. This can be accomplished by creating a mask for SrcFFData[64:0] using SrcFFMod[2:0]. (Please see the following HDL sample codes.)

In VHDL

case (SrcFFMod (2 downto 0)) is

when '000' => ;

-- All 8 bytes are valid. Do not mask out any bytes.

when '001' => SrcFFData (55 downto 0) := '00000000000000000000000000000000000000000000000000000000' ;

-- Only one byte is valid. Mask out the lower 7 bytes.

when '010' => SrcFFData (47 downto 0) := '000000000000000000000000000000000000000000000000' ;

-- Only two bytes are valid. Mask out the lower 6 bytes.

when '011' => SrcFFData (39 downto 0) := '0000000000000000000000000000000000000000' ;

when '100' => SrcFFData (31 downto 0) := '00000000000000000000000000000000' ;

when '101' => SrcFFData (23 downto 0) := '000000000000000000000000' ;

when '110' => SrcFFData (15 downto 0) := '0000000000000000' ;

when '111' => SrcFFData (7 downto 0) := '00000000' ;

end case;

In Verilog

case (SrcFFMod[2:0])

'000' : ;

// All bytes are valid. Do not mask out.

'001' : SrcFFData[55:0] <= 56`h00000000000000 ;

// Only one byte is valid. Mask out the lower 7 bytes.

'010' : SrcFFData[47:0] <= 48`h000000000000 ;

// Only two bytes are valid. Mask out the lower 6 bytes.

'011' : SrcFFData[39:0] <= 40`h0000000000 ;

// Only three bytes are valid. Mask out the lower 5 bytes.

'100' : SrcFFData[31:0] <= 32`h00000000 ;

'101' : SrcFFData[23:0] <= 32`h000000 ;

'110' : SrcFFData[15:0] <= 32`h0000 ;

'111' : SrcFFData[7:0] <= 32`h00 ;

endcase

The code above is a general example; depending upon your design, you may implement a better solution.

AR# 14855
Date Created 08/29/2007
Last Updated 05/03/2010
Status Archive
Type General Article