Altera DE2 Board - Ethernet Question

Altera DE2 Board - Ethernet Question

Postby fady.akladios » Thu Jan 08, 2009 2:35 am

Hey there guys,
I'm not too much of newbie with FPGA design but I'm very bad with interfacing FPGA's to other hardware. At the moment, I'm just trying to design a simple module to send 16byte packets using the Davicomm ethernet controller on the DE2 board.

I know this might sound stupid, but can anyone tell me what sequence of inputs I have to give the chip so I can write addresses and data to it? For example, to write data to an address, I do the following using an FSM coded with verilog:

state 1: set CS=0,WR=0,RD=1,CMD=0,Data=address_to_write_to;
state 2: set CS=0,WR=0,RD=1,CMD=1,Data=data_to_store;

the thing is, when i try to read from the address i stored stuff to, i never get the value I stored. Can anyone maybe advice me on a better approach to this or maybe the right sequence of commands?
Also, I really can't do much with NIOS because I have no clue about it.
fady.akladios
 
Posts: 6
Joined: Thu Jan 08, 2009 2:03 am
Location: Canada

Postby fady.akladios » Fri Jan 09, 2009 1:53 am

Well I have no knowledge of NIOS whatsoever and I have a deadline in mid-Feb where I have to submit this project. As long as I have a good process description of how the chip operates (how cs,wr,rd and interrupt operate) and the sequence of control signals that need to be applied to write or read, then I'm good. My verilog skills are pretty good so I don't have a problem with that.
fady.akladios
 
Posts: 6
Joined: Thu Jan 08, 2009 2:03 am
Location: Canada

Postby fady.akladios » Sat Jan 10, 2009 4:09 am

sure, where can i find those files?
fady.akladios
 
Posts: 6
Joined: Thu Jan 08, 2009 2:03 am
Location: Canada

Postby fady.akladios » Fri Jan 23, 2009 4:55 am

Thanks a lot for the help man.

Ok, here's my main problem now. I'm trying to interface the FPGA with an external circuit. The FPGA reads certain data from the external circuit (using the GPIO pins on the DE2 board) and sends it off to a PC using an ethernet connection.

I downloaded your project and it works great. I tried to modify the SOPC system by adding a few PIO interfaces for the purpose of my project. I compiled the nios processor and loaded it onto the de2 board and then compiled the C application in the NIOS IDE. However, even though i haven't changed the application's C code at all, the application doesn't work anymore and i'm unable to sniff any packets with wireshark, the 7seg display doesn't work either. I made sure that the base addresses for the DM9000A avalon slave module is still the same as in the old project, but still the project doesn't work. Any advice on what might the problem be?
fady.akladios
 
Posts: 6
Joined: Thu Jan 08, 2009 2:03 am
Location: Canada

Postby fady.akladios » Fri Jan 23, 2009 8:32 pm

Hey man,
I have tried everything literally. I checked the system.h file and it was correct but it still didn't work. I tried re-building the whole system again from scratch and that didn't work either. :?
Do you think you'd be able to figure out what's wrong with my project if I can send it to you? I seriously have not added anything to the project besides just adding 2 PIO ports and a Timer. I highly doubt the timer is messing up the project since there was no timer in the project previously. I haven't changed the code in NIOS or anything else.
fady.akladios
 
Posts: 6
Joined: Thu Jan 08, 2009 2:03 am
Location: Canada

Postby fady.akladios » Sat Jan 24, 2009 4:02 am

Hey,
I really appreciate. I'm just not that well experienced in NIOS and SOPC. I'm sure it's probably something very stupid.
Thanks a lot in advance :)

http://rapidshare.com/files/188528457/NET2.zip.html
fady.akladios
 
Posts: 6
Joined: Thu Jan 08, 2009 2:03 am
Location: Canada


Return to Ethernet