Dies ist eine alte Version des Dokuments!


Available Subdevices

The functions given below have so far been implemented as VHDL modules (see VHDL). For all of them a suitable driver is available in the flink Userspace Library

function idnamedescription
0x00Infoinfo subdevice with description
0x01AnalogInanalog input, ADC
0x02AnalogOutanalog output, DAC, not yet implemented
0x05DigitalIOdigital inputs and outputs, GPIO
0x0cPWMpulse width modulated outputs

Subdevice Specific Registers

As described in flink, Universal Serial Interface to FPGA's every subdevice realizes a certain function. The function id together with status and configuration registers can be found in the header and subheader section. Every subdevice has further registers which are specific for a certain function. These registers are described below for the available functions.

Info Subdevice

This subdevice might be present or not in a device. Its purpose is to indicate the total memory size of the whole device. It further has a 28 bytes description field. This allows for identifying a given design.

OffsetSize [byte] Namer/wConstDescription
0x204memory sizeryestotal memory size for the device (in bytes) including all subdevices
0x2428descriptionryescontains a description, including a name and/or a date

The status and configuration registers in the subheader are unused with this function.

ADC

OffsetSize [byte] Namer/wConstDescription
0x204resolutionrnothis is the number of resolvable digital steps
0x244value_0rnochannel 0: digitized input value
0x284value_1rnochannel 1: digitized input value
..4..r/wno..

The status and configuration registers in the subheader are unused with this function.

ADC

OffsetSize [byte] Namer/wConstDescription
0x204resolutionrnothis is the number of resolvable digital steps
0x244value_0rnochannel 0: digitized input value
0x284value_1rnochannel 1: digitized input value
..4..r/wno..

The status and configuration registers in the subheader are unused with this function.

GPIO

OffsetSize [byte] Namer/wConstDescription
0x204dir_0r/wnodirection bits for channels 0 .. 31
0x244dir_1r/wnodirection bits for channels 32 .. 63
..4..r/wno..
0xyy4val_0r/wnodigital value for channels 0 .. 31
0xyy+44val_1r/wnodigital value for channels 32 .. 63
..4..r/wno..

A value of '1' configures a pin as an output in the direction register. The status register in the subheader is unused with this function. In the configuration register setting the bit 0 will reset the subdevice.

PWM

OffsetSize [byte] Namer/wConstDescription
0x204base_clkrnobase clock in Hz
0x244ptime_0r/wnochannel 0: period in multiples of base clock
0x284ptime_1r/wnochannel 1: period in multiples of base clock
..4..r/wno..
0xyy4htime_0r/wnochannel 0: high time in multiples of base clock
0xyy+44htime_1r/wnochannel 1: high time in multiples of base clock
..4..r/wno..

The status register in the subheader is unused with this function. In the configuration register setting the bit 0 will reset the subdevice.