The channel UNPACK utility core (util_upack) is meant to allow one or more channels to be enabled by software without any padding. This allows full usage of the DMA bandwidth without any overhead. This core is normally works with the DAC and DMA modules. The DAC interface is channel based (one interface per each DAC channel) and consists of enable, valid and data signals. The DMA interface is a single FIFO interface consisting of valid and data signals. The enable signals are usually controlled by software. The core simply unpacks the DMA data into the individual channels as defined by the enables.
The core 'collects' samples from the DMA interface (or any other source) and passes it to the DAC on every valid request from the DAC. This is best explained through some examples. Let's consider a 4 channel DAC with a channel data width of 32 bits. That is, the DAC requires two 16-bit samples be present at its input for all channels when the valid is asserted. The DMA interface in this case is an interleaved 8 samples (128 bits) stream. This is because irrespective of the DAC channel data width, the software always sees data as 'samples interleaved'. The same data set may drive a DAC core with a channel width of 128 bits or 16 bits.
This data unpacking now needs to factor in the valid and the number of samples that are to be read from the DMA. It is quite simple a valid at the DAC interface translates into a data required count based on the number of enables. So if three channels are enabled the requirement is 6 samples, so the core initiates a read from the DMA three out of four clock cycles.
| ||Data width of a channel||32|
| ||Number of channels, max value is 8||8|
| ||input||DAC interface clock (core clock). The module runs on this clock.|
|FIFO interface to the source|
| ||output||DAC valid, request the next valid data from the source|
| ||input[((NUM_OF_CHANNELS*CHANNEL_DATA_WIDTH)-1):0]||DAC data bus from the source|
| ||output||DAC sync signal to the DMA (optional)|
|FIFO interface to the DAC|
| ||input||Indicates the status of the channel, if asserted the channel is active|
| ||input||Validates the data on the dac_data_* bus|
| ||output[(CHANNEL_DATA_WIDTH-1):0]||DAC data bus to the DAC core (sink)|
| ||output||Delayed valid signal, using this control signal, the initial transient state of the module will be filtered out|
| ||input||XFER_REQ from DMA, indicates an active DMA transfer|
| ||output||XFER_REQ to DAC, forwarded xfer request|