![]() |
Demo program for Multiplexer IP Core.
The Usage() function shows how to execute the test program, options available and default values set for different configuration variables. The Variables section specifies variables used in the test program, what they specify, the values it holds and can take. The main() function specifies sequence of api calls executed and tested.
Functions | |
void | MuxUsage () |
int | main (int argc, char *argv[]) |
Variables | |
fpgawb_ipcore_t | ip_core |
fpgawb_ipcore_t struct which stores useful information about the IP Core after executing get IP Info api call. Check fpgawb_lib.h or api call documentation for more information | |
int | channel =-1 |
Channel number for the Mux IP Core Channel. It takes values 0 to (number of IP Core channels-1) and defaults to -1 (test program executed for all channels) | |
uint | mux_number =0 |
Mux number can take value 0 to 95 because each Channel has 96 Muxes. It defaults to 0. | |
uint | control = 0 |
Control takes value 0 to 127 because each Mux can have maximum of 128 input ports. This selects which input line to output. It defaults to 0. | |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Step 1: OPEN DEVICE
ccurPMFC_Open(&handle,board_no,oflags)
Before using any API calls, the user needs to open the device and get a handle. This handle is then used as the first argument in most of the following APIs.
Step 2: GET DRIVER INFO
ccurPMFC_Get_Driver_Info(handle, &binfo)
This call returns useful driver information and saves in the ccurpmfc_driver_info_t structure for later use.
Step 3: GET LIBRARY INFO
ccurPMFC_Get_Library_Info(handle, &linfo)
This call returns useful library information and saves in the ccurpmfc_library_info_t structure for later use.
Step 4: GET IP INFO
fpgawb_Mux_Get_Ip_Info(handle, &ip_core)
This call returns useful IP Core information and saves in the fpgawb_ipcore_t structure for later use.
Step 5: CONFIGURE CHANNEL
fpgawb_IpCore_Mux_Configure_Ch(handle,chan,mux_number,control)
This call configures the control which selects which input to be output on the output line of the Mux of the respective Channel.
Step 6: CLOSE DEVICE
ccurPMFC_Close(handle)
Closes the device with the handle.
void MuxUsage | ( | ) |
Usage:
./fpgawb_ipcore_mux [-b BoardNumber] [-c ChannelNumber] [-i ControlBit] [-m MuxNumber]
Options | Default value |
---|---|
-b Board Number | 0 |
-c Channel Number (0-(Numchans-1) | -1 (all channels) |
-i Control (0-127) | 0 |
-m Mux number (0-95) | 0 |
Examples:
./fpgawb_ipcore_mux -c0 -m0 -i2
./fpgawb_ipcore_mux -c0 -m1 -i7