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.

Data string length to be send out from FPGA

Status
Not open for further replies.

Vlad.

Full Member level 3
Joined
Jun 4, 2012
Messages
179
Helped
3
Reputation
6
Reaction score
4
Trophy points
1,298
Location
Bucharest/Romania
Activity points
2,568
Hi,

I have custom FPGA board which has a lot of peripherals like: temperature sensors, RTC, ADC etc. The board has also a high speed mezzanine connector to communicate and take data from some high- speed ADCs and not only.

Right now I am thinking to design the firmware in term of the length of the data string which will be send out from the FPGA to a PC and how should I do it. Consider the following scenarios:

1- I want to readout all the on-board sensors and the mezzanine ADC data, hence in this case the data string will have a maximum length;

2- I want to readout only a few sensors, hence the actual length of data bits will be smaller than the case in the 1st scenario.

In this case which type of data string length should I use? A user defined length for the whole sensors, and mask only the data bits of interest in the PC? or should I allocate a dynamically user-configurable length as per number of sensors used?

I hope I was clear enough.

Cheers,

Vlad
 

1) Receive command "Read All"==>transmit all the data
2) Receive command "Read Register X"==>transmit the data in Register X

I really don't understand your question "which type of data string length should I use?". You use the length of the data that your transmitting, right? The protocol/message structure is up to you.
 

What kind of link are you using, how is the data encoded?

"data string" seems to refer to text formatted data. Why not raw binary?
 

Hi Barry,

I am inclined to do that. However, my concern was about the length of the data which is to be set on PC to expect from the FPGA, hence a larger number or lower number of bytes without modifying the buffer settings in the PC GUI. But I think I will find a way to config the receiver in PC to have a configurable buffer length to expect, depending on the reading data.

Cheers,
Vlad

- - - Updated - - -

@FvM, yes is raw binary data. Sorry, I forgot to mention it.

- - - Updated - - -

And regarding the protocol is either UART or TCP/IP.
 

Binary data can be streamed through TCP/IP, you don't need to care for buffer sizes. UART needs a framing protocol and should have a means to detect missing or corrupted data.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top