Skip to content

Commit e811334

Browse files
authored
update isa spec (#289)
Signed-off-by: Brian Xu <brianx@xilinx.com>
1 parent 3d773cb commit e811334

3 files changed

Lines changed: 46 additions & 16 deletions

File tree

specification/aie2ps/isa-spec.html

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,14 @@ <h2 id="start_cond_job_preempt-0x1f">START_COND_JOB_PREEMPT (0x1f)</h2>
630630
</table>
631631
<p>Indicates the start of a new job and creates a new entry in the job table,
632632
if preemption flag has been set. The flag is cleared when preemption is
633-
checked, and is set if preemption happens.
633+
checked, and is set if preemption happens, so the job runs only if the flag indicates that a
634+
preemption occurred when the condition is checked.
634635
The job size is auto-calculated and inserted by the assembler and not supplied
635-
explicitly by the user.</p>
636+
explicitly by the user.
637+
In multi-uC case, CERT will do barrier sync after this job, so each uC should have the same number
638+
of this type of conditional jobs.
639+
The conditional job can share page with other jobs, and all jobs following this job in the page
640+
don't start before this job is done.</p>
636641
<h2 id="uc_dma_write_des-0x01">UC_DMA_WRITE_DES (0x01)</h2>
637642
<p>Enqueues a DM2MM uC-DMA transfer and returns a wait handle for it.</p>
638643
<table>
@@ -1369,8 +1374,10 @@ <h2 id="preempt-0x19">PREEMPT (0x19)</h2>
13691374
unit of page to the 1st page of control code, and this address is where the <code>RESTORE</code> control code resides. The opcode
13701375
can determine whether preemption is required, and if required, it can also distinguish whether it is to <code>SAVE</code> or to
13711376
<code>RESTORE</code>, and run the <code>SAVE</code> or <code>RESTORE</code> control code accordingly.
1372-
In multi-uc case, for each preemption point id, the control code of each uc should have this opcode with same <code>id</code>.
1373-
This opcode should take one whole job which in turn should take one whole page.</p>
1377+
In multi-uC case, at each preemption point, CERT will do barrier sync regardless of whether the preemption happens or not, so
1378+
for each preemption point id, the control code of each uc should have this opcode with same <code>id</code>.
1379+
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
1380+
before this preemption job is done</p>
13741381
<h2 id="load_pdi-0x1a">LOAD_PDI (0x1a)</h2>
13751382
<p>load pdi</p>
13761383
<table>
@@ -1398,10 +1405,13 @@ <h2 id="load_pdi-0x1a">LOAD_PDI (0x1a)</h2>
13981405
</tbody>
13991406
</table>
14001407
<p>pdi itself is also a piece of control code. It can be loaded by other control code at anywhere anytime.
1401-
<code>pdi_id</code> is an elf wide unique id and specifies an unique pdi. consecutive loading of same pdi results in following
1408+
<code>pdi_id</code> is an elf wide unique id and specifies a unique pdi. If multiple control code elfs run in one hwctx,
1409+
the pdi_id should be hwctx wide unique. When this opcode runs, consecutive loading of same pdi results in following
14021410
loading skipped by the uC. <code>pdi_host_addr_offset</code> specifies a relative address in unit of page to the 1st page of
14031411
the control code and is where the pdi control code resides
1404-
This opcode should take one whole job which in turn should take one whole page.</p>
1412+
This opcode should take one whole job but the job can share page with other jobs. All jobs following the load pdi job
1413+
don't start before the load pdi job is done.
1414+
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</p>
14051415
<h2 id="load_cores-0x04">LOAD_CORES (0x04)</h2>
14061416
<p>load cores</p>
14071417
<table>

specification/aie2ps/isa-spec.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,14 @@ Indicates a new job which can be conditionally started according to preemption.
238238

239239
Indicates the start of a new job and creates a new entry in the job table,
240240
if preemption flag has been set. The flag is cleared when preemption is
241-
checked, and is set if preemption happens.
241+
checked, and is set if preemption happens, so the job runs only if the flag indicates that a
242+
preemption occurred when the condition is checked.
242243
The job size is auto-calculated and inserted by the assembler and not supplied
243244
explicitly by the user.
245+
In multi-uC case, CERT will do barrier sync after this job, so each uC should have the same number
246+
of this type of conditional jobs.
247+
The conditional job can share page with other jobs, and all jobs following this job in the page
248+
don't start before this job is done.
244249

245250

246251
## UC_DMA_WRITE_DES (0x01)
@@ -691,8 +696,10 @@ and this address is where the `SAVE` control code resides. `restore_control_code
691696
unit of page to the 1st page of control code, and this address is where the `RESTORE` control code resides. The opcode
692697
can determine whether preemption is required, and if required, it can also distinguish whether it is to `SAVE` or to
693698
`RESTORE`, and run the `SAVE` or `RESTORE` control code accordingly.
694-
In multi-uc case, for each preemption point id, the control code of each uc should have this opcode with same `id`.
695-
This opcode should take one whole job which in turn should take one whole page.
699+
In multi-uC case, at each preemption point, CERT will do barrier sync regardless of whether the preemption happens or not, so
700+
for each preemption point id, the control code of each uc should have this opcode with same `id`.
701+
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+
before this preemption job is done
696703

697704

698705
## LOAD_PDI (0x1a)
@@ -704,10 +711,13 @@ load pdi
704711
| opcode (8b) | pad (8b) | pad (16b) | const (32b) | page_id (16b) | pad (16b) | 12B |
705712

706713
pdi itself is also a piece of control code. It can be loaded by other control code at anywhere anytime.
707-
`pdi_id` is an elf wide unique id and specifies an unique pdi. consecutive loading of same pdi results in following
714+
`pdi_id` is an elf wide unique id and specifies a unique pdi. If multiple control code elfs run in one hwctx,
715+
the pdi_id should be hwctx wide unique. When this opcode runs, consecutive loading of same pdi results in following
708716
loading skipped by the uC. `pdi_host_addr_offset` specifies a relative address in unit of page to the 1st page of
709717
the control code and is where the pdi control code resides
710-
This opcode should take one whole job which in turn should take one whole page.
718+
This opcode should take one whole job but the job can share page with other jobs. All jobs following the load pdi job
719+
don't start before the load pdi job is done.
720+
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
711721

712722

713723
## LOAD_CORES (0x04)

specification/aie2ps/isa-spec.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ operations:
113113
description: |
114114
Indicates the start of a new job and creates a new entry in the job table,
115115
if preemption flag has been set. The flag is cleared when preemption is
116-
checked, and is set if preemption happens.
116+
checked, and is set if preemption happens, so the job runs only if the flag indicates that a
117+
preemption occurred when the condition is checked.
117118
The job size is auto-calculated and inserted by the assembler and not supplied
118119
explicitly by the user.
120+
In multi-uC case, CERT will do barrier sync after this job, so each uC should have the same number
121+
of this type of conditional jobs.
122+
The conditional job can share page with other jobs, and all jobs following this job in the page
123+
don't start before this job is done.
119124
- mnemonic: UC_DMA_WRITE_DES
120125
opcode: 0x01
121126
regular: True
@@ -624,8 +629,10 @@ operations:
624629
unit of page to the 1st page of control code, and this address is where the `RESTORE` control code resides. The opcode
625630
can determine whether preemption is required, and if required, it can also distinguish whether it is to `SAVE` or to
626631
`RESTORE`, and run the `SAVE` or `RESTORE` control code accordingly.
627-
In multi-uc case, for each preemption point id, the control code of each uc should have this opcode with same `id`.
628-
This opcode should take one whole job which in turn should take one whole page.
632+
In multi-uC case, at each preemption point, CERT will do barrier sync regardless of whether the preemption happens or not, so
633+
for each preemption point id, the control code of each uc should have this opcode with same `id`.
634+
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+
before this preemption job is done
629636
- mnemonic: LOAD_PDI
630637
opcode: 0x1a
631638
regular: True
@@ -643,10 +650,13 @@ operations:
643650
brief: load pdi
644651
description: |
645652
pdi itself is also a piece of control code. It can be loaded by other control code at anywhere anytime.
646-
`pdi_id` is an elf wide unique id and specifies an unique pdi. consecutive loading of same pdi results in following
653+
`pdi_id` is an elf wide unique id and specifies a unique pdi. If multiple control code elfs run in one hwctx,
654+
the pdi_id should be hwctx wide unique. When this opcode runs, consecutive loading of same pdi results in following
647655
loading skipped by the uC. `pdi_host_addr_offset` specifies a relative address in unit of page to the 1st page of
648656
the control code and is where the pdi control code resides
649-
This opcode should take one whole job which in turn should take one whole page.
657+
This opcode should take one whole job but the job can share page with other jobs. All jobs following the load pdi job
658+
don't start before the load pdi job is done.
659+
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
650660
- mnemonic: LOAD_CORES
651661
opcode: 0x04
652662
regular: True

0 commit comments

Comments
 (0)