DOCA0275EN-00

Register Logic Commands

Overview

Register commands evaluate and control 16-bit values.

The custom logic editor uses the following register commands:

  • LOAD_K_REG

  • LOAD_REG

  • LOAD_TMP_REG

  • LOAD_NV_REG

  • COMP_K_REG

  • COMP_REG

  • COMP_TMP_REG

  • COMP_NV_REG

  • AND_K

  • AND_REG

  • AND_TMP_REG

  • AND_NV_REG

  • OR_K

  • OR_REG

  • OR_TMP_REG

  • OR_NV_REG

  • XOR_K

  • XOR_REG

  • XOR_TMP_REG

  • XOR_NV_REG

  • ON_SET_REG

  • ON_SET_TMP_REG

  • ON_SET_NV_REG

LOAD_K_REG

The LOAD_K_REG command loads a 16-bit constant value into the 16-bit accumulator in logic memory.

Arguments

Representation

1

LOAD_K_REG KValue

Input arguments

Type

Range

Description

KValue

UINT

0–65,535

A constant value

No output arguments.

LOAD_REG

The LOAD_REG command loads a copy of a register into the 16-bit accumulator in logic memory.

Arguments

Representation

1

LOAD_REG RegAddr

Input arguments

Type

Range

Description

RegAddr

UINT

0–9249

The register address

No output arguments.

LOAD_TMP_REG

The LOAD_TMP_REG command loads a copy of a temporary register into the 16-bit accumulator in logic memory.

Arguments

Representation

1

LOAD_TMP_REG TmpReg

Input arguments

Type

Range

Description

TmpReg

UINT

0–299

The temporary register number

No output arguments.

LOAD_NV_REG

The LOAD_NV_REG command loads a copy of a non-volatile register into the 16-bit accumulator in logic memory.

Arguments

Representation

1

LOAD_NV_REG NVReg

Input arguments

Type

Range

Description

NVReg

UINT

0–63

The non-volatile register number

No output arguments.

COMP_K_REG

The COMP_K_REG command compares the 16-bit accumulator content to the Argument 1 constant value and sets the result of the comparison in one bit of the Argument 2 temporary register.

Arguments

Representation

2

COMP_K_REG KValue TmpReg

Input arguments

Type

Range/Bit

Description

KValue

UINT

0–65,535

A constant value

Output arguments

Type

Range/Bit

Description

TmpReg

UINT

Bit1

16-bit accumulator < KValue

Bit2

16-bit accumulator = KValue

Bit3

16-bit accumulator > KValue

COMP_REG

The COMP_REG command compares the 16-bit accumulator content to the content of the register defined by Argument 1 and sets the result of the comparison in one bit of the Argument 2 temporary register.

Arguments

Representation

2

COMP_REG RegAddr TmpReg

Input arguments

Type

Range/Bit

Description

RegAddr

UINT

0–9249

The register address

Output arguments

Type

Range/Bit

Description

TmpReg

UINT

Bit1

16-bit accumulator < RegAddr

Bit2

16-bit accumulator = RegAddr

Bit3

16-bit accumulator > RegAddr

COMP_TMP_REG

The COMP_TMP_REG command compares the 16-bit accumulator content to the content of the temporary register defined by Argument 1 and sets the result of the comparison in one bit of the Argument 2 temporary register.

Arguments

Representation

2

COMP_TMP_REG TmpReg1 TmpReg2

Input arguments

Type

Range/Bit

Description

TmpReg1

UINT

0–299

Temporary register number

Output arguments

Type

Range/Bit

Description

TmpReg2

UINT

Bit1

16-bit accumulator < TmpReg1

Bit2

16-bit accumulator = TmpReg1

Bit3

16-bit accumulator > TmpReg1

COMP_NV_REG

The COMP_NV_REG command compares the 16-bit accumulator content to the content of the non-volatile register defined by Argument 1 and sets the result of the comparison in one bit of the Argument 2 temporary register.

Arguments

Representation

2

COMP_NV_REG NVReg TmpReg

Input arguments

Type

Range/Bit

Description

NVReg

UINT

0–63

Non-volatile register number

Output arguments

Type

Range/Bit

Description

TmpReg

UINT

Bit1

16-bit accumulator < NVReg

Bit2

16-bit accumulator = NVReg

Bit3

16-bit accumulator > NVReg

AND_K

The AND_K command makes a logical AND link between a 16-bit constant value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The AND process compares each bit in the 16-bit accumulator with the corresponding bit in the linked 16-bit constant value:

  • If both bits equal 1, the result of the AND process for that bit number is also 1.

  • In all other cases the result of the AND process for that bit number is 0.

Arguments

Representation

1

AND_K KValue

Input arguments

Type

Range

Description

KValue

UINT

0–65,535

A constant value

No output arguments.

AND_REG

The AND_REG command makes a logical AND link between the register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The AND process compares each bit in the 16-bit accumulator with the corresponding bit in the linked register:

  • If both bits equal 1, the result of the AND process for that bit number is also 1.

  • In all other cases the result of the AND process for that bit number is 0.

Arguments

Representation

1

AND_REG RegAddr

Input arguments

Type

Range

Description

RegAddr

UINT

0–9249

The register address

No output arguments.

AND_TMP_REG

The AND_TMP_REG command makes a logical AND link between the temporary register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The AND process compares each bit in the 16-bit accumulator with the corresponding bit in the linked temporary register:

  • If both bits equal 1, the result of the AND process for that bit number is also 1.

  • In all other cases the result of the AND process for that bit number is 0.

Arguments

Representation

1

