FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6356 Discussions

Compact Flash Controller

Altera_Forum
Honored Contributor II
1,227 Views

Hello, 

 

I'am working on a project that consists in making a Compact Flash Controller for a specific microprocessor (Verilog). I've found some documents about this subject, but I'm still in doubt about many points. Actually, I don't really know how to start. 

 

A compact flash memory has 50 pins I/O. So I guess my controller will have 50 pins I/O going to the memory card, and another 50 pins I/O going from the CPU to the controller. Am I right ? 

 

Then, let's say I want to read the compact flash memory. The controller will receive the read signal, so I will make an assignment to connect address bus coming from the CPU to address bus going to the memory (and others assigments as well). Is it how it works ? In that case, it looks like connecting directly the CPU to the memory. I'm confused. 

 

Thanks ! 

 

Julien.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
481 Views

Hi, 

 

Basically compact flash card can be used in different mode like Ture IDE PIO mode, DMA mode.  

 

Out of 50 Pins some of the pins are not used in while you are using CF card in True IDE PIO mode. You have to keep pins as ground/VCC.  

 

You have to take care of timing of address/read/write signals coming from CPU when you want to pass them to CF card. Before do read/write to CF card you have set CF's register like cylinder no, sector no, etc.. 

 

Regards, 

Hardik Sheth
0 Kudos
Altera_Forum
Honored Contributor II
481 Views

Ok thanks, I have others questions : 

- What is the difference between PC Card ATA Memory mode and PC Card ATA I/O mode ? 

- Is there another way for driving the CF card instead of using the command register ? 

- What is the command register address ? (I didn't find it into the CF specifications) 

- What does "mapping" mean ? (PC Card mapping for example) 

 

Thanks, 

 

Julien.
0 Kudos
Altera_Forum
Honored Contributor II
481 Views

So I found much information about my previous questions. But I still don't understand why there are many memory mappings ? What is the purpose ?  

 

Then, my other question now is about UDMA : How do I select UDMA mode ? Is it only by cabling devices in the correct way ? Or is there a register that needs to be changed ? 

 

Thanks, 

 

Julien.
0 Kudos
Altera_Forum
Honored Contributor II
481 Views

Hello Friends, 

Just try yourself google and search just "PC card ATA". 

You will get your required answers.
0 Kudos
Altera_Forum
Honored Contributor II
481 Views

Does sb know where I can find a Compact Flash model in Verilog ?

0 Kudos
Altera_Forum
Honored Contributor II
481 Views

My controller is done and seems to work. I tried to read/write/erase an old CF card and everything is fine. Then I bought a new one (Lexar 233x), and now I'm not able to erase it. I tried the erase sector command, format unit command without any success.  

 

Does sb have any idea ?
0 Kudos
Reply