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
<p>This essentially is same to LOAD_PDI except that CERT will save the elf info for aie cores to different location than the pdi so that cert can do recovery of both during preemption</p>
1465
+
<p>Note that same to LOAD_PDI, reset/unreset, enable/disable core is required to load new core elf. This should be part of generated control code</p>
<p>This is to load control packet format core elfs. Compared to the LOAD_CORES, this opcode assumes the control code to load the control packet through shimdma will not take more than a page so that the current page that holds this opcode will not be overwritten. As a result, we can put this control packet loading part right after this opcode and hold everything in one job. The <code>core_elf_id</code> in this opcode and the one in LOAD_CORES are in same id space so that if there are LOAD_CORES and LOAD_CORES_CP, cert can only save the id for the last of these opcodes.</p>
1489
+
<p>Notes:</p>
1490
+
<ol>
1491
+
<li>
1492
+
<p>Same to LOAD_PDI, reset/unreset, enable/disable core is required to load new core elf. This should be part of generated control code</p>
1493
+
</li>
1494
+
<li>
1495
+
<p>Completion of control packet blob shimDMA doesn't mean the completion of the control packet loading. Control code itself should be responsible for checking completion of control packet loading. There are 2 ways doing this, one is to enable the write response of last control packet and the other is to add one extra control packet write to a known register. For former way, routing for response packet should be configured, and WAIT_TCTS is used to check the response. For latter way, POLL_32/MASK_POLL_32 is used to check the register of the extra control packet.</p>
1496
+
</li>
1497
+
<li>
1498
+
<p>In broadcast case, completion check should be performed on all destination cores.</p>
<p>Used in preemption restore case. The info (pdi id and location in host ddr) of the pdi last time loaded is saved
1486
1522
in firmware. During restore (after a context switch), the last loaded pdi will be loaded with this opcode</p>
1523
+
<p>Notes:</p>
1524
+
<ol>
1525
+
<li>
1526
+
<p>CERT saves information of one last pdi and one last core elf</p>
1527
+
</li>
1528
+
<li>
1529
+
<p>The last core elf can be either from LOAD_CORES or LOAD_CORES_CP, whichever is the last.</p>
1530
+
</li>
1531
+
<li>
1532
+
<p>In preemption support, LOAD_PDI is mandatory, that is to say, there is at least one LOAD_PDI before preemption point is inserted. LOAD_CORES/LOAD_CORES_CP are optional. </p>
Copy file name to clipboardExpand all lines: specification/aie2ps/isa-spec.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -325,6 +325,7 @@ the current job will be blocked until all the TCT arrive. The runtime will proce
325
325
execution of other (non-blocked) jobs during that time.
326
326
Use this operation only for tasks which have TCTs enabled and where the TCTs are
327
327
routed to arrive at the uC executing this operation.
328
+
328
329
Note that tasks can be enqueued from any jobs, but only one job can call `WAIT_TCTS`. And
329
330
waiting for more tcts than enqueued will hang the job forever
330
331
@@ -574,6 +575,8 @@ remote barrier, only one job in a column can participate in. Example:
574
575
REMOTE_BARRIER $rb0, 0xC
575
576
```
576
577
578
+
Note that it is not necessary all prior jobs have to complete before the barrier matures.
579
+
577
580
578
581
## EOF (0xff)
579
582
@@ -701,6 +704,13 @@ for each preemption point id, the control code of each uc should have this opcod
701
704
This opcode should take one whole job but the job can share page with other jobs. All following jobs in same page don't start
702
705
before this preemption job is done
703
706
707
+
Note:
708
+
709
+
1. Just like REMOTE_BARRIER, the barrier sync done by CERT doesn't require completion of prior jobs
710
+
711
+
2.`SAVE` and `RESTORE` control code have self-contained stream switch routing for themselves. The routing information
712
+
will be cleared after `SAVE` and `RESTORE` are done
713
+
704
714
705
715
## LOAD_PDI (0x1a)
706
716
@@ -719,6 +729,21 @@ This opcode should take one whole job but the job can share page with other jobs
719
729
don't start before the load pdi job is done.
720
730
In multi-uc case, cert will do barrier sync after the load_pdi job, so each uc needs to have same number of load pdi jobs
721
731
732
+
According to AIE spec,
733
+
```
734
+
For full reconfiguration of the cores program memory, the following steps may be taken.
735
+
736
+
Wait for core to reach a known synchronization point (lock, or Core done)
737
+
738
+
Reset, disable core (Section 5.12.2)
739
+
740
+
Write PM
741
+
742
+
Unreset, enable core
743
+
```
744
+
745
+
Note that if core elf is part of pdi, reset/unreset, enable/disable core required. This should be part of the generated control code
746
+
722
747
723
748
## LOAD_CORES (0x04)
724
749
@@ -730,6 +755,8 @@ load cores
730
755
731
756
This essentially is same to LOAD_PDI except that CERT will save the elf info for aie cores to different location than the pdi so that cert can do recovery of both during preemption
732
757
758
+
Note that same to LOAD_PDI, reset/unreset, enable/disable core is required to load new core elf. This should be part of generated control code
759
+
733
760
734
761
## LOAD_CORES_CP (0x20)
735
762
@@ -741,6 +768,14 @@ load cores_cp
741
768
742
769
This is to load control packet format core elfs. Compared to the LOAD_CORES, this opcode assumes the control code to load the control packet through shimdma will not take more than a page so that the current page that holds this opcode will not be overwritten. As a result, we can put this control packet loading part right after this opcode and hold everything in one job. The `core_elf_id` in this opcode and the one in LOAD_CORES are in same id space so that if there are LOAD_CORES and LOAD_CORES_CP, cert can only save the id for the last of these opcodes.
743
770
771
+
Notes:
772
+
773
+
1. Same to LOAD_PDI, reset/unreset, enable/disable core is required to load new core elf. This should be part of generated control code
774
+
775
+
2. Completion of control packet blob shimDMA doesn't mean the completion of the control packet loading. Control code itself should be responsible for checking completion of control packet loading. There are 2 ways doing this, one is to enable the write response of last control packet and the other is to add one extra control packet write to a known register. For former way, routing for response packet should be configured, and WAIT_TCTS is used to check the response. For latter way, POLL_32/MASK_POLL_32 is used to check the register of the extra control packet.
776
+
777
+
3. In broadcast case, completion check should be performed on all destination cores.
778
+
744
779
745
780
## LOAD_LAST_PDI (0x1b)
746
781
@@ -753,6 +788,14 @@ load last loaded pdi
753
788
Used in preemption restore case. The info (pdi id and location in host ddr) of the pdi last time loaded is saved
754
789
in firmware. During restore (after a context switch), the last loaded pdi will be loaded with this opcode
755
790
791
+
Notes:
792
+
793
+
1. CERT saves information of one last pdi and one last core elf
794
+
795
+
2. The last core elf can be either from LOAD_CORES or LOAD_CORES_CP, whichever is the last.
796
+
797
+
3. In preemption support, LOAD_PDI is mandatory, that is to say, there is at least one LOAD_PDI before preemption point is inserted. LOAD_CORES/LOAD_CORES_CP are optional.
798
+
756
799
757
800
## SAVE_TIMESTAMPS (0x1c)
758
801
@@ -779,6 +822,8 @@ sleep instruction.
779
822
Sleep instruction makes the current job busy waiting `target` microseconds. This opcode is for test purpose
780
823
only. Calling this operation doesn't yield control to another job.
781
824
825
+
Note that this opcode is not supported in release CERT. Dtrace action sleep() is recommended for this test purpose.
Copy file name to clipboardExpand all lines: specification/aie2ps/isa-spec.yaml
+46-1Lines changed: 46 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# SPDX-License-Identifier: MIT
2
-
# Copyright (C) 2023-2025 Advanced Micro Devices, Inc. All rights reserved.
2
+
# Copyright (C) 2023-2026 Advanced Micro Devices, Inc. All rights reserved.
3
3
---
4
4
platform:
5
5
architecture: aie2ps
@@ -225,6 +225,7 @@ operations:
225
225
execution of other (non-blocked) jobs during that time.
226
226
Use this operation only for tasks which have TCTs enabled and where the TCTs are
227
227
routed to arrive at the uC executing this operation.
228
+
228
229
Note that tasks can be enqueued from any jobs, but only one job can call `WAIT_TCTS`. And
229
230
waiting for more tcts than enqueued will hang the job forever
230
231
- mnemonic: END_JOB
@@ -495,6 +496,8 @@ operations:
495
496
```
496
497
REMOTE_BARRIER $rb0, 0xC
497
498
```
499
+
500
+
Note that it is not necessary all prior jobs have to complete before the barrier matures.
498
501
- mnemonic: EOF
499
502
opcode: 0xff
500
503
regular: False
@@ -633,6 +636,13 @@ operations:
633
636
for each preemption point id, the control code of each uc should have this opcode with same `id`.
634
637
This opcode should take one whole job but the job can share page with other jobs. All following jobs in same page don't start
635
638
before this preemption job is done
639
+
640
+
Note:
641
+
642
+
1. Just like REMOTE_BARRIER, the barrier sync done by CERT doesn't require completion of prior jobs
643
+
644
+
2. `SAVE` and `RESTORE` control code have self-contained stream switch routing for themselves. The routing information
645
+
will be cleared after `SAVE` and `RESTORE` are done
636
646
- mnemonic: LOAD_PDI
637
647
opcode: 0x1a
638
648
regular: True
@@ -657,6 +667,21 @@ operations:
657
667
This opcode should take one whole job but the job can share page with other jobs. All jobs following the load pdi job
658
668
don't start before the load pdi job is done.
659
669
In multi-uc case, cert will do barrier sync after the load_pdi job, so each uc needs to have same number of load pdi jobs
670
+
671
+
According to AIE spec,
672
+
```
673
+
For full reconfiguration of the cores program memory, the following steps may be taken.
674
+
675
+
Wait for core to reach a known synchronization point (lock, or Core done)
676
+
677
+
Reset, disable core (Section 5.12.2)
678
+
679
+
Write PM
680
+
681
+
Unreset, enable core
682
+
```
683
+
684
+
Note that if core elf is part of pdi, reset/unreset, enable/disable core is required. This should be part of the generated control code
660
685
- mnemonic: LOAD_CORES
661
686
opcode: 0x04
662
687
regular: True
@@ -674,6 +699,8 @@ operations:
674
699
brief: load cores
675
700
description: |
676
701
This essentially is same to LOAD_PDI except that CERT will save the elf info for aie cores to different location than the pdi so that cert can do recovery of both during preemption
702
+
703
+
Note that same to LOAD_PDI, reset/unreset, enable/disable core is required to load new core elf. This should be part of generated control code
677
704
- mnemonic: LOAD_CORES_CP
678
705
opcode: 0x20
679
706
regular: True
@@ -686,6 +713,14 @@ operations:
686
713
brief: load cores_cp
687
714
description: |
688
715
This is to load control packet format core elfs. Compared to the LOAD_CORES, this opcode assumes the control code to load the control packet through shimdma will not take more than a page so that the current page that holds this opcode will not be overwritten. As a result, we can put this control packet loading part right after this opcode and hold everything in one job. The `core_elf_id` in this opcode and the one in LOAD_CORES are in same id space so that if there are LOAD_CORES and LOAD_CORES_CP, cert can only save the id for the last of these opcodes.
716
+
717
+
Notes:
718
+
719
+
1. Same to LOAD_PDI, reset/unreset, enable/disable core is required to load new core elf. This should be part of generated control code
720
+
721
+
2. Completion of control packet blob shimDMA doesn't mean the completion of the control packet loading. Control code itself should be responsible for checking completion of control packet loading. There are 2 ways doing this, one is to enable the write response of last control packet and the other is to add one extra control packet write to a known register. For former way, routing for response packet should be configured, and WAIT_TCTS is used to check the response. For latter way, POLL_32/MASK_POLL_32 is used to check the register of the extra control packet.
722
+
723
+
3. In broadcast case, completion check should be performed on all destination cores.
689
724
- mnemonic: LOAD_LAST_PDI
690
725
opcode: 0x1b
691
726
regular: True
@@ -696,6 +731,14 @@ operations:
696
731
description: |
697
732
Used in preemption restore case. The info (pdi id and location in host ddr) of the pdi last time loaded is saved
698
733
in firmware. During restore (after a context switch), the last loaded pdi will be loaded with this opcode
734
+
735
+
Notes:
736
+
737
+
1. CERT saves information of one last pdi and one last core elf
738
+
739
+
2. The last core elf can be either from LOAD_CORES or LOAD_CORES_CP, whichever is the last.
740
+
741
+
3. In preemption support, LOAD_PDI is mandatory, that is to say, there is at least one LOAD_PDI before preemption point is inserted. LOAD_CORES/LOAD_CORES_CP are optional.
699
742
- mnemonic: SAVE_TIMESTAMPS
700
743
opcode: 0x1c
701
744
regular: True
@@ -724,6 +767,8 @@ operations:
724
767
description: |
725
768
Sleep instruction makes the current job busy waiting `target` microseconds. This opcode is for test purpose
726
769
only. Calling this operation doesn't yield control to another job.
770
+
771
+
Note that this opcode is not supported in release CERT. Dtrace action sleep() is recommended for this test purpose.
0 commit comments