TITLE
Logic Analyzer and Pattern Generator (axi_logic_analyzer)
axi_logic_analyzer
ENDTITLE

############################################################################################
############################################################################################

REG
0x00
VERSION
Version of the peripheral. Follows semantic versioning. Current version 2.1.0.
ENDREG

FIELD
[31:16] 0x00000002
VERSION_MAJOR
RO
ENDFIELD

FIELD
[15:8] 0x00000001
VERSION_MINOR
RO
ENDFIELD

FIELD
[7:0] 0x00000000
VERSION_PATCH
RO
ENDFIELD

############################################################################################
############################################################################################

REG
0x0001
SCRATCH
Scratch Register
ENDREG

FIELD
[31:0]
SCRATCH
RW
Scratch register useful for debug.
ENDFIELD

############################################################################################
############################################################################################

REG
0x0002
DIVIDER_COUNTER_LA
Downsampling Counter
ENDREG

FIELD
[31:0]
DIVIDER_COUNTER
RW
Register used for down sampling the logic analyzer data. Sample data every
(divider_counter + 1) samples
ENDFIELD


############################################################################################
############################################################################################

REG
0x0003
DIVIDER_COUNTER_PG
Upsampling Counter
ENDREG

FIELD
[31:0]
DIVIDER_COUNTER
RW
Register used for upsampling pattern generator data. Sample data every
(divider counter + 1) samples
ENDFIELD


############################################################################################
############################################################################################

REG
0x0004
IO_SELECTION
Data Pins Direction
ENDREG

FIELD
[15:0]
DIRECTION
RW
Selects which pins are inputs(1) and which are outputs (0). Each bit configures
the corresponding pin
ENDFIELD

############################################################################################
############################################################################################

REG
0x0005
EDGE_DETECT_CONTROL
Any Edge Triggering
ENDREG

FIELD
[17:16]
TRIGGER
RW
Enables any edge detection triggering based on the trigger pins
ENDFIELD

FIELD
[15:0]
DATA
RW
Enables any edge detection triggering based on the data pins
ENDFIELD

############################################################################################
############################################################################################

REG
0x0006
RISE_EDGE_CONTROL
Rise Edge Triggering
ENDREG

FIELD
[17:16]
TRIGGER
RW
Enables rise edge detection triggering based on the trigger pins
ENDFIELD

FIELD
[15:0]
DATA
RW
Enables rise edge detection triggering based on the data pins
ENDFIELD

############################################################################################
############################################################################################

REG
0x0007
FALL_EDGE_CONTROL
Fall Edge Triggering
ENDREG

FIELD
[17:16]
TRIGGER
RW
Enables fall edge detection triggering based on the trigger pins
ENDFIELD

FIELD
[15:0]
DATA
RW
Enables fall edge detection triggering based on the data pins
ENDFIELD

############################################################################################
############################################################################################

REG
0x0008
LOW_LEVEL_CONTROL
Low Level Triggering
ENDREG

FIELD
[17:16]
TRIGGER
RW
Enables low level triggering based on the trigger pins
ENDFIELD

FIELD
[15:0]
DATA
RW
Enables low level triggering based on the data pins
ENDFIELD

############################################################################################
############################################################################################

REG
0x0009
HIGH_LEVEL_CONTROL
High Level Triggering
ENDREG

FIELD
[17:16]
TRIGGER
RW
Enables high level triggering based on the trigger pins
ENDFIELD

FIELD
[15:0]
DATA
RW
Enables high level triggering based on the data pins
ENDFIELD


############################################################################################
############################################################################################

REG
0x000A
FIFO_DEPTH
Controls the Dynamic Depth of the History FIFO
ENDREG

FIELD
[31:0]
FIFO_DEPTH
RW
Controls the depth of the history FIFO. Should be less than the maximum FIFO depth.
If set to 0, the FIFO is bypassed and reset
ENDFIELD

############################################################################################
############################################################################################

REG
0x000B
TRIGGER_LOGIC
Trigger Mix
ENDREG

FIELD
[6:4]
TRIGGER_MUX_OUT
RW
Final Trigger Selection Multiplexer
Selects triggers:

* 0: TRIGGER_LOGIC
* 1: TRIGGER_ADC
* 2: TRIGGER_LOGIC AND TRIGGER_ADC
* 3: TRIGGER_LOGIC OR  TRIGGER_ADC
* 4: TRIGGER_LOGIC XOR TRIGGER_ADC
* 7: TRIGGER DISABLED

ENDFIELD

FIELD
[0]
TRIGGER_LOGIC
RW
Combines the enable triggers through an OR (0) or an AND (1) gate
ENDFIELD

############################################################################################
############################################################################################

REG
0x000C
CLOCK_SELECT
Clock Selection Multiplexer
ENDREG

