Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

send/receive data to/from fpga device

Status
Not open for further replies.

mahmood.n

Member level 5
Joined
Dec 2, 2011
Messages
85
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,046
I want to feed some numbers to my vhdl code, save them in an array, process them, send them to the output array and then sends them to the output device. There are several methods to read and write the data. For example, for input I can use a file on SD card or ethernet connection. For the output I can use the SD card, or monitor or the ethernet connection.

Which one is more handy to use? Any feedback is appreciated.
 

Ethernet means you can run data hooked up to a PC. With SD card, you're limited to what you programmed to the SD card.
 

Hi,

You give only vague informations:
Like: I want to travel, I have some things to carry, I start at some place and I want to reach some place. What transport medium should I choose?

No one knows from your description:
* what possible interface your FPGA device offers
* what is the other end (microcontroller, PC...)
* what ammount of data in which time you have to transfer
* what is the transport medium and what distance (it could be on a single PCB, it could be wireless, it could be over the internet)

Klaus
 

So, there is a de0 cyclone III board with SD and a spartan board (custom created board) with SD and ethernet connection.
I want to create a text file on the SD and write some numbers. Then I want to read the numbers, send them one by one to the fpga and store them in an array. After the process, I want to revert the path and get the final result.
I see the DE0 manual has a demonstration code for SD card. I have to use the NIOS to access the SD card content. The tutorial has multiple files and folders in it and I don't know which one to run. A very basic example which I am trying to do is

1- Save a file named example.txt on the SD card
2- Write 0 in example.txt
3- insert the SD in the board
4- Load the file and read the number (here it is bit)
5- Invert the number with a VHDL code
6- Send the inverted number to the output
7- Write the result to result.txt on SD card
8- Unplug the SD from the board
9- Insert the SD to my laptop and view result.txt
 

Yes, both ethernet and SD card handling (TCP stack respectively file system) are usually implemented through software processor. If you don't want the considerable overhead for an essentially simple application, it may be easier to use a serial interface through RX and TX UART written in HDL.
 

Actually I am trying to understand SD or ethernet for larger applications.
Still my question is unanswered.
 

Still my question is unanswered.
It's answered in post #2, I believe. What's still unclear?

If your question is related to DE0 demonstration software, there's a description in the user manual how to run it.
 

You question has been answered - they both work in different ways and have different applications.
Without details from you, we cannot really give better answers.
 

Apart from the limitation of SD or ethernet, I want to know which one is better for a starter? I am reading the manual and will ask questions whenever I stuck!

Regarding the problem description, I just want to elaborate the features on the DE0 board. For example, how to send/receive data to/from fpga. Simple tutorial should be sending 1 (either through ehternet/serial/sd), then flip it with VHDL code, and then receive the result as I said before.
 

Apart from the limitation of SD or ethernet, I want to know which one is better for a starter? I am reading the manual and will ask questions whenever I stuck!

Regarding the problem description, I just want to elaborate the features on the DE0 board. For example, how to send/receive data to/from fpga. Simple tutorial should be sending 1 (either through ehternet/serial/sd), then flip it with VHDL code, and then receive the result as I said before.

As a starter - do neither, as they will both required a CPU to get it working (well, you can do ethernet without a CPU - its just not that easy)

Best thing is to go for something like RS232, which is pretty straight forward in an FPGA without a CPU and there are many examples out there on the internet.
 

As a starter - do neither, as they will both required a CPU to get it working (well, you can do ethernet without a CPU - its just not that easy)
I'll vouch for that, I wouldn't want to do anything much beyond UDP Ethernet as it's probably one of the most simple protocols and doesn't require any re-transmit capability.

Best thing is to go for something like RS232, which is pretty straight forward in an FPGA without a CPU and there are many examples out there on the internet.
I agree completely, as you are a novice at FPGAs you shouldn't be delving into using CPUs and complicated IP cores to implement something on an FPGA. Start of with a simple RS232 and other simple serial protocols before jumping into stuff like Ethernet.
 

Even UDP involves some overhead like address resolution protocol to identify the peers MAC address. I'm also not aware of ready-to-use IP for hardware UDP or TCP besides some commercial libraries. Setting it up from the scratch is far beyond the reach of a beginners project.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top