AND_TMP_REG TmpReg

Input arguments

Type

Range

Description

TmpReg

UINT

0–299

The temporary register number

No output arguments.

AND_NV_REG

The AND_NV_REG command makes a logical AND link between the non-volatile register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The AND process compares each bit in the 16-bit accumulator with the corresponding bit in the linked non-volatile register:

  • If both bits equal 1, the result of the AND process for that bit number is also 1.

  • In all other cases the result of the AND process for that bit number is 0.

Arguments

Representation

1

AND_NV_REG NVReg

Input arguments

Type

Range

Description

NVReg

UINT

0–63

The non-volatile register number

No output arguments.

OR_K

The OR_K command makes a logical OR link between a 16-bit constant value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The OR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked 16-bit constant value:

  • If any compared bit equals 1, the result of the OR process for that bit number is also 1.

  • If all compared bits equal 0, the result of the OR process for that bit number is 0.

Arguments

Representation

1

OR_K KValue

Input arguments

Type

Range

Description

KValue

UINT

0–65,535

A constant value

No output arguments.

OR_REG

The OR_REG command makes a logical OR link between the register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The OR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked register:

  • If any compared bit equals 1, the result of the OR process for that bit number is also 1.

  • If all compared bits equal 0, the result of the OR process for that bit number is 0.

Arguments

Representation

1

OR_REG RegAddr

Input arguments

Type

Range

Description

RegAddr

UINT

0–9249

The register address

No output arguments.

OR_TMP_REG

The OR_TMP_REG command makes a logical OR link between the temporary register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The OR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked temporary register:

  • If any compared bit equals 1, the result of the OR process for that bit number is also 1.

  • If all compared bits equal 0, the result of the OR process for that bit number is 0.

Arguments

Representation

1

OR_TMP_REG TmpReg

Input arguments

Type

Range

Description

TmpReg

UINT

0–299

The temporary register number

No output arguments.

OR_NV_REG

The OR_NV_REG command makes a logical OR link between the non-volatile register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The OR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked non-volatile register:

  • If any compared bit equals 1, the result of the OR process for that bit number is also 1.

  • If all compared bits equal 0, the result of the OR process for that bit number is 0.

Arguments

Representation

1

OR_NV_REG NVReg

Input arguments

Type

Range

Description

NVReg

UINT

0–63

The non-volatile register number

No output arguments.

XOR_K

The XOR_K command makes a logical exclusive OR link between a 16-bit constant value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The XOR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked 16-bit constant value and yields these results:

  • If one bit equals 1 and the other equals 0, the result of the XOR process is 1.

  • In all other cases, the result of the XOR process is 0.

Arguments

Representation

1

XOR_K KValue

Input arguments

Type

Range

Description

KValue

UINT

0–65,535

A constant value

No output arguments.

XOR_REG

The XOR_REG command makes a logical exclusive OR link between the register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The XOR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked register and yields these results:

  • If one bit equals 1 and the other equals 0, the result of the XOR process is 1.

  • In all other cases, the result of the XOR process is 0.

Arguments

Representation

1

XOR_REG RegAddr

Input arguments

Type

Range

Description

RegAddr

UINT

0–9249

The register address

No output arguments.

XOR_TMP_REG

The XOR_TMP_REG command makes a logical exclusive OR link between the temporary register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The XOR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked temporary register and yields these results:

  • If one bit equals 1 and the other equals 0, the result of the XOR process is 1.

  • In all other cases, the result of the XOR process is 0.

Arguments

Representation

1

XOR_TMP_REG TmpReg

Input arguments

Type

Range

Description

TmpReg

UINT

0–299

The temporary register number

No output arguments.

XOR_NV_REG

The XOR_NV_REG command makes a logical exclusive OR link between the non-volatile register value and the 16-bit accumulator content in logic memory. The result is saved in the 16-bit accumulator.

The XOR process compares each bit in the 16-bit accumulator with the corresponding bit in the linked non-volatile register and yields these results:

  • If one bit equals 1 and the other equals 0, the result of the XOR process is 1.

  • In all other cases, the result of the XOR process is 0.

Arguments

Representation

1

XOR_NV_REG NVReg

Input arguments

Type

Range

Description

NVReg

UINT

0–63

The non-volatile register number

No output arguments.

ON_SET_REG

The ON_SET_REG command copies the value of the 16-bit accumulator to a specified register on a rising edge of the 1-bit accumulator.

Arguments

Representation

2

ON_SET_REG RegAddr TmpReg

No input argument.

Output arguments

Type

Range/Bit

Description

RegAddr

UINT

0–9249

The register address

TmpReg

UINT

Bit3

1-bit accumulator history bit

ON_SET_TMP_REG

The ON_SET_TMP_REG command copies the value of the 16-bit accumulator to a specified temporary register on a rising edge of the 1-bit accumulator.

Arguments

Representation

2

ON_SET_TMP_REG TmpReg1 TmpReg2

No input argument.

Output arguments

Type

Range/Bit

Description

TmpReg1

UINT

0–299

The temporary register number

TmpReg2

UINT

Bit3

1-bit accumulator history bit

ON_SET_NV_REG

The ON_SET_NV_REG command copies the value of the 16-bit accumulator to a specified non-volatile register on a rising edge of the 1-bit accumulator.

Arguments

Representation

1

ON_SET_NV_REG NVReg1 NVReg2

No input argument.

Output arguments

Type

Range/Bit

Description

NVReg1

UINT

0–63

The non-volatile register number

NVReg2

UINT

Bit3

1-bit accumulator history bit

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?