SPRUHM8K December 2013 – May 2024 TMS320F28374D , TMS320F28375D , TMS320F28376D , TMS320F28377D , TMS320F28377D-EP , TMS320F28377D-Q1 , TMS320F28378D , TMS320F28379D , TMS320F28379D-Q1
The instruction memory supports up to eight instructions per event. Each instruction sequence gets triggered on the rising edge of the corresponding event.
The HLC memory supports up to eight instructions per event, starting at the beginning of the fixed address range shown in Table 26-9. An instruction sequence is triggered on the rising edge of the corresponding event. If two or more events occur simultaneously, the associated instruction sequences each are executed sequentially in priority order.
Address | Instructions for |
---|---|
00000 to 00111 | Event 0 |
01000 to 01111 | Event 1 |
10000 to 10111 | Event 2 |
11000 to 11111 | Event 3 |
The HLC instruction format is shown in Table 26-10.
Last Instruction Bit | 5-Bit Opcode | 3-Bit Source | 3-Bit Destination |
---|---|---|---|
This bit when set to 1 stops execution after the current instruction. | MOV 00000 MOV_T1 00001 MOV_T2 00010 PUSH 00011 PULL 00100 ADD 00101 SUB 00110 INTR 00111 | Source can be R0, R1, R2, R3, C0, C1, C2. | Destination can be R0, R1, R2, R3, C0, C1, C2. |
Note that for ADD/SUB instructions, only R0, R1, R2, or R3 can be the destination. |
R0, R1, R2, and R3 are four 32-bit general-purpose registers in the HLC. C0, C1, and C2 are three counter registers present in the CLB tile. <Src> is used to indicate the source and <Dest> is used to indicate the destination. Table 26-11 describes the HLC instructions.
Instruction | Description |
---|---|
ADD <Src>, <Dest> | This instruction performs an unsigned 32-bit addition. <Dest> = <Dest> + <Src>. The <Src> can be R0, R1, R2, R3, C0, C1, or C2. The <Dest> can only be R0, R1, R2, or R3. |
INTR <6-bit constant> | This instruction flags an interrupt through the CPU interface. The 6-bit constant is stored in the interrupt flag register CLB_INTR_TAG_REG. If multiple INTR instructions are called consecutively, only the first one has an effect. When multiple INTR calls are needed, each can be separated by other HLC instructions to make sure the interrupt calls take effect. |
MOV <Src>, <Dest> | This instruction moves <Src> to <Dest>. Both <Src> and <Dest> can be any of R0, R1, R2, R3, C0, C1, or C2. The COUNT_EVENT_CTRL_x bit must be configured to load (that is, 0) for indirect loads and HLC loads of the counter to take effect. |
MOV_T1 <Src>, <Dest> | This instruction moves <Src> to the Match1 register of the <Dest> counter. <Src> can be any of the registers R0, R1, R2, R3, or the counter values associated with C0, C1, or C2. <Dest> is the Match1 register of any of the counters C0, C1, or C2. Examples are:
|
MOV_T2 <Src>, <Dest> | This instruction is similar to MOV_T1. The instruction moves <Src> to the Match2 register of the <Dest> counter. <Src> can be any of the registers R0, R1, R2, R3, or the counter values associated with C0, C1, or C2. <Dest> is the Match2 register of any of the counters C0, C1, or C2. |
PULL <Dest> | This instruction transfers data from the data exchange pull memory buffer in the CPU
interface to the <Dest> register. <Dest> can be any of
R0, R1, R2, or R3. The PULL instruction is used as seen from the
High Level Controller and a PULL operation reads (pulls) data from
an internal 4-word FIFO. Note: Back-to-back
PUSH/PULL instructions cannot be used, if using more than one
HLC EVENT channel. |
PUSH <Src> | This instruction transfers data from <Src> to the data exchange push memory buffer in the CPU interface. <Src> can be any of R0, R1, R2, R3, C0, C1, or C2. The PUSH instruction is used as seen from the High Level Controller and pushes data into an internal 4 word FIFO. |
SUB <Src>, <Dest> | This instruction performs an unsigned 32-bit subtraction. <Dest> = <Dest> - <Src>. The <Src> can be R0, R1, R2, R3, C0, C1, or C2. The <Dest> can only be R0, R1, R2, or R3. |
MOV, MOV_T1, MOV_T2, ADD, SUB, and INTR instructions take one cycle to execute. PUSH and PULL require two cycles to execute. Note that the PUSH and PULL instructions are pipeline protected, meaning that a register can be used immediately after a PUSH/PULL to that register.
For multiple events triggered simultaneously, if the last instruction in the higher priority event is a PUSH or a PULL, there is an additional cycle delay between the end of the higher priority event and the start of the next event. If the last instruction is not a PUSH or PULL, then there is no cycle delay between the events.
If there is the possibility of more than one event coming into the HLC, then PUSH/PULL instructions must not be placed back-to-back. It is necessary to re-order the HLC instructions such that every PUSH and PULL is followed by a non-PUSH/PULL instruction. If only one event can enter the HLC at any time, then back-to-back PUSH/PULL is not an issue.