- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I'm now trying to use CF with nios2 dev kit(Stratix2). But the speed of CF is very slow. I tried this code. (VFAT format is used.) FILE *fp;
int c;
if ((fp = fopen("/mnt/ide0/test.txt", "r")) == NULL) {
return 0;
}
while ((c = getc(fp)) != EOF){
led->np_piodata = c; // Blink LED
}
When I use 220kByte test.txt, it took 1sec for complete this loop. I need this speed at lease 15MByte/sec. Is it possible to improve it? If it's possible, how can I do it? Thank you.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is self-replay.
I found the answer in this forum. http://www.niosforum.com/forum/index.php?s...5&hl=throughput (http://www.niosforum.com/forum/index.php?showtopic=1155&hl=throughput)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check the PTF file, for CFI.
The read/write wait timing is too slow. You should change it to mode2 (about 200ns) or mode4. SLAVE ide { # The timing parameters below ensure proper operation with "Mode 0" # Compact Flash devices (the slowest speed), in True IDE mode. If # a different mode is used, these timing settings may be adjuste for # higher performance. SYSTEM_BUILDER_INFO { Bus_Type = "avalon"; Address_Alignment = "native"; Address_Width = "4"; Data_Width = "16"; Has_IRQ = "1"; Read_Wait_States = "530ns"; Write_Wait_States = "500ns"; Setup_Time = "70ns"; Hold_Time = "30ns"; --- Quote Start --- originally posted by m_isshiki@Nov 11 2005, 10:52 AM hello.
i'm now trying to use cf with nios2 dev kit(stratix2).
but the speed of cf is very slow.
i tried this code.
(vfat format is used.)
file *fp;
int c;
if ((fp = fopen("/mnt/ide0/test.txt", "r")) == null) {
return 0;
}
while ((c = getc(fp)) != eof){
led->np_piodata = c; // blink led
}
when i use 220kbyte test.txt,
it took 1sec for complete this loop.
i need this speed at lease 15mbyte/sec.
is it possible to improve it?
if it's possible, how can i do it?
thank you.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10918)</div> --- Quote End ---

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