mi-spec.html
44.4 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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
<html>
<head>
<title>
Project BB - MI Specification
</title>
</head>
<body bgcolor="#ffffff" text="#000000"
link="#004868" vlink="#986424" alink="#00ffff">
<table width="100%" cellpadding=2 cellspacing=0 border=0>
<tr>
<td bgcolor="#e0e0e0">
Project BB - MI Specification
</td>
<td align=right bgcolor="#f0c0c0" width="20%">
<font color=red>
<b>Broad<i>On</i> confidential</b>
</font>
</td>
</tr>
</table>
<p>
<b><u> Index </u></b>
<p>
<dl>
<dd> <a href="vr4300-man.pdf">NEC Vr4300 User's Manual</a>
<dd> <a href=#arch>MI Architecture</a>
<dd> <a href=#reqtypes>CPU Request Types</a>
<dd> <a href=#berr>Bus Error Handling</a>
<dd> <a href=#addrspc>Memory and Register Spaces</a>
<dd> <a href=#comregs>Compatible MI Registers</a>
<dd> <a href=#newregs>New MI Registers</a>
<dd> <a href=#reset>Reset</a>
<dd> <a href=#intr>Interrupts</a>
<dd> <a href=#virage>Virage Interface and Control</a>
</dl>
<a name="arch">
<p>
<b><u> MI Architecture </u></b>
<p>
NECs embedded Vr4300 core features an unidirectional SYSAD interface.
The only difference to the chip version is that the bi-directional
drivers have been removed. The protocol itself has not changed, there
can still be only one outstanding request. BroadOn has requested from
NEC support for PLL clock multipliers of x1, x1.5 and x2.
<p>
<img src="mi-unibus.gif" width=640 height=214 border=0>
<p>
The MI is pretty much a pass-through block between the proceesor's
SYSAD interface and the system's control bus (cbus) and the data bus
(dbus). Five new blocks implement new functions and security features.
The <i>security module</i> controls system wide access to security
sensitive information, as well as entering and leaving of
<a href="secure-mode.html">secure mode</a>.
The <i>Boot ROM</i> (brom) contains the boot loader that brings in
the <i>secure kernel</i> from external flash into the <i>boot SRAM</i>
(bram) for execution. The <i>iram</i> can be configured for secure
or application mode, its general purpose is emulation support. Three
<i>Virage Flash Blocks</i> (v0, v1, and v2) contain security related
data. Flash v0 and v1 store 512bits (16 words x32). Flash v2 is 2kbits
in size (64 words x32) and contains fixed security bits, such as the
private key. It is programmed through the JTAG chain and can be used
to patch code.
<p>
<img src="mi-block.gif" width=640 height=480 border=0>
<a name="reqtypes">
<p>
<b><u> CPU Request Types </u></b>
<p>
The cpu can issue two basic types of requests; single and block requests.
Single requests are triggered by accesses to uncached or write-through
spaces and move 1..4 bytes of data. Block requests of size 8 (doubleword)
are issued by doubleword loads or stores to uncached or write-through
spaces and move exactly 8 bytes. They are only issued when the cpu is
in 64-bit mode. Block requests of size 16 move a data cache line between
the cpu and cacheable memory. Block requests of size 32 move an instruction
cache line.
<a name="berr">
<p>
<b><u> Bus Error Handling </u></b>
<p>
The SYSAD bus has no means to signal a failed write request back to the
cpu pipe. The only way to aid debug and access control is through external
interrupts or nmi. Logic in the MI has to capture the invalid address,
access type and write data for the exception or emulation handler. A cycle
accurate restart is impractical when interrupts are used, because the
program counter in the cpu pipe can advance during disabled interrupts.
Besides, large error state storage and instruction backtrace in software
would be required. To fully emulate cycle accuracy, nmi must be used.
Erroneous read requests can signal a bus error in the read response to
the cpu. A cpu pipeline restart is possible. The BB MI has only one
capture register to hold the first failed write. Multiple write errors
before the registers have been read, set a <i>multiple bit</i>. A <i>write
error interrupt</i> is raised upon capture of a failed write.
<a name="addrspc">
<p>
<b><u> Memory and Register Spaces </u></b>
<p>
The system implementation of the control bus (cbus) and data bus (dbus)
puts access limits on various address spaces. Main memory (dbus bus
through ri), the boot ROM (brom), the boot SRAM (bram), the internal sram
(iram), and all virage shadow SRAMs (v0, v1, v2) are the only spaces
that support both single (uncached) and block (cached) accesses. All
other spaces are defined as register spaces and only support single
reads and writes because they use the cbus. Furthermore, all register
space accesses read or write all 32 bits of data, thus forcing 32-bit
alignment of addresses without byte write capability. The behavior for
block requests to register spaces is programmable. Illegal block reads
can either return a bus error to invalidate the cache line, or return
undefined data. Illegal block writes can be ignored, raise the write error
interrupt or raise the secure kernel trap.
Below table lists the MI actions in the various address spaces.
If a particular memory device is smaller than the listed space, then the
device appears mirrored multiple times.
<pre>
address range size dev MI
--------------------------------------------------------------------------------
0x80000000 ... 0xffffffff 2GB ri cbus dma request
0x1fd00000 ... 0x7fffffff 1.5GB pi io 1, cbus read/write request
0x1fcc0000 ... 0x1fcfffff 256kB mi writes ignored, reads 0;
0x1fcb0000 ... 0x1fcbffff 64kB mi writes ignored, reads 0;
0x1fca0000 ... 0x1fcaffff 64kB mi virage 2, 2kbits;
0x1fc90000 ... 0x1fc9ffff 64kB mi virage 1, 512bits;
0x1fc80000 ... 0x1fc8ffff 64kB mi virage 0, 512bits;
0x1fc80000 ... 0x1fcbffff 256kB mi virage flash space
0x1fc40000 ... 0x1f7fffff 256kB mi iram, no cbus request
0x1fc00800 ... 0x1f37ffff 254kB mi brom/bram, no cbus request
0x1fc007c0 ... 0x1fc007ff 64B mi brom/bram, no cbus request
optional bus/write error
0x1fc00000 ... 0x1fc007bf 1984B mi brom/bram, no cbus request
0x10000000 ... 0x1fbfffff 252MB pi io 1, cbus read/write request
0x08000000 ... 0x0fffffff 128MB pi io 2, cbus read/write request
0x06000000 ... 0x07ffffff 32MB pi io 1, cbus read/write request
0x05000000 ... 0x05ffffff 16MB pi io 2, cbus read/write request
0x04300000 ... 0x043fffff 1MB mi mi registers, no cbus request
0x04000000 ... 0x04ffffff 16MB all cbus read/write request
0x03000000 ... 0x03ffffff 16MB mi writes dropped, reads return 0
optional bus/write error
0x01000000 ... 0x02ffffff 32MB ri cbus dma request
0x00000000 ... 0x00ffffff 16MB ri cbus dma request
</pre>
<a name="comregs">
<p>
<b><u> Compatible MI Registers </u></b>
<p>
Below table lists all compatible MI registers. None of the special
modes that were enabled through the MI_MODE register in N64 are
implemented. The RDRAM register mode has been replaced by registers
in the RI for configuration of the main memory interface. The ebus
test mode is not needed, because the x64 main memory space allows
access to all bits of the DDR memory. The init mode has been removed
as well. It was also related to RDRAM setup. Scan and JTAG cover
manufacturing and debug requirements.
<p>
<table cellpadding=2 cellspacing=2 border=1>
<tr>
<td> Name </td>
<td> Address </td>
<td> Data </td>
<td> Read/Write </td>
<td> Reset </td>
<td> N64 </td>
<td> Description </td>
</tr>
<tr>
<td> MI_MODE </td>
<td> 0x0430_0000 </td>
<td> [31:14] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> write data are ignored; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [13] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> set RDRAM register mode; <br>
ignored in bcp; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [12] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> clear RDRAM register mode; <br>
ignored in bcp; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [11] </td>
<td> W CLR_DPINTR </td>
<td> - </td>
<td> y </td>
<td> clear DP interrupt; <br>
writing 1 clears DP interrupt; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [10] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> set ebus test mode; <br>
ignored in bcp; <br>
ebus test is covered by scan/jtag; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [9] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> clear ebus test mode; <br>
ignored in bcp; <br>
ebus test is covered by scan/jtag; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [8] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> set init mode; <br>
ignored in bcp; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> clear init mode; <br>
ignored in bcp; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [6:0] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> init mode length; <br>
ignored in bcp; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31:10] </td>
<td> R </td>
<td> 0 </td>
<td> y </td>
<td> reads return 0; </td>
<tr>
<td> </td>
<td> </td>
<td> [9] </td>
<td> R </td>
<td> 0 </td>
<td> y </td>
<td> RDRAM register mode; <br>
bcp returns 0 as there is no such mode; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [8] </td>
<td> R </td>
<td> 0 </td>
<td> y </td>
<td> ebus test mode; <br>
bcp returns 0 as there is no such mode; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7] </td>
<td> R </td>
<td> 0 </td>
<td> y </td>
<td> init mode; <br>
bcp returns 0 as there is no such mode; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [6:0] </td>
<td> R </td>
<td> 0 </td>
<td> y </td>
<td> init mode length; <br>
bcp returns 0 as there is no such mode; <br>
</td>
</tr>
<tr>
<td> MI_VERSION </td>
<td> 0x0430_0004 </td>
<td> [31:0] </td>
<td> RO VERSION </td>
<td> 0x0202b0b0 </td>
<td> y </td>
<td> version number, same as N64; <br>
[31:24] is RSP version; <br>
[23:16] is RDP version; <br>
[15:8] is RI version; <br>
[7:0] is IO version; <br>
writes are ignored; <br>
</td>
</tr>
<tr>
<td> MI_INTR </td>
<td> 0x0430_0008 </td>
<td> [31:0] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> writes are ignored; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31:6] </td>
<td> RO </td>
<td> 0 </td>
<td> y </td>
<td> reads return 0; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [5] </td>
<td> RO DP_INTR </td>
<td> 0 </td>
<td> y </td>
<td> status of dp interrupt; <br>
set by dp unit; <br>
cleared by writing 1 to MI_MODE bit 11; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [4] </td>
<td> RO PI_INTR </td>
<td> 0 </td>
<td> y </td>
<td> status of pi dma interrupt; <br>
set and cleared by pi dma; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [3] </td>
<td> RO VI_INTR </td>
<td> 0 </td>
<td> y </td>
<td> status of vi interrupt; <br>
set and cleared by vi; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [2] </td>
<td> RO AI_INTR </td>
<td> 0 </td>
<td> y </td>
<td> status of ai interrupt; <br>
set and cleared by ai; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [1] </td>
<td> RO SI_INTR </td>
<td> 0 </td>
<td> y </td>
<td> status of si interrupt; <br>
set and cleared by si; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [0] </td>
<td> RO SP_INTR </td>
<td> 0 </td>
<td> y </td>
<td> status of sp interrupt; <br>
set and cleared by sp; <br>
</td>
</tr>
<tr>
<td> MI_MASK </td>
<td> 0x0430_000c </td>
<td> [31:12] </td>
<td> W </td>
<td> - </td>
<td> y </td>
<td> writes are ignored; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [11:10] </td>
<td> W <br> SET_DP_MASK <br> CLR_DP_MASK </td>
<td> - </td>
<td> y </td>
<td> writing 10 sets dp interrupt mask; <br>
writing 01 clears dp interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [9:8] </td>
<td> W <br> SET_PI_MASK <br> CLR_PI_MASK</td>
<td> - </td>
<td> y </td>
<td> writing 10 sets pi interrupt mask; <br>
writing 01 clears pi interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7:6] </td>
<td> W <br> SET_VI_MASK <br> CLR_VI_MASK</td>
<td> - </td>
<td> y </td>
<td> writing 10 sets vi interrupt mask; <br>
writing 01 clears vi interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [5:4] </td>
<td> W <br> SET_AI_MASK <br> CLR_AI_MASK </td>
<td> - </td>
<td> y </td>
<td> writing 10 sets ai interrupt mask; <br>
writing 01 clears ai interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [3:2] </td>
<td> W <br> SET_SI_MASK <br> CLR_SI_MASK </td>
<td> - </td>
<td> y </td>
<td> writing 10 sets si interrupt mask; <br>
writing 01 clears si interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [1:0] </td>
<td> W <br> SET_SP_MASK <br> CLR_SP_MASK </td>
<td> - </td>
<td> y </td>
<td> writing 10 sets sp interrupt mask; <br>
writing 01 clears sp interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31:6] </td>
<td> R </td>
<td> 0 </td>
<td> y </td>
<td> reads return 0; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [5] </td>
<td> R DP_MASK </td>
<td> 0 </td>
<td> y </td>
<td> returns dp interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [4] </td>
<td> R PI_MASK </td>
<td> 0 </td>
<td> y </td>
<td> returns pi dma interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [3] </td>
<td> R VI_MASK </td>
<td> 0 </td>
<td> y </td>
<td> returns vi interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [2] </td>
<td> R AI_MASK </td>
<td> 0 </td>
<td> y </td>
<td> returns ai interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [1] </td>
<td> R SI_MASK </td>
<td> 0 </td>
<td> y </td>
<td> returns si interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [0] </td>
<td> R SP_MASK </td>
<td> 0 </td>
<td> y </td>
<td> returns sp interrupt mask; </td>
</tr>
</table>
<a name="newregs">
<p>
<b><u> New MI Registers </u></b>
<p>
All new MI registers control new functions and the security features.
XXX
<p>
<table cellpadding=2 cellspacing=2 border=1>
<tr>
<td> Name </td>
<td> Address </td>
<td> Data </td>
<td> Read/Write </td>
<td> Reset </td>
<td> N64 </td>
<td> Description </td>
</tr>
<tr>
<td> MI_CTRL </td>
<td> 0x0430_0010 </td>
<td> [31:20] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> write data are ignored; <br>
reads return 0; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [19] </td>
<td> RW UNMASK_IDE </td>
<td> 0 </td>
<td> n </td>
<td> 1 enables ide interrupt mask regardless of the setting
in the MI_EMASK register;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [18] </td>
<td> RW SKI_PIF </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable secure kernel trap on writes to PIF RAM;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [17] </td>
<td> RW WEI_PIF </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable write error interrupt on writes to PIF RAM;
reading MI_ER_INFO clears the interrupt;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [16] </td>
<td> RW BER_PIF </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable bus error on reads from PIF RAM in non-secure mode;
0 reads return brom/bram data;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [15] </td>
<td> RW SKI_BNM </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable secure kernel trap on block writes
(cacheable) to non-memory spaces;
0 writes are ignored;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [14] </td>
<td> RW WEI_BNM </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable write error interrupt on block writes
(cacheable) to non-memory spaces;
0 writes are ignored;
reading MI_ER_INFO clears the interrupt;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [13] </td>
<td> RW BER_BNM </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable bus error on block reads
(cacheable) from non-memory spaces;
0 reads return undefined data;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [12] </td>
<td> WO SOFTRST </td>
<td> 0 </td>
<td> n </td>
<td> 1 cpu executes warm reset sequence;
warm reset takes 64 sysclks;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [11] </td>
<td> WO COLDRST </td>
<td> 0 </td>
<td> n </td>
<td> 1 change cpu divide mode;
cpu executes cold reset sequence;
cold reset takes 64k sysclks;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [10:8] </td>
<td> RW DIV_MODE </td>
<td> - </td>
<td> n </td>
<td> cpu pipeline clock multiplier; <br>
000 = sysclk x 1; <br>
001 = sysclk x 1.5; <br>
010 = sysclk x 2; <br>
011 = sysclk x 3; <br>
all others are reserved; <br>
set to 000 on pin reset; <br>
not modified by internal resets; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7:0] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> write data are ignored; <br>
reads return 0; <br>
</td>
</tr>
<tr>
<td> MI_SEC_MODE </td>
<td> 0x0430_0014 <br> non-secure mode </td>
<td> [31:0] </td>
<td> W </td>
<td> - </td>
<td> n </td>
<td> writes are ignored; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31:0] </td>
<td> R </td>
<td> - </td>
<td> n </td>
<td> single reads arm the logic to enter secure mode and return 0;
secure mode is entered during the issue phase of the next single
read from address 0x1fc0_0000, valid boot vector data are returned
for this fetch;
</td>
</tr>
<tr>
<td> </td>
<td> 0x0430_0014 <br> secure mode </td>
<td> [31:27] </td>
<td> RW </td>
<td> 0 </td>
<td> n </td>
<td> write data are ignored; <br>
reads return 0; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [26] </td>
<td> RW SMD_EN </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable secure md trap; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [25] </td>
<td> RW SBUT_EN </td>
<td> 0 </td>
<td> n </td>
<td> 1 enable secure button trap; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [24] </td>
<td> RW IRAM_EN </td>
<td> 0 </td>
<td> n </td>
<td> iram accessibility; <br>
1 in non-secure mode; <br>
0 only in secure mode; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [23:8] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> write data are ignore; <br>
reads return 0; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7] </td>
<td> RW SMD </td>
<td> 0 </td>
<td> n </td>
<td> 1 secure mode triggered by md;
NMI stays asserted as long as SMD, SBUT, STRAP, SFATAL, SAPP or STIMER are 1;
must be written with 0 to re-enable nmi;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [6] </td>
<td> RW SBUT </td>
<td> 0 </td>
<td> n </td>
<td> 1 secure mode triggered by button;
NMI stays asserted as long as SMD, SBUT, STRAP, SFATAL, SAPP or STIMER are 1;
must be written with 0 to re-enable nmi;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [5] </td>
<td> RW STRAP </td>
<td> 0 </td>
<td> n </td>
<td> 1 secure mode triggered by emulation trap;
source is any of the SKI_* bits in MI_CTRL; <br>
NMI stays asserted as long as SMD, SBUT, STRAP, SFATAL, SAPP or STIMER are 1;
must be written with 0 to re-enable nmi;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [4] </td>
<td> RW SFATAL </td>
<td> 0 </td>
<td> n </td>
<td> 1 secure mode triggered by fatal pi error; <br>
NMI stays asserted as long as SMD, SBUT, STRAP, SFATAL, SAPP or STIMER are 1;
must be written with 0 to re-enable nmi;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [3] </td>
<td> RW STIMER </td>
<td> 0 </td>
<td> n </td>
<td> 1 secure mode triggered by timer; <br>
NMI stays asserted as long as SMD, SBUT, STRAP, SFATAL, SAPP or STIMER are 1;
must be written with 0 to re-enable nmi;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [2] </td>
<td> RW SAPP </td>
<td> 0 </td>
<td> n </td>
<td> 1 secure mode triggered by application; <br>
NMI stays asserted as long as SMD, SBUT, STRAP, SFATAL, SAPP or STIMER are 1;
must be written with 0 to re-enable nmi;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [1] </td>
<td> RW RESET </td>
<td> 1 </td>
<td> n </td>
<td> brom/bram address space control; <br>
set to 1 at reset; <br>
1 brom 1fc0_0000, bram 1fc2_0000; <br>
0 bram 1fc0_0000, brom 1fc2_0000; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [0] </td>
<td> R SECURE </td>
<td> 1 </td>
<td> n </td>
<td> 1 if in secure mode; <br>
writing 1 keeps secure mode on; <br>
writing 0 leaves secure mode; <br>
</td>
</tr>
<tr>
<td> MI_SEC_TIMER </td>
<td> 0x0430_0018 <br> non-secure mode </td>
<td> [31:0] </td>
<td> RW </td>
<td> - </td>
<td> n </td>
<td> writes are ignored; <br>
reads return 0; <br>
the pre-scaler is used to divide the system clock before driving
the counter timer; a value of n for the pre-scaler divides the system
clock by n+1;
</td>
</tr>
<tr>
<td> </td>
<td> 0x0430_0018 <br> secure mode </td>
<td> [31:16] </td>
<td> W </td>
<td> 0 </td>
<td> n </td>
<td> writes set the pre-scaler; <br>
writing 0 disables the secure timer;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31:16] </td>
<td> R </td>
<td> x </td>
<td> n </td>
<td> current value of timer counter; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [15:0] </td>
<td> RW </td>
<td> x </td>
<td> n </td>
<td> timer start value; <br>
the counter is loaded with start value, then decrements;
upon reaching 0, the secure timer trap is triggered;
</td>
</tr>
<tr>
<td> MI_SEC_VTIME </td>
<td> 0x0430_001c <br> non-secure mode </td>
<td> [31:0] </td>
<td> RW </td>
<td> - </td>
<td> n </td>
<td> writes are ignored; <br>
reads return 0; <br>
</td>
</tr>
<tr>
<td> </td>
<td> 0x0430_001c <br> secure mode </td>
<td> [31:17] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> reserved; <br>
writes are ignored; <br>
reads return 0; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [16] </td>
<td> RO </td>
<td> - </td>
<td> n </td>
<td> current state of time base clock; <br>
restarts on new time base value;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [15:8] </td>
<td> RO </td>
<td> - </td>
<td> n </td>
<td> current count of time base divider; <br>
loaded from time base value when 0; <br>
counter decrements;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7:0] </td>
<td> RW </td>
<td> 62 </td>
<td> n </td>
<td> time base value; <br>
divides sysclk, bit 0 forced to 0; <br>
must be set to provide 1us time base;
</td>
</tr>
<tr>
<td> MI_ERR_ADDR </td>
<td> 0x0430_0020 </td>
<td> [31:0] </td>
<td> RO </td>
<td> x </td>
<td> n </td>
<td> captured address of first write error; </td>
</tr>
<tr>
<td> MI_ERR_DATA </td>
<td> 0x0430_0024 </td>
<td> [31:0] </td>
<td> RO </td>
<td> x </td>
<td> n </td>
<td> captured data of first single write error; </td>
</tr>
<tr>
<td> MI_ERR_INFO </td>
<td> 0x0430_0028 </td>
<td> [4] </td>
<td> RO WEVAL </td>
<td> 0 </td>
<td> n </td>
<td> 1 write error valid; <br>
reading MI_ERR_INFO clears write error interrupt;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [3] </td>
<td> RO WEMULT </td>
<td> x </td>
<td> n </td>
<td> 1 on multiple write errors before error info has been read;
cleared on new capture of first error;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [2] </td>
<td> RO WEBLK </td>
<td> x </td>
<td> n </td>
<td> write error request type; <br>
0=single, 1=block request
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [1:0] </td>
<td> RO WESIZE </td>
<td> x </td>
<td> n </td>
<td> write error request size; <br>
single: 00=1, 01=2, 10=3, 11=4 bytes <br>
block: 00=8, 01=16, 10=32, 11=illegal bytes
</td>
</tr>
<tr>
<td> MI_RANDOM </td>
<td> 0x0430_002c </td>
<td> [31:1] </td>
<td> RO </td>
<td> x </td>
<td> n </td>
<td> writes are ignored; <br>
reads return 0;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [0] </td>
<td> RO </td>
<td> x </td>
<td> n </td>
<td> random number bit </td>
</tr>
<tr>
<td> MI_AVCTRL </td>
<td> 0x0430_0030 </td>
<td> [31:26] </td>
<td> RO </td>
<td> x </td>
<td> n </td>
<td> writes are ignored; <br>
reads return 0; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [25] </td>
<td> RW <br> AV_RESET </td>
<td> 0 </td>
<td> n </td>
<td>
this bit controls reset on the AI and VI; <br>
writing 1 will take the AI and VI out of reset; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [24] </td>
<td> RW <br> PLL_BYPASS </td>
<td> 0 </td>
<td> n </td>
<td> writing 1 will bypass the video PLL;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [23] </td>
<td> RW <br> VENC_TEST </td>
<td> 0 </td>
<td> n </td>
<td>
writing 1 puts the video encoder into test mode; <br>
this can be used to reset the encoder; <br>
for simulations the encoder needs to be reset twice during startup <br>
to correctly put it into a known state; <br>
make VENC_TEST high for 4 clocks, wait 30 clocks, then <br>
make it high for another 4 clocks; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [22] </td>
<td> RW <br> VTRAP </td>
<td> 0 </td>
<td> n </td>
<td>
video encoder trap filter control;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [21] </td>
<td> RW <br> VMPAL </td>
<td> 0 </td>
<td> n </td>
<td> writing 1 puts the encoder in MPAL mode;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [20] </td>
<td> RW <br> VNTPL </td>
<td> 1 </td>
<td> n </td>
<td> NTSC/PAL mode control; <br>
writing 1 puts the encoder in NTSC mode;
writing 0 puts the encoder in PAL mode;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [19] </td>
<td> RW <br> DAC_POWER </td>
<td> 0 </td>
<td> n </td>
<td> by default DAC is powered down; <br>
writing 1 powers up the video DAC;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [18:16] </td>
<td> RW <br> VPLL_PDIV </td>
<td> 0 </td>
<td> n </td>
<td> video PLL output divider P; <br>
this controls the relationship between output freq. <br>
and the VCO frequency; <br>
possible values are: <br>
0 -> FVCO <br>
1 -> FVCO/2 <br>
2 -> FVCO/4 <br>
3 -> FVCO/8 <br>
4 -> FVCO/16 <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [15:9] </td>
<td> RW <br> VPLL_NDIV </td>
<td> 0 </td>
<td> n </td>
<td> video PLL input divider N; <br>
this divides the input clock; <br>
possible values are: <br>
0 -> Invalid <br>
1 -> 2 <br>
2 -> 3 <br>
... <br>
127 -> 128 <br>
</td>
<tr>
<td> </td>
<td> </td>
<td> [8:4] </td>
<td> RW <br> VPLL_MDIV </td>
<td> 0 </td>
<td> n </td>
<td> video PLL feedback divider M; <br>
this divides the feedback clock; <br>
possible values are: <br>
0 -> 1 <br>
1 -> 2 <br>
2 -> 3 <br>
... <br>
31 -> 32 <br>
</td>
<tr>
<td> </td>
<td> </td>
<td> [3:2] </td>
<td> RW <br> VPLL_FRANGE </td>
<td> 0 </td>
<td> n </td>
<td> video PLL VCO frequency range control; <br>
possible values are: <br>
0 -> 60 - 85 MHz <br>
1 -> 85 - 120 MHz <br>
2 -> 120 - 170 MHz <br>
3 -> 170 - 250 MHz <br>
this should be set such that the output frequency <br>
multiplied by VPLL_PDIV is in range <br>
</td>
<tr>
<td> </td>
<td> </td>
<td> [1] </td>
<td> RW <br> VPLL_DIVRESET </td>
<td> 1 </td>
<td> n </td>
<td> video PLL output divider reset; <br>
this should be set to 0 to use P divider;
</td>
<tr>
<td> </td>
<td> </td>
<td> [0] </td>
<td> RW <br> VPLL_STANDBY </td>
<td> 1 </td>
<td> n </td>
<td> video PLL standby; <br>
setting this to 1 disables the PLL; <br>
this bit must be 1 for at least 30 uSec <br>
after programming all the values;
</td>
/<tr>
<tr>
<td> MI_EINTR </td>
<td> 0x0430_0038 </td>
<td> [31:0] </td>
<td> W </td>
<td> - </td>
<td> n </td>
<td> writes are ignored; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31:26] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> reads return 0; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [25] </td>
<td> RO MD_STS </td>
<td> 1 </td>
<td> n </td>
<td> status of md input; <br>
module 0=present, 1=removed; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [24] </td>
<td> RO BUT_STS </td>
<td> 1 </td>
<td> n </td>
<td> status of button input; <br>
button 1=pressed, 0=released; <br>
software has to wait for button release after power-on
before enabling the pre-nmi trap;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [23:14] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> reads return 0; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [13] </td>
<td> RW MD_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of md interrupt; <br>
set by change in module presence; <br>
cleared by writing this bit with 1; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [12] </td>
<td> RO BUT_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of button interrupt; <br>
set and cleared by mi button logic; <br>
interrupt is cleared by mask=0; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [11] </td>
<td> RO USB1_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of usb1 interrupt; <br>
set and cleared by usb1 controller; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [10] </td>
<td> RO USB0_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of usb0 interrupt; <br>
set and cleared by usb0 controller; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [9] </td>
<td> RO ERR_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of pi error interrupt; <br>
set and cleared by pi; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [8] </td>
<td> RO IDE_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of pi ide interrupt; <br>
set and cleared by pi ide controller; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7] </td>
<td> RO AES_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of pi aes interrupt; <br>
set and cleared by pi aes controller; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [6] </td>
<td> RO FLASH_INTR </td>
<td> 0 </td>
<td> n </td>
<td> status of pi flash interrupt; <br>
set and cleared by pi flash controller; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [5:0] </td>
<td> RO </td>
<td> 0 </td>
<td> y </td>
<td> same as MI_INTR; </td>
</tr>
</tr>
<tr>
<td> MI_EMASK </td>
<td> 0x0430_003c </td>
<td> [31:28] </td>
<td> W </td>
<td> - </td>
<td> n </td>
<td> writes are ignored; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [27:26] </td>
<td> W <br> SET_MD_MASK <br> CLR_MD_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets md interrupt mask; <br>
writing 01 clears md interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [25:24] </td>
<td> W <br> SET_BUT_MASK <br> CLR_BUT_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets button interrupt mask; <br>
writing 01 clears button interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
clearing the button mask disables the secure kernel
button trap (pre_nmi);
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [23:22] </td>
<td> W <br> SET_USB1_MASK <br> CLR_USB1_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets usb1 interrupt mask; <br>
writing 01 clears usb1 interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [21:20] </td>
<td> W <br> SET_USB0_MASK <br> CLR_USB0_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets usb0 interrupt mask; <br>
writing 01 clears usb0 interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [19:18] </td>
<td> W <br> SET_ERR_MASK <br> CLR_ERR_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets pi error interrupt mask; <br>
writing 01 clears pi error interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [17:16] </td>
<td> W <br> SET_IDE_MASK <br> CLR_IDE_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets pi ide interrupt mask; <br>
writing 01 clears pi ide interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [15:14] </td>
<td> W <br> SET_AES_MASK <br> CLR_AES_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets pi aes interrupt mask; <br>
writing 01 clears pi aes interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [13:12] </td>
<td> W <br> SET_FLASH_MASK <br> CLR_FLASH_MASK </td>
<td> - </td>
<td> n </td>
<td> writing 10 sets pi flash interrupt mask; <br>
writing 01 clears pi flash interrupt mask; <br>
writing 00 or 11 leave mask unchanged; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [11:0] </td>
<td> RW </td>
<td> - </td>
<td> y </td>
<td> same as MI_MASK </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31:14] </td>
<td> R </td>
<td> 0 </td>
<td> n </td>
<td> reads return 0; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [13] </td>
<td> R MD_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns md interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [12] </td>
<td> R BUT_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns button interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [11] </td>
<td> R USB1_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns usb1 interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [10] </td>
<td> R USB0_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns usb0 interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [9] </td>
<td> R ERR_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns pi error interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [8] </td>
<td> R IDE_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns pi ide interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7] </td>
<td> R AES_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns pi aes interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [6] </td>
<td> R FLASH_MASK </td>
<td> 0 </td>
<td> n </td>
<td> returns pi flash interrupt mask; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [5:0] </td>
<td> R </td>
<td> 0 </td>
<td> y </td>
<td> same as MI_MASK; </td>
</tr>
</tr>
</table>
<a name="reset">
<p>
<b><u>Reset</u></b>
<p>
The system supports 4 different types of reset: pin reset, cold reset,
warm reset and bcp reset. Pin reset is generated externally to the chip and
is input to the RST pin (active low). Cold and warm reset are generated inside
the MI and routed to the 4300 CPU. In response to pin reset, the MI generates
a cold reset to the CPU. The MI also ANDs all three active low reset lines
together to form the bcp reset line, that is routed to the rest of the chip.
So, the rest of the chip does not distinguish cold and warm rest. In addition
to the bcp reset signal, the PI and the RI also get the pin reset signal,
since they have special case behavior that depends on pin reset.
<p>
The PI will latch the BoardID into the PI_GPIO register on pin reset
(See the <a href="pi-spec.html">PI specification</a>). The RI clears the
Refresh Rate register on pin reset. For bcp reset without power on reset
the BoardID is not latched and the Refresh Enable bit is not cleared.
<p>
To summarize the details of each of the reset.
<dl>
<dt><i>Pin Reset</i>
<dd>
Pin reset is generated by keeping the RST line external to the chip low.
Generally this happens on power-on. Pin reset will cause a cold reset to
be generated to the CPU, and a bcp reset to the rest of the chip.
<p>
On pin reset, all registers reset to their default values and the BoardID
is latched into the top 16 bits of the PI_GPIO register. See the
<a href="pi-spec.html">PI Specification</a>.
<p>
<dt>Cold Reset</i>
<dd>
Cold reset is triggered by writing to the MI_CTRL register with a 1 in
the COLDRST bit. This will also generate a bcp reset to the rest of the chip.
<p>
On cold reset the DIV mode of the CPU is set from the bits programmed
in the MI_CTRL register. With the exception of the DIV mode in the MI_CTRL
register and the Refresh Rate register in the RI, all other registers are
set to their default values on cold reset.
<p>
<dt><i>Warm Reset</i>
<dd>
Warm reset is triggered by writing to the MI_CTRL register with a 1 in
the WARMRST bit. This will also generate a bcp reset to the rest of the chip.
<p>
On warm reset all registers with the exception of the DIV mode in the
MI_CTRL and the Refresh Rate register in the RI are reset to their default
values.
</dl>
<a name="intr">
<p>
<b><u>Interrupts</u></b>
<p>
The 4300 supports 5 interrupt lines: INT0 - INT4.
<dl>
<dt><i>INT0</i>
<dd>
INT0 is connected to the legacy RCP interrupt line, that muxes interrupts
from the AI, VI, DP, SP, PI and SI. These status of the individual interrupt
causes appear in the MI_INTR register. The interrupts can be masked using
the MI_MASK register.
<p>
<dt><i>INT1</i>
<dd>
INT1 is the BCP interrupt line and muxes the new interrupt sources introduced
with new BCP functionality. These include: USB0, USB1, ERR, IDE, AES and FLASH.
The latter four are all sourced from the PI unit (see <a href="pi-spec.html">
PI Specification</a>).
<p>
The MI_EINTR register includes the interrupt status for these and the
legacy interrupts, and the MI_EMASK can be used to mask/unmask these interrupts
along with the legacy interrupts.
<p>
The IDE interrupt mask is a special case. If the UNMASK_IDE bit is set
in the MI_CTRL register, an IDE interrupt will trigger INT1, regardless of
the state of the mask in the MI_EMASK register. This is to prevent applications
from accidently disabling the interrupt, since it will be used for debugging.
<p>
<dt><i>INT2</i>
<dd>
INT2 was used in the RCP as the Pre-NMI interrupt, and was connected to the
Reset button on the console. In the BCP this line is directly connected to
the Power/Reset button.
<p>
<dt><i>INT3</i>
<dd>
INT3 is the MI_ERROR interrupt. It its triggered as a result of illegal
writes to PIF RAM space, or illegal block writes to non-memory spaces, if
this is enabled in the MI_CTRL register. The interrupt is cleared by reading
the MI_ERR_INFO register.
<p>
<dt><i>INT4</i>
<dd>
INT4 is unused.
</dl>
<p>
<b> Module Insertion/Removal Detection </b>
<p>
The current status of the module presence can be read in the MD_STS bit of
the MI_EINTR register. Module removal can trigger an interrupt or a secure
kernel trap, if enabled. MD_INTR is set to indicate a change in the module
status and stays active until cleared by writing 1. When servicing the
exception, it is left up to software to debounce contact jitter during the
module insertion or removal. Software can poll the MD_STS bit, possibly
using software timers.
<a name="virage">
<p>
<b><u> Interface to Virage Non-Volatile Flash </u></b>
<p>
Each of the virage blocks is addressed through a 64kB space in the
MI boot space. This space is divided into four sub spaces which address
the virage sram (Vx_MEM), the virage store controller (Vx_REG) registers,
the mi virage control register (Vx_CTRL), the store controller execute
space (Vx_NMS) and charge-pump execute space (Vx_CP). The MI_SEC_VTIME
register is used to create a time base of 1us for the virage store
controllers. The time base is not needed when the virage store controllers
are bypassed. See the
<a href="nmsc-a5.doc">Virage Store Controller SPecification</a>
for details.
<dl>
<dt> Vx_MEM
<dd> This is the shadow sram of the non-volatile array. <br>
It supports single (uncached) and block (cached) accesses. <br>
Reads accesses can be issued at any time. <br>
Write accesses are blocked as long as the novea array is in keep mode. <br>
<p>
<dt> Vx_REG
<dd> The registers inside the virage store controller are accessed
through this space. The store controler registers are 8 bits wide
and use data bits [7:0].
Only single (uncached) requests are supported. However, block
(cached) requests are not trapped, do not cause errors and
have undefined data behavior.
<p>
<dt> Vx_CTRL
<dd> This register controls how the charge pump and novea array are controlled.
Only single (uncached) requests are supported. However, block
(cached) requests are not trapped, do not cause errors and
have undefined data behavior. <br>
Bits [31] selects either the virage store controller or direct
access by the cpu. <br>
Bits [30:24] control the virage store controller. <br>
Bits [23:0] bypass the virage store controller for direct cpu access. <br>
Addr[13]=1: NMS executes command; <br>
Addr[12]=1: charge pump CLKE is pulsed; <br>
</dl>
<table cellpadding=2 cellspacing=2 border=1>
<tr>
<td> V[012]_CTRL <br> V[012]_NMS <br> V[012]_CP </td>
<td> 0x1fc[89a]_cxxx <br> 0x1fc[89a]_exxx <br> 0x1fc[89a]_dxxx </td>
<td> [31:0] </td>
<td> RW </td>
<td> - </td>
<td> n </td>
<td> virage control register; <br>
controls virage store controller; <br>
cpu has direct control in bypass mode; <br>
32-bit read/write access; <br>
address must be 32-bit aligned; <br>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [31] </td>
<td> RW NMS_BYP </td>
<td> 0 </td>
<td> n </td>
<td> store controller bypass; <br>
NMS 0 = enabled, 1 = bypassed; <br>
when bypassed, software has control over the
CP_* and NV_* bits directly; the CP_* and NV_* bits
reflect the current of the virage store controller
when NMS_BYP is 0;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [30] </td>
<td> RO NMS_READY </td>
<td> - </td>
<td> n </td>
<td> store controller ready status; <br>
0 = busy, 1 = ready;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [29] </td>
<td> RO NMS_PASS </td>
<td> - </td>
<td> n </td>
<td> store controller pass status; <br>
0 = failed, 1 = pass;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [28] </td>
<td> RO NMS_KEEP </td>
<td> - </td>
<td> n </td>
<td> store controller keep status; <br>
0 = normal, 1 = keep mode is on;
</td>
</tr>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [27] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> reserved; <br>
writes are ignored, reads return 0;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [26:24] </td>
<td> RW NMS_CMD </td>
<td> 0 </td>
<td> n </td>
<td> store controller command; <br>
000 = idle; <br>
001 = serial sram access; <br>
010 = full store; <br>
011 = normal recall; <br>
100 = normal compare; <br>
101 = keep mode on; <br>
110 = recall auto margin; <br>
111 = reserved; <br>
the command is started when address[13] is 1 and NMS_BYP is 0;
address[13] can be on in the same access that sets NMS_CMD;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [23] </td>
<td> RO NV_RCREADY </td>
<td> - </td>
<td> n </td>
<td> novea recall ready status; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [22] </td>
<td> RO NV_MATCH </td>
<td> - </td>
<td> n </td>
<td> novea match status; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [21] </td>
<td> RW NV_RECALL </td>
<td> 0 </td>
<td> n </td>
<td> novea recall control; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [20] </td>
<td> RW NV_STORE </td>
<td> 0 </td>
<td> n </td>
<td> novea store control; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [18] </td>
<td> RW NV_COMP </td>
<td> 0 </td>
<td> n </td>
<td> novea comp control; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [17:16] </td>
<td> RW NV_MRCL </td>
<td> 00 </td>
<td> n </td>
<td> novea mrcl controls; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [15:14] </td>
<td> RW NV_TECC </td>
<td> 00 </td>
<td> n </td>
<td> novea tecc controls; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [13:12] </td>
<td> RW NV_BIAS </td>
<td> 00 </td>
<td> n </td>
<td> novea bias controls; </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [11] </td>
<td> RW CP_RST </td>
<td> 0 </td>
<td> n </td>
<td> charge pump reset; <br>
0 = operation, 1 = reset;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [10] </td>
<td> RW CP_PE </td>
<td> 0 </td>
<td> n </td>
<td> charge pump enabled; <br>
0 = disabled, 1 = enabled;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [9] </td>
<td> RW CP_DATA </td>
<td> 0 </td>
<td> n </td>
<td> charge pump data bit; <br>
bit stream for unlock sequence; <br>
unlock is 10010110;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [8] </td>
<td> RW CP_VRANGE </td>
<td> 0 </td>
<td> n </td>
<td> charge pump vpp range; <br>
see charge pump spec for details;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [7:4] </td>
<td> RW CP_VPPSEL </td>
<td> 0 </td>
<td> n </td>
<td> charge pump vpp select; <br>
see charge pump spec for details;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [3:2] </td>
<td> RO </td>
<td> 0 </td>
<td> n </td>
<td> reserved; <br>
writes are ignored, reads return 0;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [1] </td>
<td> RO CP_UNLOCK </td>
<td> - </td>
<td> n </td>
<td> charge pump unlock status; <br>
0 = locked, 1 = unlocked;
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> [0] </td>
<td> RO CP_PORST </td>
<td> - </td>
<td> n </td>
<td> charge pump power-on reset; <br>
0 = operational, 1 = reset;
</td>
</tr>
</tr>
<tr>
<td> V[012]_REG </td>
<td> 0x1fc[89a]_8xxx </td>
<td> [31:0] </td>
<td> RW </td>
<td> - </td>
<td> n </td>
<td> NMS register space; <br>
32-bit read/write access; <br>
address must be 32-bit aligned; <br>
bits [7:0] are NMS register data; <br>
bits [31:8] are ignored and read 0; <br>
</td>
</tr>
<tr>
<td> </td>
<td> 0x1fc[89a]_8000 </td>
<td> [7:0] </td>
<td> RW </td>
<td> 0000_0001 </td>
<td> n </td>
<td> NMS CRSTO_0 register; </td>
</tr>
<tr>
<td> </td>
<td> 0x1fc[89a]_8004 </td>
<td> [6:0] </td>
<td> RW </td>
<td> 0001_0010 </td>
<td> n </td>
<td> NMS CRSTO_1 register; </td>
</tr>
<tr>
<td> </td>
<td> 0x1fc[89a]_8008 </td>
<td> [7:0] </td>
<td> RW </td>
<td> 1001_0000 </td>
<td> n </td>
<td> NMS CRM_0 register; </td>
</tr>
<tr>
<td> </td>
<td> 0x1fc[89a]_800c </td>
<td> [7:0] </td>
<td> RW </td>
<td> 1001_0110 </td>
<td> n </td>
<td> NMS CRM_1 register; </td>
</tr>
<tr>
<td> </td>
<td> 0x1fc[89a]_8010 </td>
<td> [7:0] </td>
<td> RW </td>
<td> 0101_1001 </td>
<td> n </td>
<td> NMS CRM_2 register; </td>
</tr>
<tr>
<td> </td>
<td> 0x1fc[89a]_8014 </td>
<td> [5:0] </td>
<td> RW </td>
<td> 0001_0101 </td>
<td> n </td>
<td> NMS CRM_3 register; </td>
</tr>
<tr>
<td> V[012]_MEM </td>
<td> 0x1fc[89a]_0000 <br> ... <br> 0x1fc[89a]_7fff </td>
<td> [31:0] </td>
<td> RW </td>
<td> - </td>
<td> n </td>
<td> virage sram space; <br>
32-bit read/write access; <br>
no byte write enables; <br>
address must be 32-bit aligned; <br>
smaller devices appear mirrored; <br>
</td>
</tr>
</table>
<p>
<b><u> TODO </u></b>
<p>
<ul>
<li> v2 crc
</ul>
<hr>
<font size="-1">
Problems and comments to
<a href="mailto:berndt@broadon.com">
berndt@broadon.com
</a>
</font>
</body>
</html>