This document describes the hdl (gateware) developed to support the FmcAdc100m14b4cha@footnote{http://www.ohwr.org/projects/fmc-adc-100m14b4cha} (later refered to as fmc-adc) mezzanine card on the SPEC@footnote{http://www.ohwr.org/projects/spec} carrier card.
This document describes the hdl (gateware) developed to support the FmcAdc100m14b4cha (later refered to as fmc-adc) mezzanine card on the SPEC@footnote{@uref{http://www.ohwr.org/projects/spec}} carrier card.
The gateware architecture is describled in detail.
The configuration and operation of the gateware is also explained.
On the other hand, this manual is not intended to provide information about the software used to control the fmc-adc board.
On the repository the official releases have a tag named
@code{spec-fmc-adc-v#maj.#min} where @code{#maj} represent the major release
version of the gateware and @code{#min} the minor one (e.g @code{spec-fmc-adc-v1.2}).
@b{Note:} If you got this from the repository (as opposed to a named
@i{tar.gz} or @i{pdf} file) it may happen that you are looking at a later commit
than the release this manual claims to document.
It is a fact of life that developers forget to re-read and fix documentation
while updating the code. In that case, please run ``@code{git describe HEAD}''
to ensure where you are.
@table @b
@item TODO
ADD ref to fmc-adc sw manual...
...
...
@@ -74,7 +105,7 @@ On the other hand, this manual is not intended to provide information about the
This chapter describes the internal blocks of the FPGA.
All blocks (except the memory controller) are connected to the PCIe bridge interface using a Wishbone bus. The DDR memory can only be access through DMA.
The @ref{fig:firmware_arch} illustrates the FPGA architecture. The peripherals connected to each block are also shown.
A crossbar from the general-cores@footnote{http://www.ohwr.org/projects/general-cores} library is used to map the Wishbone slaves in the BAR 0 address space.
A crossbar from the general-cores@footnote{@uref{http://www.ohwr.org/projects/general-cores}} library is used to map the Wishbone slaves in the BAR 0 address space.
The @ref{tab:memory_map} shows the memory mapping.
@float Table,tab:memory_map
...
...
@@ -96,7 +127,7 @@ The @ref{tab:memory_map} shows the memory mapping.
@caption{Wishbone bus memory mapping (BAR 0).}
@end float
The Wishbone crossbar also implements SDB@footnote{http://www.ohwr.org/projects/fpga-config-space} records. Those records describe the Wishbone slaves and their mapping on the bus.
The Wishbone crossbar also implements SDB@footnote{@uref{http://www.ohwr.org/projects/fpga-config-space}} records. Those records describe the Wishbone slaves and their mapping on the bus.
The SDB records ROM must be located at offset @code{0x0}.
In order to identify the gateware, SDB meta-information records are used.
The following three meta-information records are used in the design:
...
...
@@ -119,7 +150,8 @@ The following three meta-information records are used in the design:
@end table
Note that some of the cores from the general-cores library are based on cores from OpenCores@footnote{http://opencores.org/}. Therefore, the documentation for those cores is hosted on the OpenCores website.
Note that some of the cores from the general-cores library are based on cores from
OpenCores@footnote{@uref{http://opencores.org/}}. Therefore, the documentation for those cores is hosted on the OpenCores website.
The register description for the cores for the carrier control and status, the time-tagging core, the interrupt controller and the ADC core can be found in annexe.
...
...
@@ -193,17 +225,20 @@ This 1-wire master controls the DS18B20 thermometer chip located on the carrier
This chip also contains a unique 64-bit identifier.
The carrier SPI master is not implemented. It is meant to control DACs connected to VCXO for White Rabbit@footnote{http://www.ohwr.org/projects/white-rabbit} applications.
The carrier SPI master is not implemented. It is meant to control DACs connected to VCXO for
White Rabbit@footnote{@uref{http://www.ohwr.org/projects/white-rabbit}} applications.
@section Mezzanine system management @math{I^2C} master
This @math{I^2C} master access the 24AA64T 64Kb EEPROM memory chip located on the mezzanine board.
This @math{I^2C} master access the 24AA64 64Kb EEPROM memory chip located on the mezzanine board.
This memory is mandatory as specified in the FMC standard (VITA 57.1). It is connected to the system management @math{I^2C} bus, also specified in the FMC standard.
This block is based on an OpenCores design.
@float Table,tab:sys_i2c_slave
@multitable @columnfractions .15 .50
@headitem Slave address @tab Peripheral
@item @code{0x50} @tab 24AA64T 64Kb EEPROM memory
@item @code{0x50} @tab 24AA64 64Kb EEPROM memory
@end multitable
@caption{Mezzanine system management @math{I^2C} slaves mapping.}
@@ -374,7 +403,7 @@ This block is based on an OpenCores design.
The @ref{fig:adc_core_fs_clk} is a block diagram of the ADC core part in the sampling clock domain. It contains a ADC data stream de-serialiser, an offset and gain correction block (for ADC data), an under-sampling block and a trigger unit.
The four channels data and the trigger signal are synchronised to the system clock domain using a FIFO.
The configuration signals coming from registers in the system clock domain are synchronised to the sampling clock within the Wishbone slave (wbgen2@footnote{http://www.ohwr.org/projects/wishbone-gen} feature).
The configuration signals coming from registers in the system clock domain are synchronised to the sampling clock within the Wishbone slave (wbgen2@footnote{@uref{http://www.ohwr.org/projects/wishbone-gen}} feature).
All the calibration values are stored in the FmcAdc100m14b4cha EEPROM.
The EEPROM holds a sdbfs@footnote{http://www.ohwr.org/attachments/download/1594/sdbfs-2012-09-19.pdf} file system.
The EEPROM holds a sdbfs@footnote{@uref{http://www.ohwr.org/attachments/download/1594/sdbfs-2012-09-19.pdf}} file system.
In addition to the calibration values, the EEPROM also contains mandatory IPMI@footnote{Platform Management FRU Information Storage Definition v1.0} records specified in the FMC Standard VITA 57.1 (see table @ref{tab:eeprom_sdbfs} for mapping).
@float Table,tab:eeprom_sdbfs
...
...
@@ -558,6 +592,15 @@ When an input range is selected, the corresponding gain/offset correction values
@caption{ADC offset and gain correction block.}
@end float
The offset register takes a 16-bit signed value.
The gain register takes a 16-bit fixed point value.