The Generic Logic Interfacing Project
GLIP, the "Generic Logic Interfacing Project", is a solution for transferring data through FIFOs between a host, usually a PC, and a target, usually a hardware component such as an FPGA or a microcontroller. The actual data transport can happen through various interfaces, such as USB 2.0, JTAG or TCP. GLIP encapsulates all low-level details of the data transfers and provides on the host side an easy to use C library, and on the target side ready to use interfaces (e.g. in Verilog) to quickly setup a working communication.
On the target side, we provide a common FIFO interface, which we call the "GLIP Logic Interface". The actual implementation is specific to the target and the used communication protocol, but tries to adhere to a common interface. This interface is documented on the GLIP Logic Interface page.
On the host we provide a C library,
libglip, which encapsulates all communication tasks.
The library is split up into several parts, which are described on individual pages. Look there for detailled instructions on the individual topics.
Using GLIP is easy, but depends a bit on the selected target. Some demonstration examples to get a quick start on some selected platforms.
To get an impression of how to use GLIP on the host side, the following example shows a simple example code. Essentially, you need to initialize the library, connect to a target, read and write data from it, close the connection when you're done and free all allocated resources.
0indicates everything was OK, any other return value marks an error. Make sure to check all return codes in your production code. The only notable exception to this convention are the getter and setter functions, i.e. functions starting with
glip_is_. Those functions return nothing (setters) or the requested value (setters).