1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef _ASM_METAG_REGS_H_
14#define _ASM_METAG_REGS_H_
15
16
17
18
19
20#define TXUCT_ID 0x0
21#ifdef METAC_1_2
22#define TXUCT_MASK 0xFF0FFFFF
23#else
24#define TXUCT_MASK 0xFF1FFFFF
25#endif
26#define TGUCT_MASK 0x00000000
27#define TXUD0_ID 0x1
28#define TXUD1_ID 0x2
29#define TXUDX_MASK 0xFFFFFFFF
30#define TGUDX_MASK 0xFFFF0000
31#define TXUDXDSP_MASK 0x0F0FFFFF
32#define TGUDXDSP_MASK 0x0E0E0000
33#define TXUA0_ID 0x3
34#define TXUA1_ID 0x4
35#define TXUAX_MASK 0x0000FFFF
36#define TGUAX_MASK 0x0000FF00
37#define TXUPC_ID 0x5
38#define TXUPC_MASK 0x00000003
39#define TGUPC_MASK 0x00000000
40#define TXUPORT_ID 0x6
41#define TXUTR_ID 0x7
42#define TXUTR_MASK 0x0000005F
43#define TGUTR_MASK 0x00000000
44#ifdef METAC_2_1
45#define TXUTT_ID 0x8
46#define TXUTT_MASK 0x0000000F
47#define TGUTT_MASK 0x00000010
48#define TXUFP_ID 0x9
49#define TXUFP_MASK 0x0000FFFF
50#define TGUFP_MASK 0x00000000
51#endif
52
53#ifdef METAC_1_2
54#define TXUXX_MASKS { TXUCT_MASK, TXUDX_MASK, TXUDX_MASK, TXUAX_MASK, \
55 TXUAX_MASK, TXUPC_MASK, 0, TXUTR_MASK, \
56 0, 0, 0, 0, 0, 0, 0, 0 }
57#define TGUXX_MASKS { TGUCT_MASK, TGUDX_MASK, TGUDX_MASK, TGUAX_MASK, \
58 TGUAX_MASK, TGUPC_MASK, 0, TGUTR_MASK, \
59 0, 0, 0, 0, 0, 0, 0, 0 }
60#else
61#define TXUXX_MASKS { TXUCT_MASK, TXUDX_MASK, TXUDX_MASK, TXUAX_MASK, \
62 TXUAX_MASK, TXUPC_MASK, 0, TXUTR_MASK, \
63 TXUTT_MASK, TXUFP_MASK, 0, 0, \
64 0, 0, 0, 0 }
65#define TGUXX_MASKS { TGUCT_MASK, TGUDX_MASK, TGUDX_MASK, TGUAX_MASK, \
66 TGUAX_MASK, TGUPC_MASK, 0, TGUTR_MASK, \
67 TGUTT_MASK, TGUFP_MASK, 0, 0, \
68 0, 0, 0, 0 }
69#endif
70
71#define TXUXXDSP_MASKS { 0, TXUDXDSP_MASK, TXUDXDSP_MASK, 0, 0, 0, 0, 0, \
72 0, 0, 0, 0, 0, 0, 0, 0 }
73#define TGUXXDSP_MASKS { 0, TGUDXDSP_MASK, TGUDXDSP_MASK, 0, 0, 0, 0, 0, \
74 0, 0, 0, 0, 0, 0, 0, 0 }
75
76
77
78
79
80
81
82
83#define D0Re0 D0.0
84
85#define D0Ar6 D0.1
86
87#define D0Ar4 D0.2
88
89#define D0Ar2 D0.3
90
91#define D0FrT D0.4
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107#define D1Re0 D1.0
108
109#define D1Ar5 D1.1
110
111#define D1Ar3 D1.2
112
113#define D1Ar1 D1.3
114
115#define D1RtP D1.4
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131#define A0StP A0.0
132
133#define A0FrP A0.1
134
135
136
137
138
139
140
141
142
143
144#define A1GbP A1.0
145
146#define A1LbP A1.1
147
148
149
150
151
152
153#ifdef METAC_2_1
154
155
156#define A0IStP A0IReg
157
158#define A1IGbP A1IReg
159#endif
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#define TXENABLE CT.0
315#define TXMODE CT.1
316#define TXSTATUS CT.2
317#define TXRPT CT.3
318#define TXTIMER CT.4
319#define TXL1START CT.5
320#define TXL1END CT.6
321#define TXL1COUNT CT.7
322#define TXL2START CT.8
323#define TXL2END CT.9
324#define TXL2COUNT CT.10
325#define TXBPOBITS CT.11
326#define TXMRSIZE CT.12
327#define TXTIMERI CT.13
328#define TXDRCTRL CT.14
329#define TXDRSIZE CT.15
330#define TXCATCH0 CT.16
331#define TXCATCH1 CT.17
332#define TXCATCH2 CT.18
333#define TXCATCH3 CT.19
334
335#ifdef METAC_2_1
336#define TXDEFR CT.20
337#define TXCPRS CT.21
338#endif
339
340#define TXINTERN0 CT.23
341#define TXAMAREG0 CT.24
342#define TXAMAREG1 CT.25
343#define TXAMAREG2 CT.26
344#define TXAMAREG3 CT.27
345#define TXDIVTIME CT.28
346#define TXPRIVEXT CT.29
347#define TXTACTCYC CT.30
348#define TXIDLECYC CT.31
349
350
351
352
353
354
355
356
357
358
359
360
361#define TXENABLE_REGNUM 0
362#define TXENABLE_THREAD_BITS 0x00000700
363#define TXENABLE_THREAD_S 8
364#define TXENABLE_REV_STEP_BITS 0x000000F0
365#define TXENABLE_REV_STEP_S 4
366
367
368
369
370#define TXMODE_REGNUM 1
371#define TXMODE_DEFAULT 0
372
373
374
375
376
377
378#define TXSTATUS_REGNUM 2
379#define TXSTATUS_PSTAT_BIT 0x00020000
380#define TXSTATUS_PSTAT_S 17
381#define TXSTATUS_ISTAT_BIT 0x00010000
382#define TXSTATUS_ISTAT_S 16
383
384
385
386
387#define TXRPT_REGNUM 3
388#define TXTIMER_REGNUM 4
389#define TXL1START_REGNUM 5
390#define TXL1END_REGNUM 6
391#define TXL1COUNT_REGNUM 7
392#define TXL2START_REGNUM 8
393#define TXL2END_REGNUM 9
394#define TXL2COUNT_REGNUM 10
395#define TXBPOBITS_REGNUM 11
396#define TXTIMERI_REGNUM 13
397
398
399
400
401
402#define TXDIVTIME_REGNUM 28
403#define TXDIVTIME_DIV_BITS 0x000000FF
404#define TXDIVTIME_DIV_S 0
405#define TXDIVTIME_DIV_MIN 0x00000001
406#define TXDIVTIME_DIV_MAX 0x00000100
407#define TXDIVTIME_BASE_HZ 1000000
408
409
410
411
412
413
414#define TXPRIVEXT_REGNUM 29
415#define TXPRIVEXT_COPRO_BITS 0xFF000000
416#define TXPRIVEXT_COPRO_S 24
417#ifndef METAC_1_2
418#define TXPRIVEXT_TXTIMER_BIT 0x00080000
419#define TXPRIVEXT_TRACE_BIT 0x00040000
420#endif
421#define TXPRIVEXT_TXTRIGGER_BIT 0x00020000
422#define TXPRIVEXT_TXGBLCREG_BIT 0x00010000
423#define TXPRIVEXT_CBPRIV_BIT 0x00008000
424#define TXPRIVEXT_ILOCK_BIT 0x00004000
425#define TXPRIVEXT_TXITACCYC_BIT 0x00002000
426#define TXPRIVEXT_TXDIVTIME_BIT 0x00001000
427#define TXPRIVEXT_TXAMAREGX_BIT 0x00000800
428#define TXPRIVEXT_TXTIMERI_BIT 0x00000400
429#define TXPRIVEXT_TXSTATUS_BIT 0x00000200
430#define TXPRIVEXT_TXDISABLE_BIT 0x00000100
431#ifndef METAC_1_2
432#define TXPRIVEXT_MINIMON_BIT 0x00000080
433#define TXPRIVEXT_OLDBCCON_BIT 0x00000020
434#define TXPRIVEXT_ALIGNREW_BIT 0x00000010
435#endif
436#define TXPRIVEXT_KEEPPRI_BIT 0x00000008
437#define TXPRIVEXT_TXTOGGLEI_BIT 0x00000001
438
439
440
441
442#define TXTACTCYC_REGNUM 30
443#define TXTACTCYC_COUNT_MASK 0x00FFFFFF
444
445
446
447
448#define TXIDLECYC_REGNUM 31
449#define TXIDLECYC_COUNT_MASK 0x00FFFFFF
450
451
452
453
454
455
456
457
458
459
460#ifndef METAC_1_2
461
462
463
464
465#define TXMODE_RDCPEN_BIT 0x00800000
466#endif
467
468
469
470
471#define TXMODE_A1ADDR_BITS 0x00007000
472#define TXMODE_A1ADDR_S 12
473#define TXMODE_A0ADDR_BITS 0x00000700
474#define TXMODE_A0ADDR_S 8
475#define TXMODE_AXADDR_MODULO 3
476#define TXMODE_AXADDR_REVB 4
477#define TXMODE_AXADDR_REVW 5
478#define TXMODE_AXADDR_REVD 6
479#define TXMODE_AXADDR_REVL 7
480
481
482
483
484#define TXMODE_DXOVERSCALE_BIT 0x00000080
485
486
487
488
489#define TXMODE_M8_BIT 0x00000040
490
491
492
493
494#define TXMODE_DXACCSAT_BIT 0x00000020
495
496
497
498
499#define TXMODE_DXSAT_BIT 0x00000010
500
501
502
503
504#define TXMODE_DXROUNDING_BIT 0x00000008
505
506
507
508
509#define TXMODE_DXPRODSHIFT_BIT 0x00000004
510
511
512
513
514#define TXMODE_DXARITH_BITS 0x00000003
515#define TXMODE_DXARITH_32 3
516#define TXMODE_DXARITH_32H 2
517#define TXMODE_DXARITH_S16 1
518#define TXMODE_DXARITH_16 0
519
520
521
522
523#define TXMRSIZE_REGNUM 12
524#define TXMRSIZE_MIN 0x0002
525#define TXMRSIZE_MAX 0xFFFF
526
527
528
529
530
531#define TXDRCTRL_REGNUM 14
532#define TXDRCTRL_SINESIZE_BITS 0x0F000000
533#define TXDRCTRL_SINESIZE_S 24
534#define TXDRCTRL_RAMSZPOW_BITS 0x001F0000
535#define TXDRCTRL_RAMSZPOW_S 16
536#define TXDRCTRL_D1RSZAND_BITS 0x0000F000
537#define TXDRCTRL_D1RSZAND_S 12
538#define TXDRCTRL_D0RSZAND_BITS 0x000000F0
539#define TXDRCTRL_D0RSZAND_S 4
540
541#define TXDRCTRL_DXSIZE(Pow, AndBits) \
542 ((((~(AndBits)) & 0x0f) + 1) << ((Pow)-4))
543
544
545
546
547#define TXDRSIZE_REGNUM 15
548#define TXDRSIZE_R1MOD_BITS 0xFFFF0000
549#define TXDRSIZE_R1MOD_S 16
550#define TXDRSIZE_R0MOD_BITS 0x0000FFFF
551#define TXDRSIZE_R0MOD_S 0
552
553#define TXDRSIZE_RBRAD_SCALE_BITS 0x70000000
554#define TXDRSIZE_RBRAD_SCALE_S 28
555#define TXDRSIZE_RBMODSIZE_BITS 0x0FFF0000
556#define TXDRSIZE_RBMODSIZE_S 16
557#define TXDRSIZE_RARAD_SCALE_BITS 0x00007000
558#define TXDRSIZE_RARAD_SCALE_S 12
559#define TXDRSIZE_RAMODSIZE_BITS 0x00000FFF
560#define TXDRSIZE_RAMODSIZE_S 0
561
562
563
564
565
566
567
568
569#define TXDEFR_REGNUM 20
570#define TXDEFR_DEFAULT 0
571
572
573
574
575
576#define TXDEFR_BUS_ERR_BIT 0x80000000
577#define TXDEFR_BUS_ERRI_BIT 0x40000000
578#define TXDEFR_BUS_STATE_BITS 0x3F000000
579#define TXDEFR_BUS_STATE_S 24
580#define TXDEFR_BUS_TRIG_BIT 0x00800000
581
582
583
584
585
586#define TXDEFR_BUS_ICTRL_BIT 0x00000080
587
588
589
590
591
592
593
594#define TXAMAREG0_REGNUM 24
595#ifdef METAC_1_2
596#define TXAMAREG0_CTRL_BITS 0x07000000
597#else
598#define TXAMAREG0_RCOFF_BIT 0x08000000
599#define TXAMAREG0_DLINEHLT_BIT 0x04000000
600#define TXAMAREG0_DLINEDIS_BIT 0x02000000
601#define TXAMAREG0_CYCSTRICT_BIT 0x01000000
602#define TXAMAREG0_CTRL_BITS (TXAMAREG0_RCOFF_BIT | \
603 TXAMAREG0_DLINEHLT_BIT | \
604 TXAMAREG0_DLINEDIS_BIT | \
605 TXAMAREG0_CYCSTRICT_BIT)
606#endif
607#define TXAMAREG0_CTRL_S 24
608#define TXAMAREG0_MDM_BIT 0x00400000
609#define TXAMAREG0_MPF_BIT 0x00200000
610#define TXAMAREG0_MPE_BIT 0x00100000
611#define TXAMAREG0_MASK_BITS (TXAMAREG0_MDM_BIT | \
612 TXAMAREG0_MPF_BIT | \
613 TXAMAREG0_MPE_BIT)
614#define TXAMAREG0_MASK_S 20
615#define TXAMAREG0_SDM_BIT 0x00040000
616#define TXAMAREG0_SPF_BIT 0x00020000
617#define TXAMAREG0_SPE_BIT 0x00010000
618#define TXAMAREG0_STATUS_BITS (TXAMAREG0_SDM_BIT | \
619 TXAMAREG0_SPF_BIT | \
620 TXAMAREG0_SPE_BIT)
621#define TXAMAREG0_STATUS_S 16
622#define TXAMAREG0_PRIORITY_BITS 0x0000FF00
623#define TXAMAREG0_PRIORITY_S 8
624#define TXAMAREG0_BVALUE_BITS 0x000000FF
625#define TXAMAREG0_BVALUE_S 0
626
627#define TXAMAREG1_REGNUM 25
628#define TXAMAREG1_DELAYC_BITS 0x07FFFFFF
629#define TXAMAREG1_DELAYC_S 0
630
631#define TXAMAREG2_REGNUM 26
632#ifdef METAC_1_2
633#define TXAMAREG2_DLINEC_BITS 0x00FFFFFF
634#define TXAMAREG2_DLINEC_S 0
635#else
636#define TXAMAREG2_IRQPRIORITY_BIT 0xFF000000
637#define TXAMAREG2_IRQPRIORITY_S 24
638#define TXAMAREG2_DLINEC_BITS 0x00FFFFF0
639#define TXAMAREG2_DLINEC_S 4
640#endif
641
642#define TXAMAREG3_REGNUM 27
643#define TXAMAREG2_AMABLOCK_BIT 0x00080000
644#define TXAMAREG2_AMAC_BITS 0x0000FFFF
645#define TXAMAREG2_AMAC_S 0
646
647
648
649
650
651
652
653
654
655
656
657#define TXMODE_FPURMODE_BITS 0x00030000
658#define TXMODE_FPURMODE_S 16
659#define TXMODE_FPURMODEWRITE_BIT 0x00040000
660
661
662
663
664
665
666#define TXDEFR_FPE_FE_BITS 0x003F0000
667#define TXDEFR_FPE_FE_S 16
668
669#define TXDEFR_FPE_INEXACT_FE_BIT 0x010000
670#define TXDEFR_FPE_UNDERFLOW_FE_BIT 0x020000
671#define TXDEFR_FPE_OVERFLOW_FE_BIT 0x040000
672#define TXDEFR_FPE_DIVBYZERO_FE_BIT 0x080000
673#define TXDEFR_FPE_INVALID_FE_BIT 0x100000
674#define TXDEFR_FPE_DENORMAL_FE_BIT 0x200000
675
676#define TXDEFR_FPE_ICTRL_BITS 0x000003F
677#define TXDEFR_FPE_ICTRL_S 0
678
679#define TXDEFR_FPE_INEXACT_ICTRL_BIT 0x01
680#define TXDEFR_FPE_UNDERFLOW_ICTRL_BIT 0x02
681#define TXDEFR_FPE_OVERFLOW_ICTRL_BIT 0x04
682#define TXDEFR_FPE_DIVBYZERO_ICTRL_BIT 0x08
683#define TXDEFR_FPE_INVALID_ICTRL_BIT 0x10
684#define TXDEFR_FPE_DENORMAL_ICTRL_BIT 0x20
685
686
687
688
689
690
691
692
693
694#define METAG_FPURMODE_TONEAREST 0x0
695#define METAG_FPURMODE_TOWARDZERO 0x1
696#define METAG_FPURMODE_UPWARD 0x2
697#define METAG_FPURMODE_DOWNWARD 0x3
698
699
700
701
702
703
704
705
706
707#define TXMODE_FPURMODE_SET(FPURMode) \
708 (TXMODE_FPURMODEWRITE_BIT + ((FPURMode)<<TXMODE_FPURMODE_S))
709
710
711
712
713
714#define TXMODE_FPURMODE_RESET (TXMODE_FPURMODEWRITE_BIT)
715
716
717
718
719
720#define TXSTATUS_FPACTIVE_BIT 0x01000000
721
722
723
724
725
726
727#define METAG_FPU_FE_INEXACT 0x01
728#define METAG_FPU_FE_UNDERFLOW 0x02
729#define METAG_FPU_FE_OVERFLOW 0x04
730#define METAG_FPU_FE_DIVBYZERO 0x08
731#define METAG_FPU_FE_INVALID 0x10
732#define METAG_FPU_FE_DENORMAL 0x20
733#define METAG_FPU_FE_ALL_EXCEPT (METAG_FPU_FE_INEXACT | \
734 METAG_FPU_FE_UNDERFLOW | \
735 METAG_FPU_FE_OVERFLOW | \
736 METAG_FPU_FE_DIVBYZERO | \
737 METAG_FPU_FE_INVALID | \
738 METAG_FPU_FE_DENORMAL)
739
740
741
742
743
744
745
746
747
748
749
750
751
752#define TXENABLE_MAJOR_REV_BITS 0xFF000000
753#define TXENABLE_MAJOR_REV_S 24
754#define TXENABLE_MINOR_REV_BITS 0x00FF0000
755#define TXENABLE_MINOR_REV_S 16
756#define TXENABLE_CLASS_BITS 0x0000F000
757#define TXENABLE_CLASS_S 12
758#define TXENABLE_CLASS_DSP 0x0
759#define TXENABLE_CLASS_LDSP 0x8
760#define TXENABLE_CLASS_GP 0xC
761#define TXENABLE_CLASSALT_LFPU 0x2
762#define TXENABLE_CLASSALT_FPUR8 0x1
763#define TXENABLE_MTXARCH_BIT 0x00000800
764#define TXENABLE_STEP_REV_BITS 0x000000F0
765#define TXENABLE_STEP_REV_S 4
766#define TXENABLE_STOPPED_BIT 0x00000004
767#define TXENABLE_OFF_BIT 0x00000002
768#define TXENABLE_ENABLE_BIT 0x00000001
769
770
771
772
773#define TXSTATUS_CB1MARKER_BIT 0x00800000
774#define TXSTATUS_CBMARKER_BIT 0x00400000
775#define TXSTATUS_MEM_FAULT_BITS 0x00300000
776#define TXSTATUS_MEM_FAULT_S 20
777#define TXSTATUS_MEMFAULT_NONE 0x0
778#define TXSTATUS_MEMFAULT_GEN 0x1
779#define TXSTATUS_MEMFAULT_PF 0x2
780#define TXSTATUS_MEMFAULT_RO 0x3
781#define TXSTATUS_MAJOR_HALT_BITS 0x000C0000
782#define TXSTATUS_MAJOR_HALT_S 18
783#define TXSTATUS_MAJHALT_TRAP 0x0
784#define TXSTATUS_MAJHALT_INST 0x1
785#define TXSTATUS_MAJHALT_PRIV 0x2
786#define TXSTATUS_MAJHALT_MEM 0x3
787#define TXSTATUS_L_STEP_BITS 0x00000800
788#define TXSTATUS_LSM_STEP_BITS 0x00000700
789#define TXSTATUS_LSM_STEP_S 8
790#define TXSTATUS_FLAG_BITS 0x0000001F
791#define TXSTATUS_SCC_BIT 0x00000010
792#define TXSTATUS_SCF_LZ_BIT 0x00000008
793#define TXSTATUS_SCF_HZ_BIT 0x00000004
794#define TXSTATUS_SCF_HC_BIT 0x00000002
795#define TXSTATUS_SCF_LC_BIT 0x00000001
796#define TXSTATUS_CF_Z_BIT 0x00000008
797#define TXSTATUS_CF_N_BIT 0x00000004
798#define TXSTATUS_CF_O_BIT 0x00000002
799#define TXSTATUS_CF_C_BIT 0x00000001
800
801
802
803
804
805#define TXCATCH0_REGNUM 16
806#define TXCATCH1_REGNUM 17
807#define TXCATCH1_ADDR_BITS 0xFFFFFFFF
808#define TXCATCH1_ADDR_S 0
809#define TXCATCH2_REGNUM 18
810#define TXCATCH2_DATA0_BITS 0xFFFFFFFF
811#define TXCATCH2_DATA0_S 0
812#define TXCATCH3_REGNUM 19
813#define TXCATCH3_DATA1_BITS 0xFFFFFFFF
814#define TXCATCH3_DATA1_S 0
815
816
817
818
819
820
821
822#define TXCATCH0_LDRXX_BITS 0xF8000000
823#define TXCATCH0_LDRXX_S 27
824#define TXCATCH0_LDDST_BITS 0x07FF0000
825#define TXCATCH0_LDDST_S 16
826#define TXCATCH0_LDDST_D1DSP 0x400
827#define TXCATCH0_LDDST_D0DSP 0x200
828#define TXCATCH0_LDDST_TMPLT 0x100
829#define TXCATCH0_LDDST_TR 0x080
830#ifdef METAC_2_1
831#define TXCATCH0_LDDST_FPU 0x040
832#endif
833#define TXCATCH0_LDDST_PC 0x020
834#define TXCATCH0_LDDST_A1 0x010
835#define TXCATCH0_LDDST_A0 0x008
836#define TXCATCH0_LDDST_D1 0x004
837#define TXCATCH0_LDDST_D0 0x002
838#define TXCATCH0_LDDST_CT 0x001
839#ifdef METAC_2_1
840#define TXCATCH0_WATCHSTOP_BIT 0x00004000
841#endif
842#define TXCATCH0_WATCHS_BIT 0x00004000
843#define TXCATCH0_WATCH1_BIT 0x00002000
844#define TXCATCH0_WATCH0_BIT 0x00001000
845#define TXCATCH0_FAULT_BITS 0x00000C00
846#define TXCATCH0_FAULT_S 10
847#define TXCATCH0_PRIV_BIT 0x00000200
848#define TXCATCH0_READ_BIT 0x00000100
849
850#ifdef METAC_2_1
851
852#define TXCATCH0_LNKGET_MARKER_BIT 0x00000008
853#define TXCATCH0_PREPROC_BIT 0x00000004
854#endif
855
856
857#define TXCATCH0_LDM16_BIT 0x00000004
858#define TXCATCH0_LDL2L1_BITS 0x00000003
859#define TXCATCH0_LDL2L1_S 0
860
861
862#define TXCATCH0_RAXX_BITS 0x0000001F
863#define TXCATCH0_RAXX_S 0
864
865
866#define TXCATCH0_WMASK_BITS 0x000000FF
867#define TXCATCH0_WMASK_S 0
868
869#ifdef METAC_2_1
870
871
872#define TXCATCH0_FPURDREG_BITS 0xF8000000
873#define TXCATCH0_FPURDREG_S 27
874#define TXCATCH0_FPUR1REG_BITS 0x07C00000
875#define TXCATCH0_FPUR1REG_S 22
876#define TXCATCH0_FPUSPEC_BITS 0x000F0000
877#define TXCATCH0_FPUSPEC_S 16
878#define TXCATCH0_FPUSPEC_TAG 0xF
879#define TXCATCH0_FPUINSTA_BIT 0x00001000
880#define TXCATCH0_FPUINSTQ_BIT 0x00000800
881#define TXCATCH0_FPUINSTZ_BIT 0x00000400
882#define TXCATCH0_FPUINSTN_BIT 0x00000200
883#define TXCATCH0_FPUINSTO3O_BIT 0x00000100
884#define TXCATCH0_FPUWIDTH_BITS 0x000000C0
885#define TXCATCH0_FPUWIDTH_S 6
886#define TXCATCH0_FPUWIDTH_FLOAT 0
887#define TXCATCH0_FPUWIDTH_DOUBLE 1
888#define TXCATCH0_FPUWIDTH_PAIRED 2
889#define TXCATCH0_FPUOPENC_BITS 0x0000003F
890#define TXCATCH0_FPUOPENC_S 0
891#define TXCATCH0_FPUOPENC_ADD 0
892#define TXCATCH0_FPUOPENC_SUB 1
893#define TXCATCH0_FPUOPENC_MUL 2
894#define TXCATCH0_FPUOPENC_ATOI 3
895#define TXCATCH0_FPUOPENC_ATOX 4
896#define TXCATCH0_FPUOPENC_ITOA 5
897#define TXCATCH0_FPUOPENC_XTOA 6
898#define TXCATCH0_FPUOPENC_ATOH 7
899#define TXCATCH0_FPUOPENC_HTOA 8
900#define TXCATCH0_FPUOPENC_DTOF 9
901#define TXCATCH0_FPUOPENC_FTOD 10
902#define TXCATCH0_FPUOPENC_DTOL 11
903#define TXCATCH0_FPUOPENC_LTOD 12
904#define TXCATCH0_FPUOPENC_DTOXL 13
905#define TXCATCH0_FPUOPENC_XLTOD 14
906#define TXCATCH0_FPUOPENC_CMP 15
907#define TXCATCH0_FPUOPENC_MIN 16
908#define TXCATCH0_FPUOPENC_MAX 17
909#define TXCATCH0_FPUOPENC_ADDRE 18
910#define TXCATCH0_FPUOPENC_SUBRE 19
911#define TXCATCH0_FPUOPENC_MULRE 20
912#define TXCATCH0_FPUOPENC_MXA 21
913#define TXCATCH0_FPUOPENC_MXAS 22
914#define TXCATCH0_FPUOPENC_MAR 23
915#define TXCATCH0_FPUOPENC_MARS 24
916#define TXCATCH0_FPUOPENC_MUZ 25
917#define TXCATCH0_FPUOPENC_MUZS 26
918#define TXCATCH0_FPUOPENC_RCP 27
919#define TXCATCH0_FPUOPENC_RSQ 28
920
921
922#define TXCATCH1_FPUR2REG_BITS 0xF8000000
923#define TXCATCH1_FPUR2REG_S 27
924#define TXCATCH1_FPUR3REG_BITS 0x07C00000
925#define TXCATCH1_FPUR3REG_S 22
926#define TXCATCH1_FPUIMM16_BITS 0x0000FFFF
927#define TXCATCH1_FPUIMM16_S 0
928
929#endif
930
931
932
933
934
935#define TXDIVTIME_CBBASE_MASK 0x03FFFE00
936#define TXDIVTIME_CBBASE_LINBASE 0x80000000
937#define TXDIVTIME_CBBASE_LINBOFF 0x00000000
938#define TXDIVTIME_CBBASE_LINIOFF 0x00000100
939
940
941
942
943
944
945
946#define TXDIVTIME_RPDIRTY_BIT 0x80000000
947
948
949
950
951
952
953
954
955
956#define TXDIVTIME_IRQENC_BITS 0x0F000000
957#define TXDIVTIME_IRQENC_S 24
958
959
960
961
962
963
964
965
966
967
968#define TXDIVTIME_RPMASK_BITS 0x003F0000
969#define TXDIVTIME_RPMASK_S 16
970
971
972
973
974
975#define TXPRIVEXT_TXSTEP_BIT 0x00000004
976#define TXPRIVEXT_MEMCHECK_BIT 0x00000002
977
978
979
980
981#define TXINTERN0_REGNUM 23
982#define TXINTERN0_LOCK2_BITS 0xF0000000
983#define TXINTERN0_LOCK2_S 28
984#define TXINTERN0_LOCK1_BITS 0x0F000000
985#define TXINTERN0_LOCK1_S 24
986#define TXINTERN0_TIFDF_BITS 0x0000F000
987#define TXINTERN0_TIFDF_S 12
988#define TXINTERN0_TIFIB_BITS 0x00000F00
989#define TXINTERN0_TIFIB_S 8
990#define TXINTERN0_TIFAF_BITS 0x000000F0
991#define TXINTERN0_TIFAF_S 4
992#define TXINTERN0_MSTATE_BITS 0x0000000F
993#define TXINTERN0_MSTATE_S 0
994
995
996
997
998
999#define TXSTAT_REGNUM 0
1000#define TXSTAT_TIMER_BIT 0x00000001
1001#define TXSTAT_TIMER_S 0
1002#define TXSTAT_KICK_BIT 0x00000002
1003#define TXSTAT_KICK_S 1
1004#define TXSTAT_DEFER_BIT 0x00000008
1005#define TXSTAT_DEFER_S 3
1006#define TXSTAT_EXTTRIG_BITS 0x0000FFF0
1007#define TXSTAT_EXTTRIG_S 4
1008#define TXSTAT_FPE_BITS 0x003F0000
1009#define TXSTAT_FPE_S 16
1010#define TXSTAT_FPE_DENORMAL_BIT 0x00200000
1011#define TXSTAT_FPE_DENORMAL_S 21
1012#define TXSTAT_FPE_INVALID_BIT 0x00100000
1013#define TXSTAT_FPE_INVALID_S 20
1014#define TXSTAT_FPE_DIVBYZERO_BIT 0x00080000
1015#define TXSTAT_FPE_DIVBYZERO_S 19
1016#define TXSTAT_FPE_OVERFLOW_BIT 0x00040000
1017#define TXSTAT_FPE_OVERFLOW_S 18
1018#define TXSTAT_FPE_UNDERFLOW_BIT 0x00020000
1019#define TXSTAT_FPE_UNDERFLOW_S 17
1020#define TXSTAT_FPE_INEXACT_BIT 0x00010000
1021#define TXSTAT_FPE_INEXACT_S 16
1022#define TXSTAT_BUSERR_BIT 0x00800000
1023#define TXSTAT_BUSERR_S 23
1024#define TXSTAT_BUSSTATE_BITS 0xFF000000
1025#define TXSTAT_BUSSTATE_S 24
1026#define TXSTAT_KICKCNT_BITS 0xFFFF0000
1027#define TXSTAT_KICKCNT_S 16
1028#define TXMASK_REGNUM 1
1029#define TXSTATI_REGNUM 2
1030#define TXSTATI_BGNDHALT_BIT 0x00000004
1031#define TXMASKI_REGNUM 3
1032#define TXPOLL_REGNUM 4
1033#define TXPOLLI_REGNUM 6
1034
1035
1036
1037
1038
1039
1040#define TXDRCTRL_D1PARTOR_BITS 0x00000F00
1041#define TXDRCTRL_D1PARTOR_S 8
1042#define TXDRCTRL_D0PARTOR_BITS 0x0000000F
1043#define TXDRCTRL_D0PARTOR_S 0
1044
1045#define TXDRCTRL_DXBASE(Pow, Or) ((Or)<<((Pow)-4))
1046
1047
1048
1049
1050
1051
1052
1053
1054#define TTEXEC TT.0
1055#define TTCTRL TT.1
1056#define TTMARK TT.2
1057#define TTREC TT.3
1058#define GTEXEC TT.4
1059
1060#define TTEXEC_REGNUM 0
1061#define TTEXEC_EXTTRIGAND_BITS 0x7F000000
1062#define TTEXEC_EXTTRIGAND_S 24
1063#define TTEXEC_EXTTRIGEN_BIT 0x00008000
1064#define TTEXEC_EXTTRIGMATCH_BITS 0x00007F00
1065#define TTEXEC_EXTTRIGMATCH_S 8
1066#define TTEXEC_TCMODE_BITS 0x00000003
1067#define TTEXEC_TCMODE_S 0
1068
1069#define TTCTRL_REGNUM 1
1070#define TTCTRL_TRACETT_BITS 0x00008000
1071#define TTCTRL_TRACETT_S 15
1072#define TTCTRL_TRACEALL_BITS 0x00002000
1073#define TTCTRL_TRACEALL_S 13
1074#ifdef METAC_2_1
1075#define TTCTRL_TRACEALLTAG_BITS 0x00000400
1076#define TTCTRL_TRACEALLTAG_S 10
1077#endif
1078#define TTCTRL_TRACETAG_BITS 0x00000200
1079#define TTCTRL_TRACETAG_S 9
1080#define TTCTRL_TRACETTPC_BITS 0x00000080
1081#define TTCTRL_TRACETTPC_S 7
1082#define TTCTRL_TRACEMPC_BITS 0x00000020
1083#define TTCTRL_TRACEMPC_S 5
1084#define TTCTRL_TRACEEN_BITS 0x00000008
1085#define TTCTRL_TRACEEN_S 3
1086#define TTCTRL_TRACEEN1_BITS 0x00000004
1087#define TTCTRL_TRACEEN1_S 2
1088#define TTCTRL_TRACEPC_BITS 0x00000002
1089#define TTCTRL_TRACEPC_S 1
1090
1091#ifdef METAC_2_1
1092#define TTMARK_REGNUM 2
1093#define TTMARK_BITS 0xFFFFFFFF
1094#define TTMARK_S 0x0
1095
1096#define TTREC_REGNUM 3
1097#define TTREC_BITS 0xFFFFFFFFFFFFFFFF
1098#define TTREC_S 0x0
1099#endif
1100
1101#define GTEXEC_REGNUM 4
1102#define GTEXEC_DCRUN_BITS 0x80000000
1103#define GTEXEC_DCRUN_S 31
1104#define GTEXEC_ICMODE_BITS 0x0C000000
1105#define GTEXEC_ICMODE_S 26
1106#define GTEXEC_TCMODE_BITS 0x03000000
1107#define GTEXEC_TCMODE_S 24
1108#define GTEXEC_PERF1CMODE_BITS 0x00040000
1109#define GTEXEC_PERF1CMODE_S 18
1110#define GTEXEC_PERF0CMODE_BITS 0x00010000
1111#define GTEXEC_PERF0CMODE_S 16
1112#define GTEXEC_REFMSEL_BITS 0x0000F000
1113#define GTEXEC_REFMSEL_S 12
1114#define GTEXEC_METRICTH_BITS 0x000003FF
1115#define GTEXEC_METRICTH_S 0
1116
1117#ifdef METAC_2_1
1118
1119
1120
1121
1122#define TXCLKCTRL_REGNUM 22
1123
1124
1125
1126
1127
1128
1129#define TXCLKCTRL_ALL_OFF 0x02222222
1130#define TXCLKCTRL_ALL_DEFON 0x01111111
1131#define TXCLKCTRL_ALL_AUTO 0x02222222
1132
1133
1134
1135
1136#define TXCLKCTRL_CLOCKIC_BITS 0x03000000
1137#define TXCLKCTRL_CLOCKIC_S 24
1138#define TXCLKCTRL_CLOCKDC_BITS 0x00300000
1139#define TXCLKCTRL_CLOCKDC_S 20
1140#define TXCLKCTRL_CLOCKFP_BITS 0x00030000
1141#define TXCLKCTRL_CLOCKFP_S 16
1142#define TXCLKCTRL_CLOCKD1_BITS 0x00003000
1143#define TXCLKCTRL_CLOCKD1_S 12
1144#define TXCLKCTRL_CLOCKD0_BITS 0x00000300
1145#define TXCLKCTRL_CLOCKD0_S 8
1146#define TXCLKCTRL_CLOCKA1_BITS 0x00000030
1147#define TXCLKCTRL_CLOCKA1_S 4
1148#define TXCLKCTRL_CLOCKA0_BITS 0x00000003
1149#define TXCLKCTRL_CLOCKA0_S 0
1150
1151
1152
1153
1154#define TXCLKCTRL_CLOCKxx_OFF 0
1155#define TXCLKCTRL_CLOCKxx_DEFON 1
1156#define TXCLKCTRL_CLOCKxx_AUTO 2
1157
1158#endif
1159
1160#ifdef METAC_2_1
1161
1162
1163
1164
1165#define TXSTATUS_IPTOGGLE_BIT 0x80000000
1166#define TXSTATUS_ISTATE_BIT 0x40000000
1167#define TXSTATUS_IWAIT_BIT 0x20000000
1168#define TXSTATUS_IEXCEPT_BIT 0x10000000
1169#define TXSTATUS_IRPCOUNT_BITS 0x0E000000
1170#define TXSTATUS_IRPCOUNT_S 25
1171#define TXSTATUS_IRQSTAT_BITS 0x0000F000
1172#define TXSTATUS_IRQSTAT_S 12
1173#define TXSTATUS_LNKSETOK_BIT 0x00000020
1174
1175
1176#define TXDIVTIME_IACTIVE_BIT 0x00008000
1177#define TXDIVTIME_INONEST_BIT 0x00004000
1178#define TXDIVTIME_IREGIDXGATE_BIT 0x00002000
1179#define TXDIVTIME_IREGIDX_BITS 0x00001E00
1180#define TXDIVTIME_IREGIDX_S 9
1181#define TXDIVTIME_NOST_BIT 0x00000100
1182#endif
1183
1184#endif
1185