- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to stand up a system with the OCIDEC ATA core, and it seems as if the device driver is a little ... stale. Before I dive in and try and fix it, I thought I would ask if anyone has already done this and has pointers to give or (wonder of wonders) a patch to fix it.
FYI, I started with the altcf core and got it working, but even with hippo's most excellent timing tweaks, PIO mode isn't going to cut it for my application. I'm hoping that DMA mode will be enough, and that I don't have to try and add UDMA support to the OCIDEC core...Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I've made some progress, but seem to be stuck at the same point as this post (http://forum.niosforum.com/forum/index.php?showtopic=1485&hl=ocidec). If anyone has more information about how to get past the kernel freeze, I'd appreciate it.
One other strange thing, the driver in the uClinux-dist tree expects the OCIDEC version 3.1 core, but all I can find at opencores.org is the 3.0 core. Does anyone know where to find the 3.1 core?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is your io speed requirement?
Even if you have fast io device, the kernel will still waste time copying user's data to and from kernel space. You can use mmap() to reduce this overhead.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would LIKE 25 - 35 MB/sec, but could live with 12- 15 MB/sec. With the "stock" ALT-CF core I get ~0.8 MB/sec; after applying your timing tweaks I top out at about 2.5 MB/sec.
I understand and agree with your concerns about the potential overhead of copying buffers, but I don't think I'm there yet. If I take the same hard drive and connect it to a Windows desktop configured for PIO mode 4, Windows get essentially the same 2.5 MB/sec performance. (I think it was actually 2.6, but that's from memory.) Based on that, I think I'm maxing out PIO mode, not the Nios II. Does that make sense?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is very difficult to achieve the speed you want without using UDMA mode.
But before that, you can still get some improvement. First you should modify your application to use "mmap()" instead of regular file op. It is very important to speed up. Linux has many features that can make it faster than Windows. Next, include "hdparm" in busybox, and run "hdparm -i /dev/hda" [*] hdparm [*] hdparm: get identity You can find the HDD mode from the output. You may try to tweak the modes. You can use avalon DMA core to perform the PIO block trasnfer, but it require modification of the driver.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your advice!
I'm not in front of the system at the moment, so this is from memory... I've tried hdparm, but either it didn't allow me to change modes, or the mode didn't seem to affect anything (I think it didn't allow a change). I used your earlier suggestions to tweak the timing of the ALT-CF interface to match PIO mode 4, so I'm not sure how much changing the PIO mode would change. I'd like to try mulit or DMA modes, but it appears that the driver doesn't support it, and as you point out, it's hard to get to where I want to be without UDMA mode. Would using the Avalon DMA core to perform the PIO transfers improve the transfer rate to the hard drive, or just lower the cpu load on the Nios? I guess the DMA engine would have lower latency in responding... You don't by chance have a reference to anyone that's done that, do you? Finally, as far as mmap goes, I'll definitely do that in my application but at the moment I'm just testing with dd. (dd if=/dev/zero of=/mnt/test_file bs=1024 count=100000) I guess I was assuming that would be about as efficient as I could get for test purposes; any other sugestions?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by cerge@Dec 1 2006, 10:22 PM finally, as far as mmap goes, i'll definitely do that in my application but at the moment i'm just testing with dd. (dd if=/dev/zero of=/mnt/test_file bs=1024 count=100000) i guess i was assuming that would be about as efficient as i could get for test purposes; any other sugestions?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19753)
--- quote end ---
--- Quote End --- DD is very slow, when compared to mmap().

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page