- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
G´day !
I´ve qsys system running containing IP_Compiler for PCI Express, DMA Controller and On-Chip Memory. BAR Type is 32 Bit Non-Prefetchable, 32 Bit Data width at DMA and On-Chip. I wrote Linux driver (Host system) to copy data from Onchip Ram to my Host system via DMA, which works quite fine just the data throughput is not satisfiying me. A value about 20MByte/sec were calculated. I tried to enable Burst Modus in DMA to hopefully get higher transfer rate. But now i always get stuck and busy flag in DMA Register is always HIGH. Is there something more I have to consider when turning on burst mode ? thanks for ur help... greetsLink Copied
10 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, domtheron!
When I saw that example, I wondered - how one is supposed to run it without a driver or GUI? Writing own driver and GUI? If You wrote Your own driver, than the answer is Yes .... Did You solve Your problem with data throughput?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey....
"I wrote Linux driver (Host system) to copy data from Onchip Ram..." -> so i wrote my own Linux driver for that. "Did You solve Your problem with data throughput?" -> no i haven´t solved so far (testing on quartus 10, 11 and 12). I gave up after some time, the system works quite well for my amount of data, but burst mode is still not working. But if u´ve got a solution to that problem i would very much welcome if u can tell me :-) would simplify a lot of things. greets- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Writing own driver is what I am about to learn.
Are there any guidelines from Altera or any other source on how to write Windows drivers for that kind of systems containing IP_Compiler for PCI Express, DMA ( or SGDMA ) Controller and On-Chip Memory? Isn't DDK enough for that?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Are there any guidelines from Altera or any other source on how to write Windows drivers for that kind of systems containing IP_Compiler for PCI Express, DMA ( or SGDMA ) Controller and On-Chip Memory? Isn't DDK enough for that? --- Quote End --- Given that Altera uses Jungo for any of the windows examples, I'd say you have no chance of getting example code that is written at the windows DDK level. Cheers, Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll probably find it easier to use linux :-)
(or one of the BSDs)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- hey.... "I wrote Linux driver (Host system) to copy data from Onchip Ram..." -> so i wrote my own Linux driver for that. "Did You solve Your problem with data throughput?" -> no i haven´t solved so far (testing on quartus 10, 11 and 12). I gave up after some time, the system works quite well for my amount of data, but burst mode is still not working. But if u´ve got a solution to that problem i would very much welcome if u can tell me :-) would simplify a lot of things. greets --- Quote End --- domtheron (http://www.alteraforum.com/forum/member.php?u=38941), Are you taking care of the maximum allowed transaction size for DMA burst transfers? If you use burst with the Altera's DMA Controller, the DMA transfer can not be bigger then MAXIMUM_BURST_SIZE * DMA_DATA_WIDTH bits. Considering you are using PCIe core and it have a 64bits wide data bus with burst up to 64 words, you can transfer only 64*64/8=512bytes per transaction... You will need your driver to be working with interruption and requesting transactions of 512bytes to achieve some bandwidth... --- Quote Start --- Burst Transactions When Enable Burst Transfers is turned on, the DMA controller performs burst transactions on its master read and write ports. The parameter Maximum Burst Size determines the maximum burst size allowed in a transaction. In burst mode, the length of a transaction must not be longer than the configured maximum burst size. Otherwise, the transaction must be performed as multiple transactions --- Quote End --- cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wgutstein, thanks for ur answer. i know this data sheet and that i´ve to take care of the maximum burst size.
but actually i can´t follow ur calculation: if data width is 64 Bit (=8 Byte) and maximum_burst_size is 64 words (=256 Byte), then 2048 Byte can be transfered with a single transaction ??- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- wgutstein, thanks for ur answer. i know this data sheet and that i´ve to take care of the maximum burst size. but actually i can´t follow ur calculation: if data width is 64 Bit (=8 Byte) and maximum_burst_size is 64 words (=256 Byte), then 2048 Byte can be transfered with a single transaction ?? --- Quote End --- 64 words of 8 bytes = 512bytes or 64 words of 64 bits = 4096bits = 512bytes ;) I think that if set all the burst/data widths to be the same you can be sure that it isn't the adapters fault.. Set your DMA to use double-words only and make sure all your datapath have the same data/burst width(I think [6:0] and [63:0] respectively, look int the top qsys generated file...) as the PCIe. If you use words only on DMA, you max transaction size will fall to 32(single word data width)*64/8=256bytes... good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey wgutstein..
thanks, i always use the vocable "word" for a 32 Bit transfer (halfword for 16 Bit,....). I´m quite sure i´ve done all the stuff u mentioned...have u ever tried the burst transfer in ur system? Once i read that burst transfer seems to work just for 64 Bit width, so i gave up then... ;-) cheers- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi domtheron,
Yes, I have a system using burst transfers from PCIe to a DDR2 memory passing trough a multi-port. I'm using my own burst adapter right now and I'm being able to burst up to 512bytes ( maximum DMA's double-word transaction). I'll work on this system again in a couple weeks and try it without my burst adapter and let you know if it works.
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