JAJSEU6A February 2018 – June 2018 OPT3101
PRODUCTION DATA.
AFE has an on-chip sequencer which can be used to perform various operations. The sequencer commands are tabulated in Table 19. Each instruction is 12 bits with the first four MSB bits as the opcode and next eight bit as operand. The sequencer can perform a comparison of amplitude or phase with register thresholds COMPARE_REG1, COMPARE_REG2 and generate a signal COMP_STATUS, which can be observed on GP1 with the DIG_GPO_SEL0 = 8 and gpo1_mux_sel = 2 settings. The comparison input type can be selected using COMP_IN_SEL. The sequencer executes one command per sample. The sequencer interrupt to execute a command can be positioned either at the beginning of the sample or at the end of the sample after data is ready and before the next sample starts. The sequencer interrupt can be programmed with the TG_SEQ_INT_START, TG_SEQ_INT_END, TG_SEQ_INT_MASK_START, and TG_SEQ_INT_MASK_END registers. TG_SEQ_INT_START and TG_SEQ_INT_END define the position of the interrupt pulse within a sub-frame. TG_SEQ_INT_MASK_START and TG_SEQ_INT_MASK_END define the sub-frame during which the pulse is enabled.
Some of the use cases of the sequencer are:
OPCODE | FUNCTION | DESCRIPTION |
---|---|---|
0000 | NOP | The operand indicates the number of cycles for which NOP should be executed. 0 means 1 cycle, 1 means 2 cycle, and so on. For example 0000-0000 1111 indicates that for the next 16 cycles the sequencer does not do anything. |
0001 | WRITE | This command writes the operand to the STATUS_OUT register. For example 0001-0110 0110 makes the value on the STATUS_OUT port 0110 01100. The STATUS_OUT port is mapped to certain key registers listed in Table 20. STATUS_OUT values override the register values only if EN_PROCESSOR_VALUES = 1. |
0010 | GOTO | Program counter (PC) goes to the line indicated by the operand. This command is useful for looping. The next command is executed on the next sequencer interrupt. For example, 0010-0000 0000 sets the PC to the first line of the program memory so that the instructions are executed in a loop. |
0011 | DGOTO | In this command, the PC goes to the line indicated by the operand only if STATUS_IN_REG bit is 1. If not, the PC stays in the same command until the STATUS_IN_REG register value becomes 1. The next command is executed on the next frame VD. For example, 0011-0000 0000 suspends the program until the STATUS_IN_REG bit is set to 1. Once it is set, the loop is restarted. |
0100 | DrGOTO | In this instruction, the PC goes to the line indicated by operand without any delay. This executes next instruction as well. The next command is executed on the same frame VD. |
0101 | COMP0 | In this command, the CPU compares COMP_IN and COMPARE_REG1. If COMP_IN ≤ COMPARE_REG1, the program counter stays where it is and the COMP_STATUS port is 0. If the comparison fails, the program counter moves to the line indicated by the operand, and COMP_STATUS becomes 1. |
0110 | COMP0_INV | Similar to COMP but the comparison used is: COMP_IN ≥ COMPARE_REG2 |
0111 | COMP_WINDOW | In this command, the PC stays at the same command forever. If (COMP_IN ≥ COMPARE_REG1) and (COMP_IN ≤ COMPARE_REG2) then COMP_STATUS becomes 1 else COMP_STATUS = 0. |
1000 | COMP2 | If (COMP_IN ≥ COMPARE_REG1) and (COMP_IN ≤ COMPARE_REG2) then COMP_STATUS becomes 1 else COMP_STATUS = 0. If the condition is TRUE the program counter stays at the same command else moves to the line indicated by the operand. |
1001 | COMP3 | Similar to COMP2. The difference is that regardless of the comparison result, the program counter moves to the instruction pointed to by the operand. If comparison is met, COMP_STATUS is set to 1, else to 0. |
1010 | COMP_HYST | In this command, the PC stays at the same command forever. There is hysteresis in the comparison. If (COMP_IN ≤ COMPARE_REG1) then COMP_STATUS = 0, elsif (COMP_IN ≥ COMPARE_REG2) then COMP_STATUS = 1. |
1011 | COMP1 | In this command, the CPU compares COMP_IN and COMPARE_REG1. If COMP_IN ≤ COMPARE_REG1, the program counter stays where it is and the COMP_STATUS port is 0. If the comparison fails the program counter moves to the line indicated by the operand and COMP_STATUS becomes 1. Executes this command and moves to next command at the same interrupt. |
1100 | COMP1_INV | Similar to COMP1 but the comparison used is COMP_IN ≥ COMPARE_REG2. Sequencer executes the command and moves to next command at the same interrupt. |
1101–1111 | Not valid |
STATUS_OUT | REGISTER MAPPING |
---|---|
[0] | INT_XTALK_CALIB |
[1] | EN_DEALIAS_MEAS |
[2] | START_FREQ_CALIB |
[4:3] | SEL_TX_CH |
[5] | SEL_HDR_MODE |
[7:6] | Invalid |
REGISTER | ADDRESS | DESCRIPTION |
---|---|---|
COMP_IN_SEL | 13h[2:0] | Select the value used for comp_in.
0: AMP_OUT | 1: DEALIAS_BIN | 2: Phase output in de-alias mode | 3: PHASE_OUT |
COMPARE_REG1 | 13h[18:3] | Sequencer comparison threshold1 |
COMPARE_REG2 | 14h[15:0] | Sequencer comparison threshold2 |
EN_SEQUENCER | 14h[16] | Enable the sequencer. |
EN_PROCESSOR_VALUES | 14h[17] | Uses processor values instead of register values. |
STATUS_IN_REG | 14h[18] | The register is used to control the program flow in CPU |
DIS_INTERRUPT | 14h[19] | Disables the interrupt which triggers the sequencer. |
COMMAND0 to COMMAND19 | 15h[11:0] to 1Eh[23:12] | Sequencer command registers. A total of 20 command registers are available. |