This repository was archived by the owner on Feb 9, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathassembly.yaml
More file actions
3004 lines (2860 loc) · 114 KB
/
Copy pathassembly.yaml
File metadata and controls
3004 lines (2860 loc) · 114 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Instruction types:
# This field only matters for verilog generation, it signifies which hierarchical decoder "owns" instruction
# LOCAL_CREGS -
# PC_MODIFYING -
# COMPUTE -
# COMMON_CREGS - ???? Jel se ovo koristi? Nema ga us assembler.cpp
#
#
# Functional Coverage:
# --------------------------------------
#
# Auto-generated instruction-level FCOV is specified with the following three tags as commented in the example below.
#
#
# SOME_INSTR:
# instrn_type: LOCAL_CREGS
# ex_resource: SYNC
# op_binary: 0xa0
# fcov: # This enables creation of the instruction specific FCOV group
# arguments:
# - name: mutex_index
# start_bit: 0
# field_type: HEX
# description: &mutex_index >
# Mutex index
# 0 - math
# 2 - unpack0
# 3 - unpack1
# 4 - pack0
# 5 - pack1
# 6 - pack2
# 7 - pack3
# fcov_point_bins: # This creates a coverage item for 'mutex_index' with the specified bins
# bins: [ {name: "math", value: "0x0"},
# {name: "unpack0", value: "0x2"},
# {name: "unpack1", value: "0x3"},
# {name: "pack0", value: "0x4"},
# {name: "pack1", value: "0x5"},
# {name: "pack2", value: "0x6"},
# {name: "pack3", value: "0x7"}]
# - name: some_bin_interval_field # This creates two bins, one for 0, and one for 1..10. If 'slice' is smaller than the range, the range will be further divided into slices of that size
# fcov_point_bin_interval:
# bins: [ {name: "dst_0", slice: "1", interval: ["0x0","0x0"]},
# {name: "dst_1", slice: "15", interval: ["0x1","0x10"]}]
#
# - name: some_bool_field
# fcov_point_bool: # This creates a coverage item for 'some_bool_field' as a boolean.
#
ATGETM:
instrn_type: LOCAL_CREGS
ex_resource: SYNC
op_binary: 0xa0
fcov:
arguments:
- name: mutex_index
start_bit: 0
field_type: HEX
description: &mutex_index >
Mutex index
0 - math
2 - unpack0
3 - unpack1
4 - pack0
5 - pack1
6 - pack2
7 - pack3
fcov_point_bins:
bins: [ {name: "math", value: "0x0"},
{name: "unpack0", value: "0x2"},
{name: "unpack1", value: "0x3"},
{name: "pack0", value: "0x4"},
{name: "pack1", value: "0x5"},
{name: "pack2", value: "0x6"},
{name: "pack3", value: "0x7"}]
description: >
Acquires mutex with index `mutex_index' for the issuing
thread. At most one thread can hold the mutex at any time.
Returns immediately if, when the instruction starts, mutex is
not held by any thread, or is held by the issuing thread.
Otherwise, stalls issuing thread until mutex is acquired. When
instruction completes, issuing thread holds the mutex, and it
must be released using instruction ATRELM.
ATRELM:
instrn_type: LOCAL_CREGS
ex_resource: SYNC
op_binary: 0xa1
arguments:
- name: mutex_index
start_bit: 0
field_type: HEX
description: *mutex_index
description: >
Releases mutex with index `mutex_index' if it is held by
issuing thread. Otherwise, has no effect.
STALLWAIT:
instrn_type: LOCAL_CREGS
ex_resource: SYNC
op_binary: 0xa2
src_mask: 0x0
fcov:
arguments:
- name: wait_res
start_bit: 0
field_type: DEC
description: "resource to be waited for - bit mask: {sfpu(bit14), trisc cfg(bit13), mover(bit12), srcB valid, srcA valid, srcB cleared, srcA cleared, math, packer3, packer2, packer1, packer0, unpack1, unpack0, thcon(bit0)"
fcov_point_bins:
bins: [ {name: "thcon", value: "0x1"},
{name: "unpack0", value: "0x2"},
{name: "unpack1", value: "0x4"},
{name: "pack0", value: "0x8"},
{name: "pack1", value: "0x10"},
{name: "pack2", value: "0x20"},
{name: "pack3", value: "0x40"},
{name: "math", value: "0x80"},
{name: "SrcAClr", value: "0x100"},
{name: "SrcBClr", value: "0x200"},
{name: "SrcAVld", value: "0x400"},
{name: "SrcBVld", value: "0x0800"},
{name: "Mover", value: "0x1000"},
{name: "TriscCfg", value: "0x2000"},
{name: "Sfpu", value: "0x4000"}]
- name: stall_res
start_bit: 15
field_type: HEX
description: "resource to be stalled -- bit mask for resources (compute/tdma(bit0), sync(bit1), pack(bit2), unpack(bit3), xmov(bit4), thcon(bit5), math(bit6), cfg(bit7), sfpu(bit8) )"
fcov_point_bins:
bins: [ {name: "stall_compute/tdma", value: "0x1"},
{name: "stall_sync", value: "0x2"},
{name: "stall_pack", value: "0x4"},
{name: "stall_unpack", value: "0x8"},
{name: "stall_xmov", value: "0x10"},
{name: "stall_thcon", value: "0x20"},
{name: "stall_math", value: "0x40"},
{name: "stall_cfg", value: "0x80"},
{name: "stall_sfpu", value: "0x100"}]
description: "Barrier instruction, stall resource until condition is met"
SEMINIT:
instrn_type: LOCAL_CREGS
ex_resource: SYNC
op_binary: 0xa3
src_mask: 0x0
fcov:
arguments:
- name: sem_sel
start_bit: 2
field_type: DEC
description: "One-hot encoded semaphore 0..7 select"
fcov_point_bins:
bins: [ {name: "semaphore0", value: "0x1"},
{name: "semaphore1", value: "0x2"},
{name: "semaphore2", value: "0x4"},
{name: "semaphore3", value: "0x8"},
{name: "semaphore4", value: "0x10"},
{name: "semaphore5", value: "0x20"},
{name: "semaphore6", value: "0x40"},
{name: "semaphore7", value: "0x80"}]
- name: init_value
start_bit: 16
field_type: DEC
description: "Semaphore initial value [0..15]"
- name: max_value
start_bit: 20
field_type: DEC
description: "Semaphore max value [0..15]"
description: "Initialize a semaphore"
SEMPOST:
instrn_type: LOCAL_CREGS
ex_resource: SYNC
op_binary: 0xa4
src_mask: 0x0
fcov:
arguments:
- name: sem_sel
start_bit: 2
field_type: DEC
description: "One-hot encoded semaphore 0..7 select"
fcov_point_bins:
bins: [ {name: "semaphore0", value: "0x1"},
{name: "semaphore1", value: "0x2"},
{name: "semaphore2", value: "0x4"},
{name: "semaphore3", value: "0x8"},
{name: "semaphore4", value: "0x10"},
{name: "semaphore5", value: "0x20"},
{name: "semaphore6", value: "0x40"},
{name: "semaphore7", value: "0x80"}]
description: "Semaphore increment"
SEMGET:
instrn_type: LOCAL_CREGS
ex_resource: SYNC
op_binary: 0xa5
src_mask: 0x0
fcov:
arguments:
- name: sem_sel
start_bit: 2
field_type: DEC
description: "One-hot encoded semaphore 0..7 select"
fcov_point_bins:
bins: [ {name: "semaphore0", value: "0x1"},
{name: "semaphore1", value: "0x2"},
{name: "semaphore2", value: "0x4"},
{name: "semaphore3", value: "0x8"},
{name: "semaphore4", value: "0x10"},
{name: "semaphore5", value: "0x20"},
{name: "semaphore6", value: "0x40"},
{name: "semaphore7", value: "0x80"}]
description: "Semaphore decrement"
SEMWAIT:
instrn_type: LOCAL_CREGS
ex_resource: SYNC
op_binary: 0xa6
src_mask: 0x0
fcov:
arguments:
- name: wait_sem_cond
start_bit: 0
field_type: DEC
description: "Wait on semaphore. 1 - wait while semaphore is 0, 2 - wait while semaphore is max"
fcov_point_bins:
bins: [ {name: "WaitWhileZero", value: "0x1"},
{name: "WaitWhileMax", value: "0x2"}]
- name: sem_sel
start_bit: 2
field_type: DEC
description: "One-hot encoded semaphore 0..7 select"
fcov_point_bins:
bins: [ {name: "semaphore0", value: "0x1"},
{name: "semaphore1", value: "0x2"},
{name: "semaphore2", value: "0x4"},
{name: "semaphore3", value: "0x8"},
{name: "semaphore4", value: "0x10"},
{name: "semaphore5", value: "0x20"},
{name: "semaphore6", value: "0x40"},
{name: "semaphore7", value: "0x80"}]
- name: stall_res
start_bit: 15
field_type: HEX
description: resource to be stalled -- bit mask for resources (compute/tdma, sync, pack, unpack, xmov, thcon, math, cfg, sfpu )
fcov_point_bins:
bins: [ {name: "stall_compute/tdma", value: "0x1"},
{name: "stall_sync", value: "0x2"},
{name: "stall_pack", value: "0x4"},
{name: "stall_unpack", value: "0x8"},
{name: "stall_xmov", value: "0x10"},
{name: "stall_thcon", value: "0x20"},
{name: "stall_math", value: "0x40"},
{name: "stall_cfg", value: "0x80"},
{name: "stall_sfpu", value: "0x100"}]
description: "Semaphore barrier instruction, stall resource until semaphore condition is met"
NOP:
op_binary: 0x2
ex_resource: NONE
instrn_type: PREDECODE
src_mask: 0x0
arguments: 0
description: "Do nothing and consume an instruction slot and cycle"
MOVD2A:
op_binary: 0x8
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0
fcov:
arguments: &MOVD_REG
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: instr_mod
field_type: DEC
start_bit: 12
description: instruction modifier, 0 - move single row, 2 - move 4 rows
fcov_point_bins:
bins: [ {name: "move_single_row", value: "0x0"},
{name: "move_4_rows", value: "0x2"}]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: src
field_type: DEC
start_bit: 17
description: src address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x00","0x0F"]},
{name: "top_half", slice: "0x10000", interval: ["0x10","0x1F"]} ]
- name: dest_32b_lo
field_type: BIN
start_bit: 23
description: address dest in 32-bit mode, but use the ext bits (Lower bits) (1-bit)
fcov_point_bool:
description: "Move dest register to srca. "
MOVD2B:
op_binary: 0xA
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0
fcov:
arguments:
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: instr_mod
field_type: DEC
start_bit: 12
description: instruction modifier, 0 - move single row, 2 - move 4 rows
fcov_point_bins:
bins: [ {name: "move_single_row", value: "0x0"},
{name: "move_4_rows", value: "0x2"}]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: src
field_type: DEC
start_bit: 17
description: src address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x00","0x1F"]},
{name: "top_half", slice: "0x10000", interval: ["0x20","0x3F"]} ]
- name: dest_32b_lo
field_type: BIN
start_bit: 23
description: address dest in 32-bit mode, but use the ext bits (Lower bits) (1-bit)
fcov_point_bool:
description: "Move dest register to srcb. "
MOVB2A:
op_binary: 0xB
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0
fcov:
arguments: &MOVB2A_REG
- name: srcb
field_type: DEC
start_bit: 0
description: Srcb address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x00","0x1F"]},
{name: "top_half", slice: "0x10000", interval: ["0x20","0x3F"]} ]
- name: instr_mod
field_type: DEC
start_bit: 12
description: instruction modifier, 0 - move single row, 2 - move 4 rows
fcov_point_bins:
bins: [ {name: "move_single_row", value: "0x0"},
{name: "move_4_rows", value: "0x2"}]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: srca
field_type: DEC
start_bit: 17
description: srca address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x00","0x0F"]},
{name: "top_half", slice: "0x10000", interval: ["0x10","0x1F"]} ]
description: "Move srcb register to srca. F"
ZEROACC:
op_binary: 0x10
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0
fcov:
arguments:
- name: dst
field_type: DEC
start_bit: 0
description: dest register index
fcov_point_bin_interval:
bins: [ {name: "min", slice: "1", interval: ["0x0","0x0"]},
{name: "mid", slice: "14", interval: ["0x1","0x0F"]},
{name: "max", slice: "1", interval: ["0x10","0x10"]} ] # FIXME: what's the actual range here?
- name: AddrMode
field_type: BIN
start_bit: 15
description: Addressing mode (bit3)=set zero flag to zero mode
fcov_point_bin_interval:
bins: [ {name: "min", slice: "1", interval: ["0x0","0x0"]},
{name: "mid", slice: "14", interval: ["0x1","0x0F"]},
{name: "max", slice: "1", interval: ["0x10","0x10"]} ] # FIXME: what's the actual range here?
- name: clear_mode
field_type: BIN
start_bit: 19
description: "Clear modes:
000 - clear only specified dest register.
001 - dest_index specifies block of 16 registers to clear.
010 - dest_index specified upper or lower half to clear when full dest is available (16bit data in dest).
011 - clear all registers when full dest is available (16bit data in dest).
110 - dest_index specified upper or lower half to clear when half dest is available (32bit data in dest).
111 - clear all registers half dest is available (32bit data in dest)."
fcov_point_bins:
bins: [ {name: "clear_only_specified_dest_register", value: "0x0"},
{name: "dest_index_specifies_block_of_16_registers_to_clear", value: "0x1"},
{name: "dest_index_specified_upper_or_lower_half_to_clear - 16b dest mode", value: "0x2"},
{name: "clear_all_registers - 16b dest mode", value: "0x3"},
{name: "dest_index_specified_upper_or_lower_half_to_clear - 32b dest mode", value: "0x6"},
{name: "clear_all_registers - 32b dest mode", value: "0x7"} ]
description: "Zero out accumulator. Single (00) mode clears one register and updates counters using the addressing mode. For other modes, zero-flags are set to emulate clearing of the dest memory, and dest_index is used to determine which portion is to be cleared."
ZEROSRC:
op_binary: 0x11
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0
fcov:
arguments:
- name: src_mask
field_type: DEC
start_bit: 0
description: 1 = zero out source A, 2 = zero out source B, 3 = zero out source A & B
fcov_point_bins:
bins: [ {name: "zero_out_source_A", value: "0x1"},
{name: "zero_out_source_B", value: "0x2"},
{name: "zero_out_source_A_and_B", value: "0x3"} ]
- name: bank_mask
field_type: DEC
start_bit: 2
description: 0 - zero out only current bank, 1 - zero out all banks
fcov_point_bool:
- name: write_mode
field_type: DEC
start_bit: 3
description: 1 - current bank is the current read bank (i.e. math kernel), 0 - current bank is the current write bank (i.e. unpacker kernel)
fcov_poit_bool:
- name: zero_val
field_type: BIN
start_bit: 4
description: 0 - initialize registers with zero, 1 - initialize registers with -inf (all ones)
fcov_point_bool:
description: "Zero out source A or B registers"
MOVA2D:
op_binary: 0x12
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x1
fcov:
arguments: &MOVA_REG
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: instr_mod
field_type: DEC
start_bit: 12
description: instruction modifier, 0 - move single row, 2 - move 8 rows
fcov_point_bins:
bins: [ {name: "move_single_row", value: "0x0"},
{name: "move_8_rows", value: "0x2"}]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: src
field_type: DEC
start_bit: 17
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "min", slice: "1", interval: ["0x0","0x0"]},
{name: "mid", slice: "14", interval: ["0x1","0x0F"]},
{name: "max", slice: "1", interval: ["0x10","0x10"]} ] # FIXME: what's the actual range here?
- name: dest_32b_lo
field_type: BIN
start_bit: 23
description: address dest in 32-bit mode, but use the ext bits (Lower bits) (1-bit)
fcov_point_bool:
description: "move srca register to dest"
MOVB2D:
op_binary: 0x13
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x2
fcov:
arguments: &MOVB_REG
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: instr_mod
field_type: DEC
start_bit: 12
description: instruction modifier, bit[0] - single row/single row with broadcasted datum0; bit[1] - broadcast single word; bit[2] - multiple rows
fcov_point_bins:
bins: [ {name: "move_1_row", value: "0x0"},
{name: "move_1_row_broadcast_datum0", value: "0x1"},
{name: "move_8_row_bcast_single_word", value: "0x2"},
{name: "move_8_row_bcast_single_word_bcast_datum0", value: "0x3"},
{name: "move_4_row", value: "0x4"},
{name: "move_4_row_bcast_datum0", value: "0x5"} ]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: src
field_type: DEC
start_bit: 17
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: dest_32b_lo
field_type: BIN
start_bit: 23
description: address dest in 32-bit mode, but use the ext bits (Lower bits) (1-bit)
fcov_point_bool:
description: "move srcb register to dest"
MOVDBGA2D:
op_binary: 0x9
ex_resource: MATH
instrn_type: COMPUTE
fcov:
src_mask: 0x0
arguments: *MOVA_REG
description: "move srca register to dest in debug mode - do not wait for ready signals"
TRNSPSRCA:
op_binary: 0x14
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x1
arguments: 0
description: "transpose SRCA main registers"
RAREB:
op_binary: 0x15
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x2
arguments: 0
description: "Rarefy SrcB registers"
TRNSPSRCB:
op_binary: 0x16
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x2
arguments: 0
description: "transpose SRCB main registers"
SHIFTXA:
op_binary: 0x17
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x1
fcov:
arguments: &SRCA_SHIFTX
- name: shift_mode
field_type: DEC
start_bit: 0
description: 11 = combined row shift left towards column 0, 10 = combined row shift right away from column 0, 01 = reserved, 00 = reserved
fcov_point_bins:
bins: [ {name: "reserved1", value: "0x0"},
{name: "reserved2", value: "0x1"},
{name: "combined_row_shift_right_from_col0", value: "0x2"},
{name: "combined_row_shift_left_to_col0", value: "0x3"} ]
- name: log2_amount2
field_type: DEC
start_bit: 2
description: Log2 of the shift amount - allowed only shift by 1
fcov_point_bins:
bins: [ {name: "shift_1", value: "0x0"} ]
description: "horizontal SRCA shift"
SHIFTXB:
op_binary: 0x18
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x2
fcov:
arguments: &SRCB_SHIFTX
- name: shift_row
field_type: DEC
start_bit: 0
description: addr row to be shifted
fcov_point_bin_interval:
bins: [ {name: "min", slice: "1", interval: ["0x0","0x0"]},
{name: "mid", slice: "14", interval: ["0x1","0x0F"]},
{name: "max", slice: "1", interval: ["0x10","0x10"]} ] # FIXME: what's the actual range here?
- name: rot_shift
field_type: DEC
start_bit: 10
description: 0 = rotational shift (datum0 shifts out and feeds into datum15), 1 = non-rotational shift (datum0 shifts out and 0 feeds into datum15)
fcov_point_bins:
bins: [ {name: "rot_shift", value: "0x0"},
{name: "non_rot_shift", value: "0x1"} ]
- name: addr_mode
field_type: BIN
start_bit: 15
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
description: "horizontal SRCA shift"
SETASHRMH0:
op_binary: 0x1A
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x1
fcov:
arguments: &SRCSHRH0_MASK
- name: halo_mask
field_type: HEX
start_bit: 0
description: halo mask
fcov_point_bin_interval:
bins: [ {name: "min", slice: "1", interval: ["0x0","0x0"]},
{name: "mid", slice: "14", interval: ["0x1","0x0F"]},
{name: "max", slice: "1", interval: ["0x10","0x10"]} ] # FIXME: what's the actual range here?
- name: reg_mask
field_type: HEX
start_bit: 1
description: 16bit wide register mask
fcov_point_bin_interval:
bins: [ {name: "min", slice: "1", interval: ["0x0","0x0"]},
{name: "mid", slice: "14", interval: ["0x1","0x0F"]},
{name: "max", slice: "1", interval: ["0x10","0x10"]} ] # FIXME: what's the actual range here?
description: "SRCA right shift horizontal mask, covering left halo and thread0 reg_array"
SETASHRMH1:
op_binary: 0x1B
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x1
fcov:
arguments: *SRCSHRH0_MASK
description: "SRCA right shift horizontal mask 1, covering thread1 reg_array. halo_mask argument is not used as there's no additional left halo storage with respect to thread1, right halo_mask is implied through the main_reg_mask"
SETASHRMV:
op_binary: 0x1C
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x1
fcov:
arguments: &SRCSHRV_MASK
- name: reg_mask2
field_type: HEX
start_bit: 0
description: 20bit wide register mask
description: "SRCA right shift vertical mask, covering main reg_array and central_sr"
SETASHRMH:
op_binary: 0x1E
ex_resource: MATH
instrn_type: COMPUTE
fcov:
src_mask: 0x1
arguments: *SRCSHRH0_MASK
description: "SRCA right shift horizontal mask, only targeting own thread regs"
SETPKEDGOF: # fixme: maybe go away as instruction?
op_binary: 0x1D
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0
arguments: &PKEDGE_OFFSET
- name: x_start
field_type: DEC
start_bit: 0
description: starting datum index for X
- name: x_end
field_type: DEC
start_bit: 4
description: ending datum index for X
- name: y_start
field_type: DEC
start_bit: 8
description: starting datum index for Y
- name: y_end
field_type: DEC
start_bit: 12
description: ending datum index for Y
description: "Packer row/column offsets to zero out edges of X-Y plane"
CLREXPHIST:
op_binary: 0x21
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0
arguments: 0
description: "Clear exponent histogram"
CONV3S1:
op_binary: 0x22
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: &CONV_ARGS
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: rotate_weights
field_type: BIN
start_bit: 17
description: Rotate weights for backprop (1-bit field for CONV3S1 and CONV3S2 only)
fcov_point_bool:
- name: clear_dvalid
field_type: BIN
start_bit: 22
description: "Clear data valid bits (B,A) after math is done."
fcov_point_bool:
description: "3x3 primitive for convolution, with stride 1. Outputs 8x 16-wide rows of data"
CONV3S2:
op_binary: 0x23
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: *CONV_ARGS
description: "Convolution with 3x3 primitive, with stride 2. Outputs 8x 16-wide rows of data"
MPOOL3S1:
op_binary: 0x24
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: &MATH_ARGS
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: index_en
field_type: BIN
start_bit: 14
description: Enable index output for max-pooling
fcov_point_bool:
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: clear_dvalid
field_type: BIN
start_bit: 22
description: "Clear data valid bits (B,A) after math is done."
fcov_point_bool:
description: "3x3 primitive for pooling, with stride 1 "
APOOL3S1:
op_binary: 0x25
ex_resource: MATH
instrn_type: COMPUTE
fcov:
arguments: *MATH_ARGS
src_mask: 0x3
description: "3x3 primitive for pooling, with stride 1 "
MVMUL:
op_binary: 0x26
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: &MVMUL_ARGS
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: instr_mod19
field_type: DEC
start_bit: 19
description: instruction modifier, 0 - compute 4 rows (full BW); 1 - compute 1 row (1/4 of BW)
fcov_point_bool:
- name: clear_dvalid
field_type: BIN
start_bit: 22
description: "Clear data valid bits (B,A) after math is done."
fcov_point_bool:
description: "Vector-matrix multiply. Outputs 4x 16-wide row"
ELWMUL:
op_binary: 0x27
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: &ELW_ARGS
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: instr_mod19
field_type: DEC
start_bit: 19
description: instruction modifier, 0 - srcb no broadcast; 1 - srcb single broadcast ; 3 - srcb broadcast all
fcov_point_bins:
bins: [ {name: "SRCB_NO_BCAST", value: "0x0"},
{name: "SRCB_BCAST_SINGLE", value: "0x1"},
{name: "SRCB_BCAST_ALL", value: "0x3"}]
- name: dest_accum_en
field_type: BIN
start_bit: 21
description: If zero, dest value will be overwritten with math result. If 1, result is added to existing dest value.
# TODO: fcov stuff
- name: clear_dvalid
field_type: BIN
start_bit: 22
description: "Clear data valid bits (B,A) after math is done."
fcov_point_bool:
description: "Elementwise multiply operation"
ELWADD:
op_binary: 0x28
ex_resource: MATH
instrn_type: COMPUTE
fcov:
src_mask: 0x3
arguments: *ELW_ARGS
description: "Elementwise add operation"
DOTPV:
op_binary: 0x29
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
arguments: *ELW_ARGS
description: "dot product of two vectors"
ELWSUB:
op_binary: 0x30
ex_resource: MATH
fcov:
src_mask: 0x3
instrn_type: COMPUTE
arguments: *ELW_ARGS
description: "Elementwise subtract operation (A-B)"
MPOOL3S2:
op_binary: 0x31
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: *MATH_ARGS
description: "3x3 primitive for pooling, with stride 2 "
APOOL3S2:
op_binary: 0x32
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: *MATH_ARGS
description: "3x3 primitive for pooling, with stride 2 "
GMPOOL:
op_binary: 0x33
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x3
fcov:
arguments: &GPOOL_ARGS
- name: dst
field_type: DEC
start_bit: 0
description: Dest address spec
fcov_point_bin_interval:
bins: [ {name: "bot_half", slice: "0x10000", interval: ["0x0","0x7FF"]},
{name: "top_half", slice: "0x10000", interval: ["0x800","0xFFF"]} ]
- name: max_pool_index_en
field_type: DEC
start_bit: 14
description: Enable index computation for max pooling
fcov_point_bool:
- name: addr_mode
field_type: BIN
start_bit: 15
description: 2-bit index of cfg register ADDR_MOD_REG to use for describing addressing mode
fcov_point_bin_interval:
bins: [ {name: "am_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "am_2_3", slice: "2", interval: ["0x2","0x3"]} ]
- name: instr_mod19
field_type: DEC
start_bit: 19
description: instruction modifier, 0 - single row wide; 1 - 16x16 wide
fcov_point_bool:
- name: clear_dvalid
field_type: BIN
start_bit: 22
description: "Clear data valid bits (B,A) after math is done."
fcov_point_bool:
description: "Global max pool with primitive size 16x16 "
GAPOOL:
op_binary: 0x34
ex_resource: MATH
src_mask: 0x3
instrn_type: COMPUTE
fcov:
arguments: *GPOOL_ARGS
description: "Global average pool with primitive size 16x16 "
SETDVALID:
op_binary: 0x57
ex_resource: TDMA
instrn_type: TDMA
src_mask: 0x0
fcov:
arguments:
- name: setvalid
field_type: BIN
start_bit: 0
description: "Set {B,A} data valid (2 bits)"
fcov_point_bin_interval:
bins: [ {name: "ba_0_1", slice: "2", interval: ["0x0","0x1"]},
{name: "ba_2_3", slice: "2", interval: ["0x2","0x3"]} ]
description: "Sets A/B data valid for current write ID. TDMA instruction."
GATESRCRST:
op_binary: 0x35
ex_resource: MATH
instrn_type: COMPUTE
src_mask: 0x0