FIELD
[0]
CLOCK_SELECT
RW
Selects between clk(0) and data[0] (1) as clock for the logic analyzer and pattern generator
paths
ENDFIELD

############################################################################################
############################################################################################

REG
0x000D
OVERWRITE_MASK
Overwrite data_o Value
ENDREG

FIELD
[15:0]
OVERWRITE_MASK
RW
If set to 1, the specific data_o pin will be driven by the value written in the
OVERWRITE_DATA register, instead of the DMA
ENDFIELD

############################################################################################
############################################################################################

REG
0x000E
OVERWRITE_DATA
Overwrite Value for data_o
ENDREG

FIELD
[15:0]
OVERWRITE_DATA
RW
Overwrite value to drive data_o directly, when the mask is applied
ENDFIELD

############################################################################################
############################################################################################

REG
0x000F
INPUT_DATA
Read the Value on data_i Bus
ENDREG

FIELD
[15:0]
INPUT_DATA
RO
The value of the input data, synchronized
ENDFIELD

############################################################################################
############################################################################################

REG
0x0010
OUTPUT_MODE
Controls Output Type
ENDREG

FIELD
[0]
OUTPUT_MODE
RW
Data output is in push-pull (0) or open-drain(1) mode
ENDFIELD

############################################################################################
############################################################################################

REG
0x0011
TRIGGER_DELAY
Control the Trigger Delay
ENDREG

FIELD
[31:0]
TRIGGER_DELAY
RW
Delays the start of data capture with TRIGGER_DELAY number of samples after the trigger
ENDFIELD

############################################################################################
############################################################################################

REG
0x0012
TRIGGERED
Indicates Triggering Status
ENDREG

FIELD
[0]
TRIGGERED
RW1C
Indicates if the trigger has been triggered since the last time this register has been reset.
ENDFIELD

############################################################################################
############################################################################################

REG
0x0013
STREAMING
Controls Streaming Mode
ENDREG

FIELD
[0]
STREAMING
RW
If the streaming bit is set, after the trigger condition is met data will be continuosly
captured by the DMA. The streaming bit must be set to 0 to reset triggering.

ENDFIELD

############################################################################################
############################################################################################

REG
0x0014
TRIGGER_HOLDOFF
Controls the Trigger hold off time
ENDREG

FIELD
[31:0]
TRIGGER_HOLDOFF
RW
Defines the time interval, after a trigger event, where the next trigger events
will be ignored, until the end of the interval. The time interval is set by counter.
Down-counting on the ADC clock(100MHz)/or external clock, if configured.
The value written in the register is loaded in the counter at a trigger event
ENDFIELD

############################################################################################
############################################################################################

REG
0x0015
PG_TRIGGER_CONFIG
Pattern generator trigger configuration
ENDREG

FIELD
[19]
EN_TRIGGER_LA
RW
Enable trigger from Logic Analyzer
ENDFIELD

FIELD
[18]
EN_TRIGGER_ADC
RW
Enable trigger from ADC
ENDFIELD

FIELD
[17]
EN_TRIGGER_TO
RW
Enable trigger from To
ENDFIELD

FIELD
[16]
EN_TRIGGER_TI
RW
Enable trigger from Ti
ENDFIELD

FIELD
[9:8]
HIGH_LEVEL
RW
High level triggering for TRIGGER[0](Ti) or TRIGGER[1](To) pin
ENDFIELD

FIELD
[7:6]
LOW_LEVEL
RW
Low level triggering for TRIGGER[0](Ti) or TRIGGER[1](To) pin
ENDFIELD

FIELD
[5:4]
FALL_EDGE
RW
Falling edge triggering for TRIGGER[0](Ti) or TRIGGER[1](To) pin
ENDFIELD

FIELD
[3:2]
RISE_EDGE
RW
Rising edge triggering for TRIGGER[0](Ti) or TRIGGER[1](To) pin
ENDFIELD

FIELD
[1:0]
ANY_EDGE
RW
Any edge triggering for TRIGGER[0](Ti) or TRIGGER[1](To) pin
ENDFIELD

############################################################################################
############################################################################################

REG
0x0014
DATA_DELAY_CONTROL
Controls the synchronization to ADC data
ENDREG

FIELD
[9]
MASTER_DELAY_CTRL
RW
Select if the number of delay taps is chosen by the user(=1) or automatically(=0).
Default is 0 or automatically
ENDFIELD

FIELD
[8]
RATE_GEN_SELECT
RW
Selects if the rate is generated by the logic analyzer(0) or it comes from the ADC(1).
Default is 0 or logic analyzer
ENDFIELD

FIELD
[5:0]
MANUAL_DATA_DELAY
RW
If MASTER_DELAY_CTRL is set to user delay, the data will be delayed with
a number of samples specified it the MANUAL_DATA_DELAY field
ENDFIELD

############################################################################################
############################################################################################
