Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5

Discussion Groups

Discussion Groups | TMS320C55x | rectangular matrix dma transpose

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

rectangular matrix dma transpose - dcar...@solacom.com - Sep 12 14:03:16 2007



Referring to DMA5 example found in CCS (16 bit transfer), the double indexing used to
transpose a square matrix is as follows:

#define REVERSE_ELE_CNT     ((FRM_CNT-1)*ELE_CNT - 1)
#define SRC_FRM_IDX         -(REVERSE_ELE_CNT*2 + 1)
#define SRC_ELE_IDX         (2*ELE_CNT - 1)

This will works fine for a square matrix, but won’t work for a rectangular matrix.  Is there
a means to use double indexing to transpose a rectangular matrix?  For example, using example
DMA5 and changing the matrix format to:

#define FRM_CNT   3          //Row count
#define ELE_CNT   8          //Column count

Once ran results with:

004020: dst1
004020: 0000 0008 0010 
004023: 0002 0000 0000 
004026: 0000 FFFF 0000 
004029: 0000 0000 0000 
00402C: 0000 0000 0004 
00402F: 000D 0004 000C 
004032: FFFF 0000 0000 
004035: 0000 0000 0004 

004000: src1
004000: 0000 0001 0002 0003 0004 0005 0006 0007 
004008: 0008 0009 000A 000B 000C 000D 000E 000F 
004010: 0010 0011 0012 0013 0014 0015 0016 0017

,which obviously not correct. 

I also obsever "-1"  in the index formulas e.g. #define SRC_ELE_IDX   (2*ELE_CNT -
1), which I don't understand.  I get the multiplication by 2 since DMA using BYTE address and
words are being transferred, but not the -1. The same for #define REVERSE_ELE_CNT  
((FRM_CNT-1)*ELE_CNT - 1), I don't get the last -1 term.

I’m obviously new at this, so please spare no details.  

I thank you in advance. 
Much appreciated,
Daniel



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )

Re: rectangular matrix dma transpose - dcar...@solacom.com - Sep 13 16:36:32 2007

I was able to transpose a rectangular matrix by combining CCS DMA4 and DMA5 examples. 
More specifically by looping back through a McBSP (digital loopback) with two distinct DMAs. 
The DMA in the TX path had used the index formulas below but the frame and and element count
were interchanged in the DMAs respecitve count registers.  The DMA in the RX path had the frame
and element index set to 1, and the counts were not interchanged.

Daniel

----------------

Referring to DMA5 example found in CCS (16 bit transfer), the double indexing used to transpose
a square matrix is as follows:
>
>#define REVERSE_ELE_CNT     ((FRM_CNT-1)*ELE_CNT - 1)
>#define SRC_FRM_IDX         -(REVERSE_ELE_CNT*2 + 1)
>#define SRC_ELE_IDX         (2*ELE_CNT - 1)
>
>This will works fine for a square matrix, but won’t work for a rectangular matrix.  Is
there a means to use double indexing to transpose a rectangular matrix?  For example, using
example DMA5 and changing the matrix format to:
>
>#define FRM_CNT   3          //Row count
>#define ELE_CNT   8          //Column count
>
>Once ran results with:
>
>004020: dst1
>004020: 0000 0008 0010 
>004023: 0002 0000 0000 
>004026: 0000 FFFF 0000 
>004029: 0000 0000 0000 
>00402C: 0000 0000 0004 
>00402F: 000D 0004 000C 
>004032: FFFF 0000 0000 
>004035: 0000 0000 0004 
>
>004000: src1
>004000: 0000 0001 0002 0003 0004 0005 0006 0007 
>004008: 0008 0009 000A 000B 000C 000D 000E 000F 
>004010: 0010 0011 0012 0013 0014 0015 0016 0017
>
>,which obviously not correct. 
>
>I also obsever "-1"  in the index formulas e.g. #define SRC_ELE_IDX   (2*ELE_CNT
- 1), which I don't understand.  I get the multiplication by 2 since DMA using BYTE address and
words are being transferred, but not the -1. The same for #define REVERSE_ELE_CNT  
((FRM_CNT-1)*ELE_CNT - 1), I don't get the last -1 term.
>
>I’m obviously new at this, so please spare no details.  
>
>I thank you in advance. 
>Much appreciated,
>Daniel



(You need to be a member of c55x -- send a blank email to c55x-subscribe@yahoogroups.com )