From 8a003dbbeddae5e4c33d8937413a9dfbb4b6e01c Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Sun, 12 Dec 2021 13:55:33 +0000 Subject: [PATCH] Make mcycle/minstret inhibited by default --- doc/hazard3.pdf | 908 +++++++++++++++++++++-------------------- doc/sections/csr.adoc | 4 +- hdl/hazard3_csr.v | 4 +- test/sim/common/init.S | 13 +- 4 files changed, 476 insertions(+), 453 deletions(-) diff --git a/doc/hazard3.pdf b/doc/hazard3.pdf index 250f10d..f414d86 100644 --- a/doc/hazard3.pdf +++ b/doc/hazard3.pdf @@ -2,10 +2,10 @@ %ÿÿÿÿ 1 0 obj << /Title (Hazard3) -/Creator (Asciidoctor PDF 1.5.4, based on Prawn 2.2.2) -/Producer (Asciidoctor PDF 1.5.4, based on Prawn 2.2.2) -/ModDate (D:20211128081829+00'00') -/CreationDate (D:20211211222417+00'00') +/Creator (Asciidoctor PDF 1.5.4, based on Prawn 2.2.0) +/Producer (Asciidoctor PDF 1.5.4, based on Prawn 2.2.0) +/ModDate (D:20211202003912+00'00') +/CreationDate (D:20211212135021+00'00') >> endobj 2 0 obj @@ -3321,7 +3321,7 @@ endobj >> endobj 22 0 obj -<< /Length 40924 +<< /Length 40825 >> stream q @@ -6205,7 +6205,7 @@ ET BT 195.7041 121.6231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -6214,7 +6214,7 @@ ET BT 197.9017 121.6231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -6223,7 +6223,7 @@ ET BT 201.3237 121.6231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -6332,7 +6332,7 @@ ET BT 195.7041 99.8431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -6341,7 +6341,7 @@ ET BT 197.9017 99.8431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -6350,7 +6350,7 @@ ET BT 201.3237 99.8431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -6459,7 +6459,7 @@ ET BT 218.0166 78.0631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -6468,7 +6468,7 @@ ET BT 220.2142 78.0631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -6477,7 +6477,7 @@ ET BT 223.6362 78.0631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -6595,7 +6595,7 @@ endobj >> endobj 30 0 obj -<< /Length 42974 +<< /Length 42644 >> stream q @@ -6962,7 +6962,7 @@ ET BT 218.0166 774.7031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -6971,7 +6971,7 @@ ET BT 220.2142 774.7031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -6980,7 +6980,7 @@ ET BT 223.6362 774.7031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -7096,7 +7096,7 @@ ET BT 218.0166 752.9231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -7105,7 +7105,7 @@ ET BT 220.2142 752.9231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -7114,7 +7114,7 @@ ET BT 223.6362 752.9231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -7230,7 +7230,7 @@ ET BT 218.0166 731.1431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -7239,7 +7239,7 @@ ET BT 220.2142 731.1431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -7248,7 +7248,7 @@ ET BT 223.6362 731.1431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -7364,7 +7364,7 @@ ET BT 218.0166 709.3631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -7373,7 +7373,7 @@ ET BT 220.2142 709.3631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -7382,7 +7382,7 @@ ET BT 223.6362 709.3631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -7498,7 +7498,7 @@ ET BT 218.0166 687.5831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -7507,7 +7507,7 @@ ET BT 220.2142 687.5831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <31> Tj ET @@ -7516,7 +7516,7 @@ ET BT 223.6362 687.5831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -7707,7 +7707,7 @@ ET BT 519.8978 644.0231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -7716,7 +7716,7 @@ ET BT 522.0954 644.0231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <32> Tj ET @@ -7725,7 +7725,7 @@ ET BT 525.5173 644.0231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -7841,7 +7841,7 @@ ET BT 519.8978 622.2431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -7850,7 +7850,7 @@ ET BT 522.0954 622.2431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <32> Tj ET @@ -7859,7 +7859,7 @@ ET BT 525.5173 622.2431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -7975,7 +7975,7 @@ ET BT 519.8978 600.4631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -7984,7 +7984,7 @@ ET BT 522.0954 600.4631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <32> Tj ET @@ -7993,7 +7993,7 @@ ET BT 525.5173 600.4631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -8109,7 +8109,7 @@ ET BT 519.8978 578.6831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -8118,7 +8118,7 @@ ET BT 522.0954 578.6831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <32> Tj ET @@ -8127,7 +8127,7 @@ ET BT 525.5173 578.6831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -8243,7 +8243,7 @@ ET BT 519.8978 556.9031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -8252,7 +8252,7 @@ ET BT 522.0954 556.9031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <32> Tj ET @@ -8261,7 +8261,7 @@ ET BT 525.5173 556.9031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -10059,7 +10059,7 @@ endobj [31 0 R /XYZ 0 467.19 null] endobj 44 0 obj -<< /Length 38799 +<< /Length 38403 >> stream q @@ -10495,7 +10495,7 @@ ET BT 394.2307 717.6431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -10504,7 +10504,7 @@ ET BT 396.4283 717.6431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <32> Tj ET @@ -10513,7 +10513,7 @@ ET BT 399.8502 717.6431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -10586,7 +10586,7 @@ ET BT 534.4214 717.6431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -10595,7 +10595,7 @@ ET BT 536.619 717.6431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <33> Tj ET @@ -10604,7 +10604,7 @@ ET BT 540.0409 717.6431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -10774,7 +10774,7 @@ ET BT 454.1332 695.8631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -10783,7 +10783,7 @@ ET BT 456.3308 695.8631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <33> Tj ET @@ -10792,7 +10792,7 @@ ET BT 459.7527 695.8631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -10948,7 +10948,7 @@ ET BT 494.0962 652.3031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -10957,7 +10957,7 @@ ET BT 496.2938 652.3031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -10966,7 +10966,7 @@ ET BT 499.7157 652.3031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -11082,7 +11082,7 @@ ET BT 494.0962 630.5231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -11091,7 +11091,7 @@ ET BT 496.2938 630.5231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -11100,7 +11100,7 @@ ET BT 499.7157 630.5231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -11216,7 +11216,7 @@ ET BT 494.0962 608.7431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -11225,7 +11225,7 @@ ET BT 496.2938 608.7431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -11234,7 +11234,7 @@ ET BT 499.7157 608.7431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -11350,7 +11350,7 @@ ET BT 494.0962 586.9631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -11359,7 +11359,7 @@ ET BT 496.2938 586.9631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -11368,7 +11368,7 @@ ET BT 499.7157 586.9631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -11484,7 +11484,7 @@ ET BT 494.0962 565.1831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -11493,7 +11493,7 @@ ET BT 496.2938 565.1831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -11502,7 +11502,7 @@ ET BT 499.7157 565.1831 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -11618,7 +11618,7 @@ ET BT 494.0962 543.4031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -11627,7 +11627,7 @@ ET BT 496.2938 543.4031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -11636,7 +11636,7 @@ ET BT 499.7157 543.4031 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -11752,7 +11752,7 @@ ET BT 494.0962 521.6231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -11761,7 +11761,7 @@ ET BT 496.2938 521.6231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -11770,7 +11770,7 @@ ET BT 499.7157 521.6231 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -11886,7 +11886,7 @@ ET BT 494.0962 499.8431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -11895,7 +11895,7 @@ ET BT 496.2938 499.8431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -11904,7 +11904,7 @@ ET BT 499.7157 499.8431 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -12020,7 +12020,7 @@ ET BT 494.0962 478.0631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5b> Tj ET @@ -12029,7 +12029,7 @@ ET BT 496.2938 478.0631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <34> Tj ET @@ -12038,7 +12038,7 @@ ET BT 499.7157 478.0631 Td -/F1.0 6.121499999999999 Tf +/F1.0 6.1215 Tf <5d> Tj ET @@ -28245,7 +28245,7 @@ endobj >> endobj 135 0 obj -<< /Length 11668 +<< /Length 11820 >> stream q @@ -28727,6 +28727,13 @@ ET 0.0 0.0 0.0 SCN 0.2 0.2 0.2 scn + +BT +432.9405 507.426 Td +/F1.0 10.5 Tf +<2e2052657365747320746f20312e> Tj +ET + 0.0 0.0 0.0 scn 0.5 w 0.8667 0.8667 0.8667 SCN @@ -28865,6 +28872,13 @@ ET 0.0 0.0 0.0 SCN 0.2 0.2 0.2 scn + +BT +411.9405 485.646 Td +/F1.0 10.5 Tf +<2e2052657365747320746f20312e> Tj +ET + 0.0 0.0 0.0 scn 0.2 0.2 0.2 scn 0.2 0.2 0.2 SCN @@ -39019,7 +39033,7 @@ endobj /FontBBox [-212 -250 1246 1047] /Flags 6 /StemV 0 -/ItalicAngle 0.0 +/ItalicAngle 0 /Ascent 1068 /Descent -292 /CapHeight 1462 @@ -39096,7 +39110,7 @@ endobj /FontBBox [-212 -250 1306 1058] /Flags 6 /StemV 0 -/ItalicAngle 0.0 +/ItalicAngle 0 /Ascent 1068 /Descent -292 /CapHeight 1462 @@ -39156,7 +39170,7 @@ endobj /FontBBox [0 -270 1000 1025] /Flags 4 /StemV 0 -/ItalicAngle 0.0 +/ItalicAngle 0 /Ascent 860 /Descent -140 /CapHeight 860 @@ -39207,7 +39221,7 @@ endobj /FontBBox [-212 -250 1246 1047] /Flags 6 /StemV 0 -/ItalicAngle 0.0 +/ItalicAngle 0 /Ascent 1068 /Descent -292 /CapHeight 1462 @@ -39270,7 +39284,7 @@ endobj /FontBBox [-254 -250 1238 1047] /Flags 70 /StemV 0 -/ItalicAngle -12.0 +/ItalicAngle -12 /Ascent 1068 /Descent -292 /CapHeight 1462 @@ -39315,369 +39329,369 @@ xref 0000054822 00000 n 0000054997 00000 n 0000055165 00000 n -0000096143 00000 n -0000096529 00000 n -0000096573 00000 n -0000096617 00000 n -0000096668 00000 n -0000096801 00000 n -0000096933 00000 n -0000097064 00000 n -0000140092 00000 n -0000140540 00000 n -0000140673 00000 n -0000140806 00000 n -0000140939 00000 n -0000141072 00000 n -0000141205 00000 n -0000141256 00000 n -0000141389 00000 n -0000141522 00000 n -0000141655 00000 n -0000141788 00000 n -0000141921 00000 n -0000141965 00000 n -0000180818 00000 n -0000181267 00000 n -0000181311 00000 n -0000181444 00000 n -0000181494 00000 n -0000181626 00000 n -0000181759 00000 n -0000181810 00000 n -0000181943 00000 n -0000182076 00000 n -0000182209 00000 n -0000182342 00000 n -0000182475 00000 n -0000182608 00000 n -0000182741 00000 n -0000182874 00000 n -0000183007 00000 n -0000183051 00000 n -0000183095 00000 n -0000228285 00000 n -0000228640 00000 n -0000228684 00000 n -0000250694 00000 n -0000251087 00000 n -0000251137 00000 n -0000251266 00000 n -0000251316 00000 n -0000251445 00000 n -0000251495 00000 n -0000251624 00000 n -0000251674 00000 n -0000251803 00000 n -0000267522 00000 n -0000267914 00000 n -0000267958 00000 n -0000268203 00000 n -0000268247 00000 n -0000268291 00000 n -0000268466 00000 n -0000268510 00000 n -0000268961 00000 n -0000269395 00000 n -0000269604 00000 n -0000269648 00000 n -0000291973 00000 n -0000292365 00000 n -0000292409 00000 n -0000292453 00000 n -0000292497 00000 n -0000292621 00000 n -0000292745 00000 n -0000308906 00000 n -0000309292 00000 n -0000309336 00000 n -0000309380 00000 n -0000309424 00000 n -0000309469 00000 n -0000309514 00000 n -0000309559 00000 n -0000309903 00000 n -0000310025 00000 n -0000330936 00000 n -0000331340 00000 n -0000331462 00000 n -0000331508 00000 n -0000331630 00000 n -0000331752 00000 n -0000331798 00000 n -0000347456 00000 n -0000347839 00000 n -0000347885 00000 n -0000347931 00000 n -0000347977 00000 n -0000365436 00000 n -0000365811 00000 n -0000365857 00000 n -0000365903 00000 n -0000366035 00000 n -0000366081 00000 n -0000366127 00000 n -0000379602 00000 n -0000379998 00000 n -0000380044 00000 n -0000380090 00000 n -0000380136 00000 n -0000380258 00000 n -0000380304 00000 n -0000380350 00000 n -0000380469 00000 n -0000380515 00000 n -0000380905 00000 n -0000392628 00000 n -0000393016 00000 n -0000393062 00000 n -0000393108 00000 n -0000393154 00000 n -0000393200 00000 n -0000393246 00000 n -0000393292 00000 n -0000393338 00000 n -0000393384 00000 n -0000393511 00000 n -0000417403 00000 n -0000417773 00000 n -0000417819 00000 n -0000417865 00000 n -0000430574 00000 n -0000430991 00000 n -0000431037 00000 n -0000431162 00000 n -0000431208 00000 n -0000431254 00000 n -0000431379 00000 n -0000431425 00000 n -0000431553 00000 n -0000431599 00000 n -0000450264 00000 n -0000450634 00000 n -0000450680 00000 n -0000450726 00000 n -0000458079 00000 n -0000458436 00000 n -0000464944 00000 n -0000465339 00000 n -0000465385 00000 n -0000465739 00000 n -0000465785 00000 n -0000510222 00000 n -0000512573 00000 n -0000526066 00000 n -0000526436 00000 n -0000526482 00000 n -0000545483 00000 n -0000545879 00000 n -0000546005 00000 n -0000546135 00000 n -0000546181 00000 n -0000546306 00000 n -0000546433 00000 n -0000546571 00000 n -0000546710 00000 n -0000546829 00000 n -0000546949 00000 n -0000547073 00000 n -0000547199 00000 n -0000547323 00000 n -0000547449 00000 n -0000547573 00000 n -0000547699 00000 n -0000547851 00000 n -0000548005 00000 n -0000548135 00000 n -0000548266 00000 n -0000548382 00000 n -0000548501 00000 n -0000548650 00000 n -0000548800 00000 n -0000548922 00000 n -0000549046 00000 n -0000549167 00000 n -0000549289 00000 n -0000549408 00000 n -0000549529 00000 n -0000549650 00000 n -0000549772 00000 n -0000549895 00000 n -0000550020 00000 n -0000550137 00000 n -0000550256 00000 n -0000550404 00000 n -0000550553 00000 n -0000550673 00000 n -0000550795 00000 n -0000550916 00000 n -0000551039 00000 n -0000551159 00000 n -0000551281 00000 n -0000551400 00000 n -0000551522 00000 n -0000551638 00000 n -0000551756 00000 n -0000551872 00000 n -0000551989 00000 n -0000552107 00000 n -0000552226 00000 n -0000552348 00000 n -0000552470 00000 n -0000552587 00000 n -0000552705 00000 n -0000552825 00000 n -0000552945 00000 n -0000553063 00000 n -0000553182 00000 n -0000553306 00000 n -0000553430 00000 n -0000553569 00000 n -0000553709 00000 n -0000553830 00000 n -0000553952 00000 n -0000554076 00000 n -0000554200 00000 n -0000554349 00000 n -0000554499 00000 n -0000554619 00000 n -0000554739 00000 n -0000554860 00000 n -0000554981 00000 n -0000555103 00000 n -0000555225 00000 n -0000555346 00000 n -0000555467 00000 n -0000555593 00000 n -0000555719 00000 n -0000555848 00000 n -0000555977 00000 n -0000556107 00000 n -0000556237 00000 n -0000556363 00000 n -0000556489 00000 n -0000556623 00000 n -0000556758 00000 n -0000556879 00000 n -0000557000 00000 n -0000557120 00000 n -0000557241 00000 n -0000557370 00000 n -0000557500 00000 n -0000557621 00000 n -0000557742 00000 n -0000557858 00000 n -0000557975 00000 n -0000558098 00000 n -0000558221 00000 n -0000558344 00000 n -0000558467 00000 n -0000558592 00000 n -0000558717 00000 n -0000558841 00000 n -0000558965 00000 n -0000559086 00000 n -0000559208 00000 n -0000559329 00000 n -0000559451 00000 n -0000559568 00000 n -0000559686 00000 n -0000559811 00000 n -0000559937 00000 n -0000560067 00000 n -0000560197 00000 n -0000560343 00000 n -0000560489 00000 n -0000560633 00000 n -0000560777 00000 n -0000560855 00000 n -0000560992 00000 n -0000561184 00000 n -0000561400 00000 n -0000561693 00000 n -0000561843 00000 n -0000562031 00000 n -0000562219 00000 n -0000562407 00000 n -0000562715 00000 n -0000562909 00000 n -0000563123 00000 n -0000563422 00000 n -0000563596 00000 n -0000563776 00000 n -0000563952 00000 n -0000564132 00000 n -0000564324 00000 n -0000564478 00000 n -0000564788 00000 n -0000564954 00000 n -0000565138 00000 n -0000565318 00000 n -0000565498 00000 n -0000565662 00000 n -0000565827 00000 n -0000566000 00000 n -0000566185 00000 n -0000566354 00000 n -0000566535 00000 n -0000566712 00000 n -0000566895 00000 n -0000567173 00000 n -0000567352 00000 n -0000567539 00000 n -0000567857 00000 n -0000568020 00000 n -0000568201 00000 n -0000568386 00000 n -0000568575 00000 n -0000568792 00000 n -0000569013 00000 n -0000569218 00000 n -0000569413 00000 n -0000569671 00000 n -0000569838 00000 n -0000570013 00000 n -0000570283 00000 n -0000570438 00000 n -0000570603 00000 n -0000570792 00000 n -0000570967 00000 n -0000571171 00000 n -0000571338 00000 n -0000571511 00000 n -0000571684 00000 n -0000571839 00000 n -0000572043 00000 n -0000572238 00000 n -0000572511 00000 n -0000572762 00000 n -0000573182 00000 n -0000573453 00000 n -0000573724 00000 n -0000584731 00000 n -0000584947 00000 n -0000586310 00000 n -0000587227 00000 n -0000596575 00000 n -0000596796 00000 n -0000598159 00000 n -0000599074 00000 n -0000604596 00000 n -0000604811 00000 n -0000606174 00000 n -0000607089 00000 n -0000611025 00000 n -0000611241 00000 n -0000611564 00000 n -0000612480 00000 n -0000619023 00000 n -0000619249 00000 n -0000620612 00000 n +0000096044 00000 n +0000096430 00000 n +0000096474 00000 n +0000096518 00000 n +0000096569 00000 n +0000096702 00000 n +0000096834 00000 n +0000096965 00000 n +0000139663 00000 n +0000140111 00000 n +0000140244 00000 n +0000140377 00000 n +0000140510 00000 n +0000140643 00000 n +0000140776 00000 n +0000140827 00000 n +0000140960 00000 n +0000141093 00000 n +0000141226 00000 n +0000141359 00000 n +0000141492 00000 n +0000141536 00000 n +0000179993 00000 n +0000180442 00000 n +0000180486 00000 n +0000180619 00000 n +0000180669 00000 n +0000180801 00000 n +0000180934 00000 n +0000180985 00000 n +0000181118 00000 n +0000181251 00000 n +0000181384 00000 n +0000181517 00000 n +0000181650 00000 n +0000181783 00000 n +0000181916 00000 n +0000182049 00000 n +0000182182 00000 n +0000182226 00000 n +0000182270 00000 n +0000227460 00000 n +0000227815 00000 n +0000227859 00000 n +0000249869 00000 n +0000250262 00000 n +0000250312 00000 n +0000250441 00000 n +0000250491 00000 n +0000250620 00000 n +0000250670 00000 n +0000250799 00000 n +0000250849 00000 n +0000250978 00000 n +0000266697 00000 n +0000267089 00000 n +0000267133 00000 n +0000267378 00000 n +0000267422 00000 n +0000267466 00000 n +0000267641 00000 n +0000267685 00000 n +0000268136 00000 n +0000268570 00000 n +0000268779 00000 n +0000268823 00000 n +0000291148 00000 n +0000291540 00000 n +0000291584 00000 n +0000291628 00000 n +0000291672 00000 n +0000291796 00000 n +0000291920 00000 n +0000308081 00000 n +0000308467 00000 n +0000308511 00000 n +0000308555 00000 n +0000308599 00000 n +0000308644 00000 n +0000308689 00000 n +0000308734 00000 n +0000309078 00000 n +0000309200 00000 n +0000330111 00000 n +0000330515 00000 n +0000330637 00000 n +0000330683 00000 n +0000330805 00000 n +0000330927 00000 n +0000330973 00000 n +0000346631 00000 n +0000347014 00000 n +0000347060 00000 n +0000347106 00000 n +0000347152 00000 n +0000364611 00000 n +0000364986 00000 n +0000365032 00000 n +0000365078 00000 n +0000365210 00000 n +0000365256 00000 n +0000365302 00000 n +0000378777 00000 n +0000379173 00000 n +0000379219 00000 n +0000379265 00000 n +0000379311 00000 n +0000379433 00000 n +0000379479 00000 n +0000379525 00000 n +0000379644 00000 n +0000379690 00000 n +0000380080 00000 n +0000391955 00000 n +0000392343 00000 n +0000392389 00000 n +0000392435 00000 n +0000392481 00000 n +0000392527 00000 n +0000392573 00000 n +0000392619 00000 n +0000392665 00000 n +0000392711 00000 n +0000392838 00000 n +0000416730 00000 n +0000417100 00000 n +0000417146 00000 n +0000417192 00000 n +0000429901 00000 n +0000430318 00000 n +0000430364 00000 n +0000430489 00000 n +0000430535 00000 n +0000430581 00000 n +0000430706 00000 n +0000430752 00000 n +0000430880 00000 n +0000430926 00000 n +0000449591 00000 n +0000449961 00000 n +0000450007 00000 n +0000450053 00000 n +0000457406 00000 n +0000457763 00000 n +0000464271 00000 n +0000464666 00000 n +0000464712 00000 n +0000465066 00000 n +0000465112 00000 n +0000509549 00000 n +0000511900 00000 n +0000525393 00000 n +0000525763 00000 n +0000525809 00000 n +0000544810 00000 n +0000545206 00000 n +0000545332 00000 n +0000545462 00000 n +0000545508 00000 n +0000545633 00000 n +0000545760 00000 n +0000545898 00000 n +0000546037 00000 n +0000546156 00000 n +0000546276 00000 n +0000546400 00000 n +0000546526 00000 n +0000546650 00000 n +0000546776 00000 n +0000546900 00000 n +0000547026 00000 n +0000547178 00000 n +0000547332 00000 n +0000547462 00000 n +0000547593 00000 n +0000547709 00000 n +0000547828 00000 n +0000547977 00000 n +0000548127 00000 n +0000548249 00000 n +0000548373 00000 n +0000548494 00000 n +0000548616 00000 n +0000548735 00000 n +0000548856 00000 n +0000548977 00000 n +0000549099 00000 n +0000549222 00000 n +0000549347 00000 n +0000549464 00000 n +0000549583 00000 n +0000549731 00000 n +0000549880 00000 n +0000550000 00000 n +0000550122 00000 n +0000550243 00000 n +0000550366 00000 n +0000550486 00000 n +0000550608 00000 n +0000550727 00000 n +0000550849 00000 n +0000550965 00000 n +0000551083 00000 n +0000551199 00000 n +0000551316 00000 n +0000551434 00000 n +0000551553 00000 n +0000551675 00000 n +0000551797 00000 n +0000551914 00000 n +0000552032 00000 n +0000552152 00000 n +0000552272 00000 n +0000552390 00000 n +0000552509 00000 n +0000552633 00000 n +0000552757 00000 n +0000552896 00000 n +0000553036 00000 n +0000553157 00000 n +0000553279 00000 n +0000553403 00000 n +0000553527 00000 n +0000553676 00000 n +0000553826 00000 n +0000553946 00000 n +0000554066 00000 n +0000554187 00000 n +0000554308 00000 n +0000554430 00000 n +0000554552 00000 n +0000554673 00000 n +0000554794 00000 n +0000554920 00000 n +0000555046 00000 n +0000555175 00000 n +0000555304 00000 n +0000555434 00000 n +0000555564 00000 n +0000555690 00000 n +0000555816 00000 n +0000555950 00000 n +0000556085 00000 n +0000556206 00000 n +0000556327 00000 n +0000556447 00000 n +0000556568 00000 n +0000556697 00000 n +0000556827 00000 n +0000556948 00000 n +0000557069 00000 n +0000557185 00000 n +0000557302 00000 n +0000557425 00000 n +0000557548 00000 n +0000557671 00000 n +0000557794 00000 n +0000557919 00000 n +0000558044 00000 n +0000558168 00000 n +0000558292 00000 n +0000558413 00000 n +0000558535 00000 n +0000558656 00000 n +0000558778 00000 n +0000558895 00000 n +0000559013 00000 n +0000559138 00000 n +0000559264 00000 n +0000559394 00000 n +0000559524 00000 n +0000559670 00000 n +0000559816 00000 n +0000559960 00000 n +0000560104 00000 n +0000560182 00000 n +0000560319 00000 n +0000560511 00000 n +0000560727 00000 n +0000561020 00000 n +0000561170 00000 n +0000561358 00000 n +0000561546 00000 n +0000561734 00000 n +0000562042 00000 n +0000562236 00000 n +0000562450 00000 n +0000562749 00000 n +0000562923 00000 n +0000563103 00000 n +0000563279 00000 n +0000563459 00000 n +0000563651 00000 n +0000563805 00000 n +0000564115 00000 n +0000564281 00000 n +0000564465 00000 n +0000564645 00000 n +0000564825 00000 n +0000564989 00000 n +0000565154 00000 n +0000565327 00000 n +0000565512 00000 n +0000565681 00000 n +0000565862 00000 n +0000566039 00000 n +0000566222 00000 n +0000566500 00000 n +0000566679 00000 n +0000566866 00000 n +0000567184 00000 n +0000567347 00000 n +0000567528 00000 n +0000567713 00000 n +0000567902 00000 n +0000568119 00000 n +0000568340 00000 n +0000568545 00000 n +0000568740 00000 n +0000568998 00000 n +0000569165 00000 n +0000569340 00000 n +0000569610 00000 n +0000569765 00000 n +0000569930 00000 n +0000570119 00000 n +0000570294 00000 n +0000570498 00000 n +0000570665 00000 n +0000570838 00000 n +0000571011 00000 n +0000571166 00000 n +0000571370 00000 n +0000571565 00000 n +0000571838 00000 n +0000572089 00000 n +0000572509 00000 n +0000572780 00000 n +0000573051 00000 n +0000584058 00000 n +0000584272 00000 n +0000585635 00000 n +0000586552 00000 n +0000595900 00000 n +0000596119 00000 n +0000597482 00000 n +0000598397 00000 n +0000603919 00000 n +0000604132 00000 n +0000605495 00000 n +0000606410 00000 n +0000610346 00000 n +0000610560 00000 n +0000610883 00000 n +0000611799 00000 n +0000618342 00000 n +0000618566 00000 n +0000619929 00000 n trailer << /Size 381 /Root 2 0 R /Info 1 0 R >> startxref -621527 +620844 %%EOF diff --git a/doc/sections/csr.adoc b/doc/sections/csr.adoc index 242dfa9..9e50700 100644 --- a/doc/sections/csr.adoc +++ b/doc/sections/csr.adoc @@ -310,8 +310,8 @@ Counter inhibit. Read-write. The table below lists the fields which are _not_ ha [cols="10h,20h,~", options="header"] |=== | Bits | Name | Description -| 2 | `ir` | When 1, inhibit counting of `minstret`/`minstreth` -| 0 | `cy` | When 1, inhibit counting of `mcycle`/`mcycleh` +| 2 | `ir` | When 1, inhibit counting of `minstret`/`minstreth`. Resets to 1. +| 0 | `cy` | When 1, inhibit counting of `mcycle`/`mcycleh`. Resets to 1. |=== ==== mhpmevent3...31 diff --git a/hdl/hazard3_csr.v b/hdl/hazard3_csr.v index 32f25b6..ce5598e 100644 --- a/hdl/hazard3_csr.v +++ b/hdl/hazard3_csr.v @@ -440,8 +440,8 @@ always @ (posedge clk or negedge rst_n) begin minstreth <= X0; minstret <= X0; // Counters inhibited by default to save energy - mcountinhibit_cy <= 1'b0; - mcountinhibit_ir <= 1'b0; + mcountinhibit_cy <= 1'b1; + mcountinhibit_ir <= 1'b1; end else if (CSR_COUNTER) begin // Optionally hold the top (2 * XLEN - W_COUNTER) bits constant to // save gates (noncompliant if enabled) diff --git a/test/sim/common/init.S b/test/sim/common/init.S index 8f0851b..3e3b7ec 100644 --- a/test/sim/common/init.S +++ b/test/sim/common/init.S @@ -54,11 +54,20 @@ j \name .reset_handler: - la sp, __stack_top - // mtvec LSB enables vectoring + // Set counters running, as they are off by default. This may trap if counters + // are unimplemented, so catch the trap and continue. + la a0, 1f + csrw mtvec, a0 + csrci mcountinhibit, 0x5 +.p2align 2 +1: + // Set up trap vector table. mtvec LSB enables vectoring la t0, .vector_table + 1 csrw mtvec, t0 + // Set up stack pointer before doing anything else + la sp, __stack_top + // newlib _start expects argc, argv on the stack. Leave stack 16-byte aligned. addi sp, sp, -16 li a0, 1