-
Notifications
You must be signed in to change notification settings - Fork 1
dac transport peripheral
The DAC JESD204B Transport Peripheral (AD-IP-JESD204-TRANSPORT-DAC) implements the transport level handling of a JESD204B transmitter device. It is compatible with a wide range of Analog Devices high-speed digital-to-analog converters.
The core handles the JESD204B framing of the user-provided payload data. In addition it is capable of generating standard and user-defined test-pattern data for interface verification. It also features a per-channel dual-tone DDS that can be used to dynamically generate test-tones.
The peripheral can be configured at runtime through a AXI4-Lite memory mapped register map.
- ADI high-speed DAC compatible JESD204B data framing
- Test-pattern generator for interface verification
- Per-channel dual-tone DDS (optional)
- Runtime re-configurability through memory-mapped register interface (AXI4-Lite)
axi_ad9371_tx.v
up_dac_common.v
up_dac_channel.v
ad_iqcor.v
ad_dds.v
axi_ad9371_tx_channel.v
Name | Description | Default |
---|---|---|
ID | Instance identification number. | 0 |
DATAPATH_DISABLE | Disable instantiation of DDS core. | 0 |
Name | Type | Description |
---|---|---|
Configuration interface | ||
s_axi_aclk | Clock | All S_AXI signals and irq are synchronous to this clock. |
s_axi_aresetn | Synchronous active low reset | Resets the internal state of the peripheral. |
S_AXI | AXI4-Lite bus slave | Memory mapped AXI-lite bus that provides access to modules register map. |
DAC interface | ||
dac_clk | Input | Clock for DAC Operation |
dac_rst | Output | Reset to DAC |
dac_data | AXI4-Streaming interface | Framed transmit data towards link layer. |
DMA interface | ||
dac_dunf | Input | Application layer underflow. |
dac_dovf | Input | Application layer overflow. |
dac_enable_i0 | Output | Request signal for I-Channel 0. |
dac_valid_i0 | Output | Qualifier signal for I-Channel 0. Always '1'. |
dac_data_i0 | Input | Raw application layer data, for I-Channel 0. |
dac_enable_q0 | Output | Request signal for Q-Channel 0. |
dac_valid_q0 | Output | Qualifier signal for Q-Channel 0. Always '1'. |
dac_data_q0 | Input | Raw application layer data, for Q-Channel 0. |
dac_enable_i1 | Output | Request signal for I-Channel 1. |
dac_valid_i1 | Output | Qualifier signal for I-Channel 1. Always '1'. |
dac_data_i1 | Input | Raw application layer data, for I-Channel 1. |
dac_enable_q1 | Output | Request signal for Q-Channel 1. |
dac_valid_q1 | Output | Qualifier signal for Q-Channel 1. Always '1'. |
dac_data_q1 | Input | Raw application layer data, for Q-Channel 1. |
The register map of the core contains instances of several generic register maps like ADC common, ADC channel, DAC common, DAC channel etc. The following table presents the base addresses of each instance, after that can be found the detailed description of each generic register map. The absolute address of a register should be calculated by adding the instance base address to the registers relative address.
Address | Name | Description | |
---|---|---|---|
DWORD | BYTE | ||
0x0000 | 0x0000 | BASE | See the Base (common to all cores) table for more detail |
0x0100 | 0x0400 | DAC CHANNELS 0 | See the DAC Channel table for more detail |
0x0110 | 0x0440 | DAC CHANNELS 1 | See the DAC Channel table for more detail |
0x0120 | 0x0440 | DAC CHANNELS 2 | See the DAC Channel table for more detail |
0x0130 | 0x04c0 | DAC CHANNELS 3 | See the DAC Channel table for more detail |
Address | Bits | Name | Type | Default | Description |
---|---|---|---|---|---|
DWORD | BYTE | ||||
0x0000 | 0x0000 | REG_VERSION | Version Register | ||
[31:0] | VERSION[31:0] | RO | 0x00090062 | Version number. Unique to all cores. | |
0x0001 | 0x0004 | REG_ID | ID Register | ||
[31:0] | ID[31:0] | RO | 0x00000000 | Instance identifier number. | |
0x0002 | 0x0008 | REG_SCRATCH | Scratch Register | ||
[31:0] | SCRATCH[31:0] | RW | 0x00000000 | Scratch register. | |
0x0003 | 0x000c | REG_CONFIG | Configuration Registers | ||
[31:0] | CONFIG | RO | 0x00000000 | Configuration of the IP instance) | |
0x0004 | 0x0010 | REG_PPS_IRQ_MASK | PPS Interrupt mask | ||
[0] | PPS_IRQ_MASK | RW | 0x1 | Mask bit for the 1PPS receiver interrupt | |
0x0010 | 0x0040 | REG_RSTN | DAC Interface Control & Status | ||
[2] | CE_N | RW | 0x0 | Clock enable, default is enabled(0x0). An inverse version of the signal is exported out of the module to control clock enables | |
[1] | MMCM_RSTN | RW | 0x0 | MMCM reset only (required for DRP access). Reset, default is IN-RESET (0x0), software must write 0x1 to bring up the core. | |
[0] | RSTN | RW | 0x0 | Reset, default is IN-RESET (0x0), software must write 0x1 to bring up the core. | |
0x0011 | 0x0044 | REG_CNTRL_1 | DAC Interface Control & Status | ||
[0] | SYNC | RW | 0x0 | Setting this bit synchronizes channels within a DAC, and across multiple instances. This bit self clears. | |
0x0012 | 0x0048 | REG_CNTRL_2 | DAC Interface Control & Status | ||
[7] | PAR_TYPE | RW | 0x0 | Select parity even (0x0) or odd (0x1). | |
[6] | PAR_ENB | RW | 0x0 | Select parity (0x1) or frame (0x0) mode. | |
[5] | R1_MODE | RW | 0x0 | Select number of RF channels 1 (0x1) or 2 (0x0). | |
[4] | DATA_FORMAT | RW | 0x0 | Select data format 2's complement (0x0) or offset binary (0x1). NOT-APPLICABLE if DAC_DP_DISABLE is set (0x1). | |
[3:0] | RESERVED[3:0] | NA | 0x00 | Reserved | |
0x0013 | 0x004c | REG_RATECNTRL | DAC Interface Control & Status | ||
[15:0] | RATE[15:0] | RW | 0x0000 | The effective dac rate (the maximum possible rate is dependent on the interface clock). The samples are generated at 1/RATE of the interface clock. | |
0x0014 | 0x0050 | REG_FRAME | DAC Interface Control & Status | ||
[0] | FRAME | RW | 0x0 | The use of frame is device specific. Usually setting this bit to 1 generates a FRAME (1 DCI clock period) pulse on the interface. This bit self clears. | |
0x0015 | 0x0054 | REG_STATUS | DAC Interface Control & Status | ||
[31:0] | CLK_FREQ[31:0] | RO | 0x00000000 | Interface clock frequency. This is relative to the processor clock and in many cases is 100MHz. The number is represented as unsigned 16.16 format. Assuming a 100MHz processor clock the minimum is 1.523kHz and maximum is 6.554THz. The actual interface clock is CLK_FREQ * CLK_RATIO (see below). Note that the actual sampling clock may not be the same as the interface clock- software must consider device specific implementation parameters to calculate the final sampling clock. | |
0x0016 | 0x0058 | REG_STATUS | DAC Interface Control & Status | ||
[31:0] | CLK_RATIO[31:0] | RO | 0x00000000 | Interface clock ratio - as a factor actual received clock. This is implementation specific and depends on any serial to parallel conversion and interface type (ddr/sdr/qdr). | |
0x0017 | 0x005c | REG_STATUS | DAC Interface Control & Status | ||
[0] | STATUS | RO | 0x0 | Interface status, if set indicates no errors. If not set, there are errors, software may try resetting the cores. | |
0x0018 | 0x0060 | REG_DAC_CLKSEL | DAC Interface Control & Status | ||
[0] | DAC_CLKSEL | RW | 0x0 | Allows changing of the clock polarity. Note: its default value is CLK_EDGE_SEL | |
0x001C | 0x0070 | REG_DRP_CNTRL | DRP Control & Status | ||
[28] | DRP_RWN | RW | 0x0 | DRP read (0x1) or write (0x0) select (does not include GTX lanes). NOT-APPLICABLE if DRP_DISABLE is set (0x1). | |
[27:16] | DRP_ADDRESS[11:0] | RW | 0x00 | DRP address, designs that contain more than one DRP accessible primitives have selects based on the most significant bits (does not include GTX lanes). NOT-APPLICABLE if DRP_DISABLE is set (0x1). | |
[15:0] | RESERVED[15:0] | RO | 0x0000 | Reserved for backwards compatibility | |
0x001D | 0x0074 | REG_DRP_STATUS | DAC Interface Control & Status | ||
[17] | DRP_LOCKED | RO | 0x0 | If set indicates the MMCM/PLL is locked | |
[16] | DRP_STATUS | RO | 0x0 | If set indicates busy (access pending). The read data may not be valid if this bit is set (does not include GTX lanes). NOT-APPLICABLE if DRP_DISABLE is set (0x1). | |
[15:0] | RESERVED[15:0] | RO | 0x0000 | Reserved for backwards compatibility | |
0x001E | 0x0078 | REG_DRP_WDATA | DAC Interface Control & Status | ||
[31:0] | DRP_WDATA[31:0] | RW | 0x00000000 | DRP write data. NOT-APPLICABLE if DRP_DISABLE is set (0x1). | |
0x001F | 0x007c | REG_DRP_RDATA | DAC Interface Control & Status | ||
[31:0] | DRP_RDATA | RO | 0x00000000 | DRP read data. NOT-APPLICABLE if DRP_DISABLE is set (0x1). | |
0x0022 | 0x0088 | REG_UI_STATUS | User Interface Status | ||
[1] | UI_OVF | RW1C | 0x0 | User Interface overflow. If set, indicates an overflow occurred during data transfer at the user interface (FIFO interface). Software must write a 0x1 to clear this register bit. | |
[0] | UI_UNF | RW1C | 0x0 | User Interface underflow. If set, indicates an underflow occurred during data transfer at the user interface (FIFO interface). Software must write a 0x1 to clear this register bit. | |
0x0028 | 0x00a0 | REG_USR_CNTRL_1 | DAC User Control & Status | ||
[7:0] | USR_CHANMAX[7:0] | RW | 0x00 | This indicates the maximum number of inputs for the channel data multiplexers. User may add different processing modules as inputs to the dac. NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
0x002E | 0x00b8 | REG_DAC_GPIO_IN | DAC GPIO inputs | ||
[31:0] | DAC_GPIO_IN[31:0] | RO | 0x00000000 | This reads auxiliary GPI pins of the DAC core | |
0x002F | 0x00bc | REG_DAC_GPIO_OUT | DAC GPIO outputs | ||
[31:0] | DAC_GPIO_OUT[31:0] | RW | 0x00000000 | This controls auxiliary GPO pins of the DAC core NOT-APPLICABLE if GPIO_DISABLE is set (0x1). | |
0x0040 | 0x0100 | UP_TIMER | Loadable Counter that counts down | ||
[31:0] | UP_TIMER[31:0] | RW | 0x00000000 |
Address | Bits | Name | Type | Default | Description |
---|---|---|---|---|---|
DWORD | BYTE | ||||
0x0000 | 0x0000 | REG_CHAN_CNTRL_1 | DAC Channel Control & Status (channel - 0) | ||
[15:0] | DDS_SCALE_1[15:0] | RW | 0x0000 | The DDS scale for tone 1. Defines the amplitude of the tone. The format is 1.1.14 fixed point (signed, integer, fractional). The DDS in general runs on 16-bits, note that if you do use both channels and set both scale to 0x4000, it is over-range. The final output is (channel_1_fullscale * scale_1) + (channel_2 * scale_2). NOT-APPLICABLE if DDS_DISABLE is set (0x1). | |
0x0001 | 0x0004 | REG_CHAN_CNTRL_2 | DAC Channel Control & Status (channel - 0) | ||
[31:16] | DDS_INIT_1[15:0] | RW | 0x0000 | The DDS phase initialization for tone 1. Defines the initial phase offset of the tone. NOT-APPLICABLE if DDS_DISABLE is set (0x1). | |
[15:0] | DDS_INCR_1[15:0] | RW | 0x0000 | Defines the resolution of the phase accumulator. Its value can be defined by INCR = (f_out * 2^16) * clkratio / f_if; where f_out is the generated output frequency, and f_if is the frequency of the digital interface, and clock_ratio is the ratio between the sampling clock and the interface clock. NOT-APPLICABLE if DDS_DISABLE is set (0x1). | |
0x0002 | 0x0008 | REG_CHAN_CNTRL_3 | DAC Channel Control & Status (channel - 0) | ||
[15:0] | DDS_SCALE_2[15:0] | RW | 0x0000 | The DDS scale for tone 1. Defines the amplitude of the tone. The format is 1.1.14 fixed point (signed, integer, fractional). The DDS in general runs on 16-bits, note that if you do use both channels and set both scale to 0x4000, it is over-range. The final output is (channel_1_fullscale * scale_1) + (channel_2 * scale_2). NOT-APPLICABLE if DDS_DISABLE is set (0x1). | |
0x0003 | 0x000c | REG_CHAN_CNTRL_4 | DAC Channel Control & Status (channel - 0) | ||
[31:16] | DDS_INIT_2[15:0] | RW | 0x0000 | The DDS phase initialization for tone 1. Defines the initial phase offset of the tone. NOT-APPLICABLE if DDS_DISABLE is set (0x1). | |
[15:0] | DDS_INCR_2[15:0] | RW | 0x0000 | Defines the resolution of the phase accumulator. Its value can be defined by INCR = (f_out * 2^16) * clkratio / f_if; where f_out is the generated output frequency, and f_if is the frequency of the digital interface, and clock_ratio is the ratio between the sampling clock and the interface clock. NOT-APPLICABLE if DDS_DISABLE is set (0x1). | |
0x0004 | 0x0010 | REG_CHAN_CNTRL_5 | DAC Channel Control & Status (channel - 0) | ||
[31:16] | DDS_PATT_2[15:0] | RW | 0x0000 | The DDS data pattern for this channel. | |
[15:0] | DDS_PATT_1[15:0] | RW | 0x0000 | The DDS data pattern for this channel. | |
0x0005 | 0x0014 | REG_CHAN_CNTRL_6 | DAC Channel Control & Status (channel - 0) | ||
[2] | IQCOR_ENB | RW | 0x0 | if set, enables IQ correction. NOT-APPLICABLE if DAC_DP_DISABLE is set (0x1). | |
[1] | DAC_LB_OWR | RW | 0x0 | If set, forces DAC_DDS_SEL to 0x8, loopback If DAC_LB_OWR and DAC_PN_OWR are both set, they are ignored | |
[0] | DAC_PN_OWR | RW | 0x0 | IF set, forces DAC_DDS_SEL to 0x09, device specific pnX If DAC_LB_OWR and DAC_PN_OWR are both set, they are ignored | |
0x0006 | 0x0018 | REG_CHAN_CNTRL_7 | DAC Channel Control & Status (channel - 0) | ||
[3:0] | DAC_DDS_SEL[3:0] | RW | 0x00 | Select internal data sources (available only if the DAC supports it). 0x00: internal tone (DDS) 0x01: pattern (SED) 0x02: input data (DMA) 0x03: 0x00 0x04: pn7 (standard O.150) 0x05: pn15 (standard O.150) 0x06: pn23 (standard O.150) 0x07: pn31 (standard O.150) 0x08: loopback data (ADC) 0x09: pnX (Device specific e.g. ad9361) | |
0x0007 | 0x001c | REG_CHAN_CNTRL_8 | DAC Channel Control & Status (channel - 0) | ||
[31:16] | IQCOR_COEFF_1[15:0] | RW | 0x0000 | IQ correction (if equipped) coefficient. If scale & offset is implemented, this is the scale value and the format is 1.1.14 (sign, integer and fractional bits). If matrix multiplication is used, this is the channel I coefficient and the format is 1.1.14 (sign, integer and fractional bits). NOT-APPLICABLE if IQCORRECTION_DISABLE is set (0x1). | |
[15:0] | IQCOR_COEFF_2[15:0] | RW | 0x0000 | IQ correction (if equipped) coefficient. If scale & offset is implemented, this is the offset value and the format is 2's complement. If matrix multiplication is used, this is the channel Q coefficient and the format is 1.1.14 (sign, integer and fractional bits). NOT-APPLICABLE if IQCORRECTION_DISABLE is set (0x1). | |
0x0008 | 0x0020 | REG_USR_CNTRL_3 | DAC Channel Control & Status (channel - 0) | ||
[25] | USR_DATATYPE_BE | RW | 0x0 | The user data type format- if set, indicates big endian (default is little endian). NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
[24] | USR_DATATYPE_SIGNED | RW | 0x0 | The user data type format- if set, indicates signed (2's complement) data (default is unsigned). NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
[23:16] | USR_DATATYPE_SHIFT[7:0] | RW | 0x00 | The user data type format- the amount of right shift for actual samples within the total number of bits. NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
[15:8] | USR_DATATYPE_TOTAL_BITS[7:0] | RW | 0x00 | The user data type format- number of total bits used for a sample. The total number of bits must be an integer multiple of 8 (byte aligned). NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
[7:0] | USR_DATATYPE_BITS[7:0] | RW | 0x00 | The user data type format- number of bits in a sample. This indicates the actual sample data bits. NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
0x0009 | 0x0024 | REG_USR_CNTRL_4 | DAC Channel Control & Status (channel - 0) | ||
[31:16] | USR_INTERPOLATION_M[15:0] | RW | 0x0000 | This holds the user interpolation M value of the channel that is currently being selected on the multiplexer above. The total interpolation factor is of the form M/N. NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
[15:0] | USR_INTERPOLATION_N[15:0] | RW | 0x0000 | This holds the user interpolation N value of the channel that is currently being selected on the multiplexer above. The total interpolation factor is of the form M/N. NOT-APPLICABLE if USERPORTS_DISABLE is set (0x1). | |
0x000A | 0x0028 | REG_USR_CNTRL_5 | DAC Channel Control & Status (channel - 0) | ||
[1:0] | DAC_IQ_MODE[1:0] | RW | 0x0 | Allows IQ swap |
The data is intended for the DAC can have multiple sources:
- DMA source Raw data can be accepted from a external block representing the Application layer.
- DDS source For each DAC channel a dual-tone can be generated by a DDS core.
- PRBS source For each DAC channel one of the following PN sequence can be selected: PN7, PN15, inverted PN7, inverted PN15
The application layer connects to the framer block when the DMA source is selected. The framer module takes sample data and maps it onto the format that the JESD204 link expects for the specified framer configuration.
The data in the application layer interface dac_ddata is expected to have the following layout:
MSB LSB
[ MmSn, ..., MmS1, MnS0, ..., M1Sn, ... M1S1, M1S0, M0Sn, ... M0S1, M0S0 ]
Where MjSi refers to the i-th sample of the j-th converter. With m being the number of converters and n the number of samples per converter per beat.
The core asserts the enable signal for each channel that is enabled by the software. The dac_ddata data bus must contain data for each channel regardless if the channels are enabled or not.
The link layer interface description can be found in the User Data Interface section of the JESD204B Link Transmit Peripheral IP.
The REG_STATUS (0x054) register CLK_FREQ field allows to determine the clock rate of the device clock (link_clk) relative to the AXI interface clock (s_axi_aclk). This can be used to verify that the device clock is running at the expected rate.
The number is represented as unsigned 16.16 format. Assuming a 100MHz processor clock this corresponds to a resolution of 1.523kHz per LSB. A raw value of 0 indicates that the link clock is currently not active.
Reduced number of octets-per-frame (F) settings. The following values are supported by the peripheral: 1, 2, 4
To ensure correct operation it is highly recommended to use the Analog Devices provided JESD204B software packages for interfacing the peripheral. Analog Devices is not able to provide support in case issues arise from using custom low-level software for interfacing the peripheral.
Analog Devices will provide limited online support for anyone using the core with Analog Devices components (ADC, DAC, Video, Audio, etc) via the EngineerZone.
Return to JESD204B Interface Framework
Return to Arrow High-Speed Converter Platforms
Information from this site was obtained from |