Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

CF speed is too slow?

Altera_Forum
Honored Contributor II
1,264 Views

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.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
425 Views
0 Kudos
Altera_Forum
Honored Contributor II
425 Views

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 ---  

0 Kudos
Reply