You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/api-reference/system/ulp_instruction_set.rst
+58-19Lines changed: 58 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -798,20 +798,48 @@ The detailed description of all instructions is presented below:
798
798
- *GE* (greater or equal) – jump if value in R0 >= threshold
799
799
800
800
**Cycles**
801
-
Conditions *EQ*, *GT* and *LT*: 2 cycles to execute, 2 cycles to fetch next instruction
802
-
Conditions *LE* and *GE* are implemented in the assembler using two **JUMPR** instructions::
803
801
804
-
// JUMPR target, threshold, LE is implemented as:
802
+
.. only:: esp32
803
+
804
+
Conditions *LT*, *GE*, *LE* and *GT*: 2 cycles to execute, 2 cycles to fetch next instruction
805
+
806
+
Conditions *LE* and *GT* are implemented in the assembler using one **JUMPR** instruction::
807
+
808
+
// JUMPR target, threshold, GT is implemented as:
809
+
810
+
JUMPR target, threshold+1, GE
811
+
812
+
// JUMPR target, threshold, LE is implemented as:
813
+
814
+
JUMPR target, threshold + 1, LT
815
+
816
+
Conditions *EQ* is implemented in the assembler using two **JUMPR** instructions::
817
+
818
+
// JUMPR target, threshold, EQ is implemented as:
819
+
820
+
JUMPR next, threshold + 1, GE
821
+
JUMPR target, threshold, GE
822
+
next:
823
+
824
+
825
+
.. only:: esp32s2 or esp32s3
805
826
806
-
JUMPR target, threshold, EQ
807
-
JUMPR target, threshold, LT
827
+
Conditions *EQ*, *GT* and *LT*: 2 cycles to execute, 2 cycles to fetch next instruction
808
828
809
-
// JUMPR target, threshold, GE is implemented as:
829
+
Conditions *LE* and *GE* are implemented in the assembler using two **JUMPR** instructions::
810
830
811
-
JUMPR target, threshold, EQ
812
-
JUMPR target, threshold, GT
831
+
// JUMPR target, threshold, LE is implemented as:
832
+
833
+
JUMPR target, threshold, EQ
834
+
JUMPR target, threshold, LT
835
+
836
+
// JUMPR target, threshold, GE is implemented as:
837
+
838
+
JUMPR target, threshold, EQ
839
+
JUMPR target, threshold, GT
840
+
841
+
Therefore the execution time will depend on the branches taken: either 2 cycles to execute + 2 cycles to fetch, or 4 cycles to execute + 4 cycles to fetch.
813
842
814
-
Therefore the execution time will depend on the branches taken: either 2 cycles to execute + 2 cycles to fetch, or 4 cycles to execute + 4 cycles to fetch.
815
843
816
844
**Description**
817
845
The instruction makes a jump to a relative address if condition is true. Condition is the result of comparison of R0 register value and the threshold value.
@@ -844,21 +872,32 @@ The detailed description of all instructions is presented below:
844
872
- *GE* (greater or equal) — jump if value in stage_cnt >= threshold
845
873
846
874
**Cycles**
847
-
2 cycles to execute, 2 cycles to fetch next instruction::
848
875
849
-
// JUMPS target, threshold, EQ is implemented as:
876
+
.. only:: esp32
877
+
878
+
Conditions *LE*, *LT*, *GE*: 2 cycles to execute, 2 cycles to fetch next instruction
879
+
880
+
Conditions *EQ*, *GT* are implemented in the assembler using two **JUMPS** instructions::
850
881
851
-
JUMPS next, threshold, LT
852
-
JUMPS target, threshold, LE
853
-
next:
882
+
// JUMPS target, threshold, EQ is implemented as:
854
883
855
-
// JUMPS target, threshold, GT is implemented as:
884
+
JUMPS next, threshold, LT
885
+
JUMPS target, threshold, LE
886
+
next:
887
+
888
+
// JUMPS target, threshold, GT is implemented as:
889
+
890
+
JUMPS next, threshold, LE
891
+
JUMPS target, threshold, GE
892
+
next:
893
+
894
+
Therefore the execution time will depend on the branches taken: either 2 cycles to execute + 2 cycles to fetch, or 4 cycles to execute + 4 cycles to fetch.
895
+
896
+
897
+
.. only:: esp32s2 or esp32s3
856
898
857
-
JUMPS next, threshold, LE
858
-
JUMPS target, threshold, GE
859
-
next:
899
+
2 cycles to execute, 2 cycles to fetch next instruction
860
900
861
-
Therefore the execution time will depend on the branches taken: either 2 cycles to execute + 2 cycles to fetch, or 4 cycles to execute + 4 cycles to fetch.
862
901
863
902
**Description**
864
903
The instruction makes a jump to a relative address if condition is true. Condition is the result of comparison of count register value and threshold value.
0 commit comments