|
|
== https://es.technikum-wien.at/openlab/openlab_wiki/wikis/home[Home] | https://es.technikum-wien.at/openlab/openlab_wiki/wikis/board_TIVAC[<Microcontroller-based TIVAC] | https://es.technikum-wien.at/openlab/openlab_wiki/wikis/sig_proc_osci_hardware[Signal Processing Front-End (XMC,TIVAC,DE0-Oscilloscope)>]
|
|
|
|
|
|
= Protocol Interpreter and Reply Generator
|
|
|
|
|
|
The protocol interpreter of the FPGA design is responsible for interpreting data sent by the OpenLab GUI.
|
|
|
It also generates reply messages to communicate the status of the FPGA or to transfer the requested sample data.
|
|
|
Another function of this entity is the controlling of other parts of the FPGA design.
|
|
|
The following sub-chapters will describe the functionality of the OpenLab communication protocol and how the interpreter component of the FPGA was implemented.
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
== OpenLab communication protocol
|
|
|
|
|
|
The interpreter is based on the communication protocol described in [21]. This protocol standardises the way of communication between a OpenLab device and the OpenLab GUI.
|
|
|
This ensures that the OpenLab GUI is able to connect to, and communicate with, any OpenLab device. Regardless if it is microcontroller-based, FPGA-based or soundcard-based.
|
|
|
The protocol was written from the OpenLab device perspective. This means that every command that is declared by the protocol is sent by the GUI.
|
|
|
On the other hand, every reply is sent from the OpenLab device. Two versions of the OpenLab communication protocol are described by [21].
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
The first one is human readable and therefore called ASCII protocol. Every command and reply is sent entirely in ASCII format.
|
|
|
This enables the user to debug the communication using terminal programs.
|
|
|
The ASCII protocol was only used during the first phase of the OpenLab project to get a better understanding for setting up a reliable protocol and debugging sample data.
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
The second protocol, called the binary protocol, is a much improved version and is currently used at the OpenLab project.
|
|
|
By transferring the data in the binary format the overhead of each message is drastically reduced, leading to much faster processing at the GUI and the OpenLab devices.
|
|
|
It features, unlike the ASCII protocol, error detection capabilities. With the usage of the CRC16 algorithm, errors during transmission can be detected.
|
|
|
This is necessary to detect bad sample data before the sample is displayed on the graph of the GUI.
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
Table 1 shows the layout of the binary protocol, including the command- and reply structure.
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/OpenLab_osci_FPGA_imp/osci_FPGA_imp_binarytable.PNG[caption="Figure 1: ",title="Binary-Mode command- and reply-structure, modified [21]",align="center"]
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
== https://es.technikum-wien.at/openlab/openlab_wiki/wikis/home[Home] | https://es.technikum-wien.at/openlab/openlab_wiki/wikis/board_TIVAC[<Microcontroller-based TIVAC] | https://es.technikum-wien.at/openlab/openlab_wiki/wikis/sig_proc_osci_hardware[Signal Processing Front-End (XMC,TIVAC,DE0-Oscilloscope)>] |