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
0x06Countercounters
0x0cPWMpulse width modulated outputs
0x10Watchdogwatchdog timers

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
0x204resolutionryesthis 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.

Subtypes

Currently there are two subtypes of this subdevice

IDDescriptionExample
0x1Simple ADC with continuous samplingADC128S102
0x2Advanced model with integrated filter and sampling mode selectionAD7606

DAC

OffsetSize [byte] Namer/wConstDescription
0x204resolutionryesthis is the number of resolvable digital steps
0x244value_0r/wnochannel 0: digital output value
0x284value_1r/wnochannel 1: digital output value
..4..r/wno..

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

Subtypes

Currently there is one subtypes of this subdevice

IDDescriptionExample
0x1Simple DAC where the outputs are continuously set. All channels are updated at the same timeAD5668

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.

Counter

All modules which count something can implement this interface. An example for this could be a FQD (fast quadrature decoder). It counts the number of edges of a signal.

OffsetSize [byte] Namer/wConstDescription
0x204count_0rnocounter channel 0
0x244count_1rnocounter channel 1
..4..rno..

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.

Watchdog

If the counter reaches 0 the watchdog fires and osl_granted goes to '0'. The counter decrements with every clock cycle. Is has to be written periodically to prevent the watchdog of running out.

OffsetSize [byte] Namer/wConstDescription
0x204base_clkryesbase clock in Hz
0x244status_confr/wnostatus and configuration register
0x284counterr/wnocounter
status_conf
31 07 06 05 04 03 02 01 00
rearmstatus

status: shows the value of the osl_granted signal. If '1': the output is set, if '0': the output is not set | rearm: When the watchdog has fired, it has to be reset with this signal. Write '1' to rearm. This bit is self clearing to '0'.