- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Just as the title describes,I wanna to use the SGDMA to tranfer VGA data which has much of data(800x600x4bytes=1920000bytes).SGDMA is configured to Memory to Streaming mode , the descriptor memory is On-Chip Memory and its Read Block is connected to external SDRAM.You can find the SOPC diagram in the attachment(sopc.jpg). result.jpg is the diagram of result. My problem :Why the bottom of the diagram has much of white lines? I have used the SignalTap to probe the data from the SGDMA,when the number of data beyond 1910000 bytes(variable),it has some bytes of 0xFFFFFFFF.I have no idea how can I tackle the problem.Please help me ! Thank you!Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are You sure You're not filling the invisible data of the display? Is it tft matrix only? Also do You use write until EOP or a fixed length?
Did You allocate enough memory for data pointer? Descriptor memory takes 32 bytes long data in the memory. If You're allocating descriptor memory with malloc(), then it is placed in heap, which I suppose is in the SDRAM? However I don't know if it would actually work that way.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Are You sure You're not filling the invisible data of the display? Is it tft matrix only? Also do You use write until EOP or a fixed length? Did You allocate enough memory for data pointer? Descriptor memory takes 32 bytes long data in the memory. If You're allocating descriptor memory with malloc(), then it is placed in heap, which I suppose is in the SDRAM? However I don't know if it would actually work that way. --- Quote End --- 1.The data is right,I assured. 2.tft monitor. 3.I use the fixed length(1920000bytes).The number of descriptors is 30. each with 65532 bytes to transfer. The last one is 19572bytes. 4.I use the enternal SDRAM as the data memory.The data pointer declared as alt_u32 *buffer = (alt_u32 *)SDRAM_VGA_DATA_BASE; thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hm, if it is monitor, did You check the visible areas?
http://www.vabolis.lt/stuff/20091227.gif Enable memory content viewer and check if descriptors are written to the on-chip memory.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That looks like a photo of a CRT. If you can find an LCD panel (particularly one with the correct native resolution) single pixels will be much easier to see
(This is most obvious when using direct digital interfaces to LCD panels). I can think of two possibilities: 1) You don't have the correct parameters for the vidoe frame (front and back porches etc), possibly the display isn't actually showing the first few data lines (ie the image is too high up the screen) 2) The program wrote the data via the data cache, and the data for the last few lines hasn't been written to physical memory. Changes to the test image and the order in which the image is written to memory might help identify the problem.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- 2) The program wrote the data via the data cache, and the data for the last few lines hasn't been written to physical memory. --- Quote End --- True, You must use data flushing if Nios is cached.
alt_dcache_flush_all();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hm, if it is monitor, did You check the visible areas? Enable memory content viewer and check if descriptors are written to the on-chip memory. --- Quote End --- Thank you for your reply! But,I have already checked the descriptor memory ever,it is no problem!And the TFT monitor is Ok(800x600)! It is the data from the sgdma that is wrong,so that I have a idea that if altera has some prohibition about it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- True, You must use data flushing if Nios is cached.
alt_dcache_flush_all();
--- Quote End --- Got it.I will try it torrow. Thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- True, You must use data flushing if Nios is cached.
alt_dcache_flush_all();
--- Quote End --- This is the answer! The problem is resolved. Thanks a lot!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page