Single PPC with DES on V2P

Aug 25, 2005 4 Replies

Hey to all,



Background information: I am doing a project which has a single ppc and a specialize DES core in a Virtex 2 Pro using EDk 7.1 aas design tool. The situation is concerning the drivers generated by the EDK 7.1 for testing the core functionality in software. The EDK 7.1 generates a driver and with this driver comes a self test (unit test) for the driver which tests the register r/w, the fifos r/w and the DMA transfers in my case all the tests except for the DMA seem to worked fine. For some reason the DMA test doesn't give me the expected output. Here is a snippet of the code:



Note: This Test is for Single DES CBC Decrypt with Key =



0123456789ABCDEF and IV = 1234567890ABCDEF

Xuint8 SrcBuffer[MULTI_DES_SELFTEST_BUFSIZE] Xuint8 DstBuffer[MULTI_DES_SELFTEST_BUFSIZE]



// SrcBuffer is initialize via a loop to contain '0xE5C7CDDE872BF27C'



for( Index = 0; Index < MULTI_DES_SELFTEST_BUFSIZE; Index + 8) { SrcBuffer[ Index ] = 0xE5; SrcBuffer[ Index + 1 ] = 0xC7; SrcBuffer[ Index + 2 ] = 0xCD; SrcBuffer[ Index + 3 ] = 0xDE; SrcBuffer[ Index + 4 ] = 0x87; SrcBuffer[ Index + 5 ] = 0x2B; SrcBuffer[ Index + 6 ] = 0xF2; SrcBuffer[ Index + 7 ] = 0x7C; } // THe DstBuffer is initialize to zeroes ...



// The DMA is reset MULTI_DES_mResetDMA0(baseaddr);



// The DMA setup MULTI_DES_mSetDMA0Control(baseaddr, DMA_SINC_MASK | DMA_LOCAL_MASK );



// DMA transfer MULTI_DES_DMA0Transfer( baseaddr, baseaddr + MULTI_DES_WRFIFO_DATA_OFFSET, MULTI_DES_SELTEST_BUFSIZE);



but when I look at the results there are nothing like the expected value: '0x4E6F772069732074'



Thanks, Noel



Sounds like you are making progress. Have you simulated the design as I suggested a few weeks ago?

Paul

el_boricua wrote:

Yes in using the BFM model and it worked great on simulation.

Next step is full system simulation which will then allow you to verify the software is interacting with the hardware correctly. There might be an issue there. If that works, then it is time to insert Chipscope at various places in the hardware and compare the results to the working simulation. A few iterations of this process should reveal the issue.

Good Luck! Paul

el_boricua wrote:

Ok I made the DMA write the value '0xE5C7CDDE872BF27C' to a SW register and it wrote '0xE5C7CDDE0xE5C7CDDE' ( the upper word was written twice ) so the problem is that it writes the upper word twice even when I am telling it to write 8 bytes froma buffer of 8 bytes.

Noel

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required