Altera Nios II Dokumentacja Strona 195

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 269
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 194
beq
Instruction branch if equal
Operation
if (rA == rB)
then PC ← PC + 4 + σ(IMM16)
else PC ← PC + 4
Assembler Syntax
beq rA, rB, label
Example
beq r6, r7, label
Description
If rA == rB, then beq transfers program control to the instruc‐
tion at label. In the instruction encoding, the offset given by
IMM16 is treated as a signed number of bytes relative to the
instruction immediately following beq. The two least-signifi‐
cant bits of IMM16 are always zero, because instruction
addresses must be word-aligned.
Exceptions
Misaligned destination address
Instruction Type
I
Instruction Fields
A = Register index of operand rA
B = Register index of operand rB
IMM16 = 16-bit signed immediate value
Bit Fields
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
A B IMM16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IMM16 0x26
/jointfilesconvert/364189/bge
Instruction
branch if greater than or equal signed
Operation
if ((signed) rA >= (signed) rB)
then PC ← PC + 4 + σ(IMM16)
else PC ← PC + 4
Assembler Syntax
/jointfilesconvert/364189/bge rA, rB, label
Example
/jointfilesconvert/364189/bge r6, r7, top_of_loop
8-12
beq
NII51017
2015.04.02
Altera Corporation
Instruction Set Reference
Send Feedback
Przeglądanie stron 194
1 2 ... 190 191 192 193 194 195 196 197 198 199 200 ... 268 269

Komentarze do niniejszej Instrukcji

Brak uwag