Altera_Forum
Honored Contributor
17 years agoInterfacing Custom Component
Recently I built custom component of SDCARD.
What I'm trying to make is an easy interfacing with the SDCARD module I built based on VHDL. I want to read or write from the SDCARD Mem only by using single write or read command. When I tried to convert my VHDL module to Custom Component, I have found out that the communication between my module and the AVALON is nothing like the waveforms at the datasheets and at the SOPC software (I'm working with Quartus 9.0). My problem is when I'm sending threw the NIOS IDE console simple "write" command, the AVALON sending 4 pulses of write on the "write" line instead of one. And that's not all, at the first pulse I receive threw the "writedata" line, the data I have inserted threw the console, and at the 4th pulse I receive threw the "address" line, the address I asked for (sometimes it's the wrong address). Another problem I have is when I'm inserting "read" command the AVALON sending me the address on the "writedata" line. This is very confusing, I don't think its have smth to do with my module, the only thing that I changed from other modules is that the system clk is 50M and the SD clk is 20M. I added few pictures of the data I receive on the signal tap, and the commands I send threw the console. And here's the index: PIC1-read mode, the AVALON sends the address to the "writedata" input. PIC2-while I'm sending threw the NIOS IDE write command, he generate 4 cycles of write, while at the first one he locking the data, and at the last he gives me the address, in this example,he give me the wrong address, i can upload exapmle with the right address at the 4th pulse. * Data_in - writedata Data_out - readadata * I can really use some help, thnx