You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This is a short specification to help the firmware developer to integrate the DaqMux in his firmware.

Overview

The DaqMux was originally developed as an oscilloscope to transmit streams from the FPGA to software for debugging purposes. Then it started being used as a data streamer by the application to software, and it's configurations were exported to EPICS/software. 

Feature summary

The DaqMux can perform the following functionalities

  • Multiplex up to 4 streams (lanes) and send forward (to software)
  • Stream packets can be acquired continuously every time a trigger arrives in continuous mode, or only once upon trigger with or without header (meta data) in trigger mode, or many times with or without header (meta data) in trigger mode when auto re-arm is enabled
  • Possibility of cascading trigger of DaqMux blocks in case streams from several DaqMuxes acquired at the same instant is required
  • Pause streaming by not overwriting buffers (freeze functionality), therefore nothing is forwarded to software
  • Down sampling and averaging


Definitions

  • Stream : a group of bytes transmitted in sequence.
  • Lane : a physical bus at which the stream crosses 
  • Packet : User abstraction. Bunches of bytes that the user wants forward to software from each lane every time there is a trigger
  • AXI transaction : Hardware abstraction. Packets are broken into a 1 or more AXI transactions

Applications

Figure 1 shows the DaqMux instantiated in the Common platform firmware in the application side. 

Figure 1: Common platform firmware top-level

Generics & IO description

Table 1: DaqMux generics list and description

Generic namedefault valueDescription
TPD_G1Simulation variable; register clock to output delay in nanoseconds
DECIMATOR_EN_GTrueDecimator enable
WAVEFORM_TDATA_BYTES_G4Output lane width in bytes
FRAME_BWIDTH_G 10Power of two, which defines AXI stream transaction size in words (4 bytes)(i.e. when FRAME_BWIDTH_G = 12 → 210 x 4 = 4096 bytes)
BAY_INDEX_G-Index of the DaqMux
N_DATA_IN_G16Number of input data lanes
N_DATA_OUT_G4Number of output data lanes


Table 2: IO port list and description

NameDirectionClock domainWidthDescription
Clock logic
axiClk Input-1AXI Lite clock
axiRst InputaxiClk1AXI Lite reset
devClk_i Input-1Development clock
devRst_i InputSynced to devClk_i in DaqMux (for some reason)1Development logic reset
wfClk_i Input-
Ouput lanes' clock
wfRst_i InputwfClk_i
Output lanes' reset
DaqMux control signals and timing information
trigHw_i InputSynced to devClk_i in DaqMux1

Trigger signal to start the DaqMux streaming

  • 0 indicates no trigger event
  • 1 indicates a trigger event
trigCasc_i InputSynced to devClk_i in DaqMux1

Cascaded trigger input. Can be used along with trigHw_i when enabled in the register file

  • 0 indicates no trigger event
  • 1 indicates a trigger event
trigCasc_o OutputdevClk_i1

Output trigger signal connected to the SW Trigger Enable control register

  • 0 indicates no trigger event
  • 1 indicates a trigger event
armCasc_i InputSynced to devClk_i in DaqMux1

Cascaded trigger Arm. Arms the trigger and prepares DaqMux for trigger arrival

  • 0 indicates no arm
  • 1 indicates armed
armCasc_o Output-1

Output cascade signal connected to the Arm HW Trigger control register

  • 0 indicates no arm
  • 1 indicates armed
freezeHw_i InputSynced to devClk_i in DaqMux1

Adds invalid flag to the streams that are forwarded, and they will be discarded in one of the posterior blocks in the pipeline

  • 0 indicates valid (not freeze)
  • 1 indicates invalid (freeze)
timeStamp_i InputSynced to devClk_i in DaqMux64Time stamp coming from the AMC carrier core
bsa_i InputSynced to devClk_i in DaqMux128BSA information coming from the AMC carrier core
dmod_i InputSynced to devClk_i in DaqMux192Dmod timing information coming from the AMC carrier core

AXI Lite register memory mapped interface for reading and writing to register file

axilReadMaster InputaxiClk1

AXI Lite record containing

Read Address channel

  • araddr  : slv(31 downto 0);
  • arprot  : slv(2 downto 0);
  • arvalid : sl;

Read data channel

  • rready  : sl;
axilReadSlave OutputaxiClk1

AXI Lite record containing

 Read Address channel

  • arready : sl;

Read data channel

  • rdata   : slv(31 downto 0);
  • rresp   : slv(1 downto 0);
  • rvalid  : sl;
axilWriteMaster InputaxiClk1

AXI Lite record containing

Write address channel

  • awaddr  : slv(31 downto 0);
  • awprot  : slv(2 downto 0);
  • awvalid : sl;

Write data channel

  • wdata   : slv(31 downto 0);
  • wstrb   : slv(3 downto 0);
  • wvalid  : sl;

Write ack channel

  • bready  : sl;
axilWriteSlave OutputaxiClk1

AXI Lite record containing

Write address channel

  • awready : sl;

Write data channel

  • wready  : sl;

Write ack channel

  • bresp   : slv(1 downto 0);
  • bvalid  : sl;
Input lane array - data valid based
sampleDataArr_i InputdevClk_iN_DATA_IN_GInput data stream array of 32-bit words
sampleValidVec_i InputdevClk_iN_DATA_IN_GInput valids with each valid corresponding to the respective stream in that cycle
linkReadyVec_i InputdevClk_iN_DATA_IN_GIndicate that the stream source is ready. If is 0, the DaqMux sets the Stream Error control register to 1
Output lane array
rxAxisMasterArr_o OutputwfClk_iN_DATA_OUT_G

AXI compliant output data stream array of 32-bit words. Nonetheless, the type of rxAxisMasterArr_o is defined as follows in the AxiStreamPkg.vhd file

  • tValid : sl;
  • tData  : slv(511 downto 0);
  • tStrb  : slv(63 downto 0);
  • tKeep  : slv(63 downto 0);
  • tLast  : sl;
  • tDest  : slv(7 downto 0);
  • tId    : slv(7 downto 0);
  • tUser  : slv(63 downto 0);
rxAxisSlaveArr_i InputwfClk_iN_DATA_OUT_GAXI streams data ready signals
rxAxisCtrlArr_iInputwfClk_iN_DATA_OUT_G

AXI stream control signals as follows

  • pause    : sl;
  • overflow : sl;
  • idle     : sl;

If pause is 1, the DaqMux will not start and error is set.



Functional description & block diagrams



Register address mappings and description

Clocking/performance requirements

Connectivity

  • No labels