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

help!

Altera_Forum
Honored Contributor II
1,091 Views

I met many problems in my system design recently. So i am here for your help! 

problems 

(1) I add a user logic to my system ,named pwm. During my compilation ,the system indicate : 

Error: Project too complex: Hierarchy path is too long. 

I don't know what caused such a problem and how to deal with it. help! 

(2) I want to use nios to control the read/write data from/to a harddisk. 

I want to know whether I can use PIO to send the signals (such as chipselectsignal) to my  

harddisk? help! 

(3) how to read /write my harddisk through a interface defined by myself. I means how to write  

the software. In details ,how to read /write my user interface ports. help!!! 

 

 

thank you very much!!!!
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
415 Views

You can either use a pio to emulate the signals to a hard drive, or some direct data/address bus. 

 

The pio will be rather slow. 

The direct address/data bus is a peripheral, where you use the least significant address lines to select the registers in the hard drive. Using the pio-interface mode of the drive, the interface is rather simple and quite fast (of course a lot slower than the DMA-modes, but this is much more complex to handle in hard and software). 

 

About the software there are severel levels to define : 

 

 

 

Stefaan.
0 Kudos
Altera_Forum
Honored Contributor II
415 Views

Sorry, was not ready yet, but hit some button, ... 

 

About the software there are severel levels to define : 

 

- define a structure in the software that maps to the registers of the ATA(IDE) hard drive 

 

- drive handling itself : what registers to use for what, find the drive and initialise 

 

- read and write sectors ( PIO mode = write a command and then read or write the full sector 16 bit at the time to or from the data register. 

 

- file system : FAT is rather easy, but if it can be made simpler if needed. 

 

If you want to use it with an operating system like µCLinux or something like this, don't ask me. 

 

 

Stefaan.
0 Kudos
Altera_Forum
Honored Contributor II
415 Views

If you have a Nios devkit, I recommend adding the Compact Flash component. The CF interface is nearly identical to ATA(IDE), both from a software and hardware perspective. From a hardware standpoint, look at J11 of your devkit. This pinout is identical to an IDE cable. From a software standpoint, the register set required is I believe identical to Compact Flash. 

 

Now, having said that, I have managed to get uC-linux working on my board where I can mount a Compact Flash card. The theory is, if you can talk to a CF card, you should be able to talk to an ATA hard-drive. 

 

Haven't tried it yet though... 

 

Hope this helps, 

-Terry
0 Kudos
Reply