OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /neorv32/trunk
    from Rev 46 to Rev 47
    Reverse comparison

Rev 46 → Rev 47

/docs/figures/neorv32_processor.png Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
/docs/Doxyfile
976,7 → 976,7
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
 
USE_MDFILE_AS_MAINPAGE = ../README.md
USE_MDFILE_AS_MAINPAGE =
 
#---------------------------------------------------------------------------
# Configuration options related to source browsing
/docs/NEORV32.pdf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
/riscv-compliance/README.md
1,7 → 1,5
# NEORV32 RISC-V-Compliance Test Framework
 
**:sparkles: This setup uses the new [RISC-V Compliance Test Framework v2.1](https://github.com/riscv/riscv-compliance/releases/tag/v2.0) :sparkles:**
 
## Overview
 
This sub-project folder tests the [NEORV32 Processor Core](https://github.com/stnolting/neorv32) for **RISC-V compliance** by
/rtl/core/neorv32_application_image.vhd
1,5 → 1,5
-- The NEORV32 Processor by Stephan Nolting, https://github.com/stnolting/neorv32
-- Auto-generated memory init file (for APPLICATION) from source file <cpu_test/main.bin>
-- Auto-generated memory init file (for APPLICATION) from source file <blink_led/main.bin>
 
library ieee;
use ieee.std_logic_1164.all;
6,7 → 6,7
 
package neorv32_application_image is
 
type application_init_image_t is array (0 to 4082) of std_ulogic_vector(31 downto 0);
type application_init_image_t is array (0 to 1032) of std_ulogic_vector(31 downto 0);
constant application_init_image : application_init_image_t := (
00000000 => x"00000093",
00000001 => x"00000113",
35,4061 → 35,1011
00000024 => x"00000e93",
00000025 => x"00000f13",
00000026 => x"00000f93",
00000027 => x"05136509",
00000028 => x"10738005",
00000029 => x"10733005",
00000030 => x"21173040",
00000031 => x"01138000",
00000032 => x"7113f821",
00000033 => x"0413ffc1",
00000034 => x"01970001",
00000035 => x"81938000",
00000036 => x"05977761",
00000037 => x"85930000",
00000038 => x"907308e5",
00000039 => x"05933055",
00000040 => x"a023f800",
00000041 => x"05910005",
00000042 => x"feb01de3",
00000043 => x"81018593",
00000044 => x"86818613",
00000045 => x"00c5d663",
00000046 => x"00058023",
00000047 => x"bfdd0585",
00000048 => x"00004597",
00000049 => x"ef858593",
00000050 => x"80000617",
00000051 => x"f3860613",
00000052 => x"81018693",
00000053 => x"00d65963",
00000054 => x"00058703",
00000055 => x"00e60023",
00000056 => x"06050585",
00000057 => x"0513bfc5",
00000058 => x"05930000",
00000059 => x"10730000",
00000060 => x"1073b000",
00000061 => x"1073b800",
00000062 => x"1073b020",
00000063 => x"d073b820",
00000064 => x"10733063",
00000065 => x"06373200",
00000066 => x"10738000",
00000067 => x"00ef3426",
00000068 => x"707304e0",
00000069 => x"00013004",
00000070 => x"10500073",
00000071 => x"0001a001",
00000072 => x"c0221161",
00000073 => x"2473c226",
00000074 => x"43633420",
00000075 => x"24730204",
00000076 => x"14833410",
00000077 => x"888d0004",
00000078 => x"10730409",
00000079 => x"04133414",
00000080 => x"17630030",
00000081 => x"24730094",
00000082 => x"04093410",
00000083 => x"34141073",
00000084 => x"44124482",
00000085 => x"00730121",
00000086 => x"00003020",
00000087 => x"11016515",
00000088 => x"46014681",
00000089 => x"05134581",
00000090 => x"ce06b005",
00000091 => x"ca26cc22",
00000092 => x"10efc84a",
00000093 => x"650938f0",
00000094 => x"7e850513",
00000095 => x"411010ef",
00000096 => x"0513650d",
00000097 => x"10ef8045",
00000098 => x"650d4070",
00000099 => x"82450513",
00000100 => x"3fd010ef",
00000101 => x"34202773",
00000102 => x"800007b7",
00000103 => x"14f71463",
00000104 => x"0513650d",
00000105 => x"00018445",
00000106 => x"3e5010ef",
00000107 => x"10ef4501",
00000108 => x"45012370",
00000109 => x"10ef4581",
00000110 => x"45015830",
00000111 => x"10ef4581",
00000112 => x"478154b0",
00000113 => x"32079073",
00000114 => x"9073479d",
00000115 => x"45013067",
00000116 => x"10ef4581",
00000117 => x"55fd24f0",
00000118 => x"10ef557d",
00000119 => x"10ef2830",
00000120 => x"10ef16f0",
00000121 => x"10ef1610",
00000122 => x"650d5c60",
00000123 => x"87450513",
00000124 => x"10ef6485",
00000125 => x"10ef39b0",
00000126 => x"85934f60",
00000127 => x"45013464",
00000128 => x"4ac010ef",
00000129 => x"8593842a",
00000130 => x"45053464",
00000131 => x"4a0010ef",
00000132 => x"8593942a",
00000133 => x"45093464",
00000134 => x"494010ef",
00000135 => x"8593942a",
00000136 => x"450d3464",
00000137 => x"488010ef",
00000138 => x"8593942a",
00000139 => x"45113464",
00000140 => x"47c010ef",
00000141 => x"8593942a",
00000142 => x"45153464",
00000143 => x"470010ef",
00000144 => x"8593942a",
00000145 => x"45193464",
00000146 => x"464010ef",
00000147 => x"8593942a",
00000148 => x"451d3464",
00000149 => x"458010ef",
00000150 => x"8593942a",
00000151 => x"45213464",
00000152 => x"44c010ef",
00000153 => x"8593942a",
00000154 => x"45253464",
00000155 => x"440010ef",
00000156 => x"8593942a",
00000157 => x"452d3464",
00000158 => x"434010ef",
00000159 => x"8593942a",
00000160 => x"45293464",
00000161 => x"428010ef",
00000162 => x"8593942a",
00000163 => x"45313464",
00000164 => x"41c010ef",
00000165 => x"8593942a",
00000166 => x"45353464",
00000167 => x"410010ef",
00000168 => x"8593942a",
00000169 => x"45393464",
00000170 => x"404010ef",
00000171 => x"8593942a",
00000172 => x"453d3464",
00000173 => x"3f8010ef",
00000174 => x"8593942a",
00000175 => x"45413464",
00000176 => x"3ec010ef",
00000177 => x"00a405b3",
00000178 => x"650dc195",
00000179 => x"89450513",
00000180 => x"2bd010ef",
00000181 => x"446240f2",
00000182 => x"494244d2",
00000183 => x"61054501",
00000184 => x"00018082",
00000185 => x"0513650d",
00000186 => x"bd7d84c5",
00000187 => x"10ef450d",
00000188 => x"842a3cb0",
00000189 => x"10ef451d",
00000190 => x"942a3c30",
00000191 => x"10ef452d",
00000192 => x"942a3bb0",
00000193 => x"10ef4541",
00000194 => x"942a3b30",
00000195 => x"10ef4545",
00000196 => x"942a3ab0",
00000197 => x"10ef4549",
00000198 => x"942a3a30",
00000199 => x"10ef454d",
00000200 => x"942a39b0",
00000201 => x"650dc411",
00000202 => x"051385a2",
00000203 => x"b74d8a85",
00000204 => x"0513650d",
00000205 => x"10ef8c05",
00000206 => x"60732570",
00000207 => x"00013004",
00000208 => x"10730001",
00000209 => x"84933424",
00000210 => x"408c8181",
00000211 => x"0513650d",
00000212 => x"10ef8d85",
00000213 => x"409c23b0",
00000214 => x"c09c0785",
00000215 => x"38d010ef",
00000216 => x"000184aa",
00000217 => x"10ef0001",
00000218 => x"84133830",
00000219 => x"e1998181",
00000220 => x"3ca4f2e3",
00000221 => x"342027f3",
00000222 => x"3a079ee3",
00000223 => x"7df000ef",
00000224 => x"90734781",
00000225 => x"400c3427",
00000226 => x"0513650d",
00000227 => x"10ef8fc5",
00000228 => x"401c1ff0",
00000229 => x"c01c0785",
00000230 => x"381010ef",
00000231 => x"000184aa",
00000232 => x"10ef0001",
00000233 => x"e1993770",
00000234 => x"38a4fae3",
00000235 => x"342027f3",
00000236 => x"380796e3",
00000237 => x"7a7000ef",
00000238 => x"90734781",
00000239 => x"400c3427",
00000240 => x"0513650d",
00000241 => x"10ef91c5",
00000242 => x"401c1c70",
00000243 => x"c01c0785",
00000244 => x"320027f3",
00000245 => x"0017e793",
00000246 => x"32079073",
00000247 => x"c00027f3",
00000248 => x"00010001",
00000249 => x"c0002773",
00000250 => x"34f71ee3",
00000251 => x"342027f3",
00000252 => x"34079ae3",
00000253 => x"767000ef",
00000254 => x"320027f3",
00000255 => x"90739bf9",
00000256 => x"47813207",
00000257 => x"34279073",
00000258 => x"650d400c",
00000259 => x"93c50513",
00000260 => x"17d010ef",
00000261 => x"0785401c",
00000262 => x"27f3c01c",
00000263 => x"9bf93060",
00000264 => x"30679073",
00000265 => x"325010ef",
00000266 => x"c00027f3",
00000267 => x"342026f3",
00000268 => x"93e34709",
00000269 => x"9be332e6",
00000270 => x"00ef3007",
00000271 => x"00017210",
00000272 => x"306027f3",
00000273 => x"0017e793",
00000274 => x"30679073",
00000275 => x"90734481",
00000276 => x"400c3424",
00000277 => x"0513650d",
00000278 => x"10ef9745",
00000279 => x"20ef1330",
00000280 => x"ae230320",
00000281 => x"01e380a1",
00000282 => x"401c3005",
00000283 => x"c01c0785",
00000284 => x"b0349073",
00000285 => x"907347a1",
00000286 => x"90733237",
00000287 => x"47c1b044",
00000288 => x"32479073",
00000289 => x"b0449073",
00000290 => x"02000793",
00000291 => x"32579073",
00000292 => x"b0549073",
00000293 => x"04000793",
00000294 => x"32679073",
00000295 => x"b0649073",
00000296 => x"08000793",
00000297 => x"32779073",
00000298 => x"b0749073",
00000299 => x"10000793",
00000300 => x"32879073",
00000301 => x"b0849073",
00000302 => x"20000793",
00000303 => x"32979073",
00000304 => x"b0949073",
00000305 => x"40000793",
00000306 => x"32a79073",
00000307 => x"b0a49073",
00000308 => x"87136785",
00000309 => x"10738007",
00000310 => x"907332b7",
00000311 => x"9073b0b4",
00000312 => x"907332c7",
00000313 => x"6789b0c4",
00000314 => x"32d79073",
00000315 => x"32049073",
00000316 => x"342027f3",
00000317 => x"260796e3",
00000318 => x"663000ef",
00000319 => x"90734481",
00000320 => x"400c3424",
00000321 => x"0513650d",
00000322 => x"10ef9ac5",
00000323 => x"401c0830",
00000324 => x"c01c0785",
00000325 => x"b0049073",
00000326 => x"f0002023",
00000327 => x"34202773",
00000328 => x"1be3479d",
00000329 => x"a58324f7",
00000330 => x"650d8201",
00000331 => x"9d450513",
00000332 => x"f5158593",
00000333 => x"059010ef",
00000334 => x"623000ef",
00000335 => x"90734781",
00000336 => x"400c3427",
00000337 => x"0637650d",
00000338 => x"0513f000",
00000339 => x"10ef9e05",
00000340 => x"278303f0",
00000341 => x"6705fa00",
00000342 => x"8fe38ff9",
00000343 => x"27832207",
00000344 => x"8b89fe80",
00000345 => x"220782e3",
00000346 => x"0737401c",
00000347 => x"0785f000",
00000348 => x"07b7c01c",
00000349 => x"87938000",
00000350 => x"43940007",
00000351 => x"c31443dc",
00000352 => x"00e7c35c",
00000353 => x"27f30007",
00000354 => x"9be33420",
00000355 => x"27731e07",
00000356 => x"47bd3400",
00000357 => x"1ef716e3",
00000358 => x"5c3000ef",
00000359 => x"90734781",
00000360 => x"400c3427",
00000361 => x"0513650d",
00000362 => x"10efa285",
00000363 => x"401c7e20",
00000364 => x"c01c0785",
00000365 => x"fff027f3",
00000366 => x"34202773",
00000367 => x"11e34789",
00000368 => x"00ef1ef7",
00000369 => x"00015990",
00000370 => x"90734481",
00000371 => x"400c3424",
00000372 => x"0513650d",
00000373 => x"10efa505",
00000374 => x"401c7b60",
00000375 => x"c01c0785",
00000376 => x"c0149073",
00000377 => x"34202773",
00000378 => x"1fe34789",
00000379 => x"00ef1af7",
00000380 => x"000156d0",
00000381 => x"90734781",
00000382 => x"400c3427",
00000383 => x"0513650d",
00000384 => x"10efa805",
00000385 => x"401c78a0",
00000386 => x"c01c0785",
00000387 => x"c0102073",
00000388 => x"342027f3",
00000389 => x"18079ee3",
00000390 => x"543000ef",
00000391 => x"90734781",
00000392 => x"400c3427",
00000393 => x"0513650d",
00000394 => x"10efabc5",
00000395 => x"10ef7620",
00000396 => x"07e35e80",
00000397 => x"401c1805",
00000398 => x"c01c0785",
00000399 => x"30047073",
00000400 => x"00010001",
00000401 => x"45814501",
00000402 => x"614010ef",
00000403 => x"00010001",
00000404 => x"55fd557d",
00000405 => x"608010ef",
00000406 => x"30046073",
00000407 => x"00010001",
00000408 => x"34202773",
00000409 => x"800007b7",
00000410 => x"17e3079d",
00000411 => x"00ef14f7",
00000412 => x"00014ed0",
00000413 => x"90734481",
00000414 => x"400c3424",
00000415 => x"0513650d",
00000416 => x"10efae45",
00000417 => x"10ef70a0",
00000418 => x"01e35900",
00000419 => x"401c1605",
00000420 => x"c01c0785",
00000421 => x"30047073",
00000422 => x"00010001",
00000423 => x"45814501",
00000424 => x"5bc010ef",
00000425 => x"00010001",
00000426 => x"55fd557d",
00000427 => x"5b0010ef",
00000428 => x"344027f3",
00000429 => x"0807f793",
00000430 => x"120786e3",
00000431 => x"34449073",
00000432 => x"30046073",
00000433 => x"00010001",
00000434 => x"342027f3",
00000435 => x"100792e3",
00000436 => x"48b000ef",
00000437 => x"30046073",
00000438 => x"00010001",
00000439 => x"90734781",
00000440 => x"400c3427",
00000441 => x"0513650d",
00000442 => x"10efb445",
00000443 => x"27f36a20",
00000444 => x"8b913010",
00000445 => x"10079ee3",
00000446 => x"0785401c",
00000447 => x"4789c01c",
00000448 => x"27f39782",
00000449 => x"9be33420",
00000450 => x"650d0e07",
00000451 => x"b7c50513",
00000452 => x"67c010ef",
00000453 => x"81418793",
00000454 => x"07054398",
00000455 => x"0001c398",
00000456 => x"90734781",
00000457 => x"400c3427",
00000458 => x"0513650d",
00000459 => x"10efbbc5",
00000460 => x"401c65e0",
00000461 => x"c01c0785",
00000462 => x"f0000793",
00000463 => x"27739782",
00000464 => x"47853420",
00000465 => x"0cf71ee3",
00000466 => x"413000ef",
00000467 => x"90734781",
00000468 => x"400c3427",
00000469 => x"0513650d",
00000470 => x"10efbf45",
00000471 => x"401c6320",
00000472 => x"c01c0785",
00000473 => x"fff01073",
00000474 => x"34202773",
00000475 => x"1de34789",
00000476 => x"27730af7",
00000477 => x"17b73430",
00000478 => x"8793fff0",
00000479 => x"15e30737",
00000480 => x"00ef0af7",
00000481 => x"00013d90",
00000482 => x"90734781",
00000483 => x"400c3427",
00000484 => x"0513650d",
00000485 => x"10efc285",
00000486 => x"27f35f60",
00000487 => x"8b913010",
00000488 => x"08078ce3",
00000489 => x"0785401c",
00000490 => x"07b7c01c",
00000491 => x"87938000",
00000492 => x"80e70087",
00000493 => x"27730007",
00000494 => x"47893420",
00000495 => x"06f71ae3",
00000496 => x"39b000ef",
00000497 => x"90734781",
00000498 => x"400c3427",
00000499 => x"0513650d",
00000500 => x"10efc945",
00000501 => x"401c5ba0",
00000502 => x"c01c0785",
00000503 => x"27739002",
00000504 => x"478d3420",
00000505 => x"06f712e3",
00000506 => x"373000ef",
00000507 => x"90734781",
00000508 => x"400c3427",
00000509 => x"0513650d",
00000510 => x"10efcc45",
00000511 => x"401c5920",
00000512 => x"c01c0785",
00000513 => x"00202003",
00000514 => x"34202773",
00000515 => x"11e34791",
00000516 => x"00ef04f7",
00000517 => x"00013490",
00000518 => x"90734781",
00000519 => x"400c3427",
00000520 => x"0513650d",
00000521 => x"10efcfc5",
00000522 => x"401c5660",
00000523 => x"c01c0785",
00000524 => x"f0002783",
00000525 => x"2773c63e",
00000526 => x"47953420",
00000527 => x"00f71ee3",
00000528 => x"31b000ef",
00000529 => x"90734781",
00000530 => x"400c3427",
00000531 => x"0513650d",
00000532 => x"10efd2c5",
00000533 => x"401c53a0",
00000534 => x"c01c0785",
00000535 => x"00002123",
00000536 => x"34202773",
00000537 => x"1d634799",
00000538 => x"00ef7ef7",
00000539 => x"00012f10",
00000540 => x"90734781",
00000541 => x"400c3427",
00000542 => x"0513650d",
00000543 => x"10efd645",
00000544 => x"401c50e0",
00000545 => x"c01c0785",
00000546 => x"f0002023",
00000547 => x"34202773",
00000548 => x"1b63479d",
00000549 => x"00ef7cf7",
00000550 => x"00012c50",
00000551 => x"90734781",
00000552 => x"400c3427",
00000553 => x"0513650d",
00000554 => x"10efd945",
00000555 => x"401c4e20",
00000556 => x"c01c0785",
00000557 => x"00000073",
00000558 => x"34202773",
00000559 => x"196347ad",
00000560 => x"00ef7af7",
00000561 => x"00012990",
00000562 => x"90734781",
00000563 => x"400c3427",
00000564 => x"0513650d",
00000565 => x"10efdd45",
00000566 => x"27f34b60",
00000567 => x"07373010",
00000568 => x"8ff90010",
00000569 => x"78078e63",
00000570 => x"0785401c",
00000571 => x"10efc01c",
00000572 => x"007365a0",
00000573 => x"27730000",
00000574 => x"47a13420",
00000575 => x"76f71e63",
00000576 => x"25b000ef",
00000577 => x"90734781",
00000578 => x"400c3427",
00000579 => x"0513650d",
00000580 => x"10efe405",
00000581 => x"10ef47a0",
00000582 => x"0f633000",
00000583 => x"401c7605",
00000584 => x"45814501",
00000585 => x"c01c0785",
00000586 => x"334010ef",
00000587 => x"00010001",
00000588 => x"34202773",
00000589 => x"800007b7",
00000590 => x"1b63079d",
00000591 => x"00ef74f7",
00000592 => x"000121d0",
00000593 => x"55fd557d",
00000594 => x"314010ef",
00000595 => x"90734781",
00000596 => x"400c3427",
00000597 => x"0513650d",
00000598 => x"10efe6c5",
00000599 => x"27834320",
00000600 => x"6705fa00",
00000601 => x"85638ff9",
00000602 => x"401c7407",
00000603 => x"07854705",
00000604 => x"07b7c01c",
00000605 => x"c398ff00",
00000606 => x"00010001",
00000607 => x"34202773",
00000608 => x"800007b7",
00000609 => x"1163078d",
00000610 => x"00ef72f7",
00000611 => x"00011d10",
00000612 => x"90734781",
00000613 => x"400c3427",
00000614 => x"0513650d",
00000615 => x"10efe985",
00000616 => x"27833ee0",
00000617 => x"6705fa00",
00000618 => x"8f638ff9",
00000619 => x"401c7007",
00000620 => x"07854705",
00000621 => x"07b7c01c",
00000622 => x"c3d8ff00",
00000623 => x"00010001",
00000624 => x"34202773",
00000625 => x"800007b7",
00000626 => x"1b6307ad",
00000627 => x"00ef6ef7",
00000628 => x"000118d0",
00000629 => x"90734781",
00000630 => x"400c3427",
00000631 => x"0513650d",
00000632 => x"10efec45",
00000633 => x"00ef3aa0",
00000634 => x"0b631b90",
00000635 => x"401c6e05",
00000636 => x"45014581",
00000637 => x"c01c0785",
00000638 => x"1b1000ef",
00000639 => x"1cf000ef",
00000640 => x"1dd000ef",
00000641 => x"00010001",
00000642 => x"34202773",
00000643 => x"800007b7",
00000644 => x"136307c1",
00000645 => x"00ef6cf7",
00000646 => x"00011450",
00000647 => x"1a3000ef",
00000648 => x"90734781",
00000649 => x"400c3427",
00000650 => x"0513650d",
00000651 => x"10efef85",
00000652 => x"278335e0",
00000653 => x"6705fa00",
00000654 => x"87638ff9",
00000655 => x"10ef6c07",
00000656 => x"0b634410",
00000657 => x"401c6a05",
00000658 => x"07854501",
00000659 => x"10efc01c",
00000660 => x"053744d0",
00000661 => x"10ef8000",
00000662 => x"457d44b0",
00000663 => x"42d010ef",
00000664 => x"00010001",
00000665 => x"34202773",
00000666 => x"800007b7",
00000667 => x"116307c5",
00000668 => x"00ef68f7",
00000669 => x"00010e90",
00000670 => x"10ef4501",
00000671 => x"45014270",
00000672 => x"41b010ef",
00000673 => x"90734781",
00000674 => x"400c3427",
00000675 => x"0513650d",
00000676 => x"10eff2c5",
00000677 => x"10ef2fa0",
00000678 => x"0f632600",
00000679 => x"401c6605",
00000680 => x"c01c0785",
00000681 => x"2be010ef",
00000682 => x"2483fd75",
00000683 => x"2783fa00",
00000684 => x"777dfa00",
00000685 => x"8ff9177d",
00000686 => x"faf02023",
00000687 => x"fa002783",
00000688 => x"40000737",
00000689 => x"20238fd9",
00000690 => x"2223faf0",
00000691 => x"0001fa00",
00000692 => x"292010ef",
00000693 => x"0001fd75",
00000694 => x"00010001",
00000695 => x"286010ef",
00000696 => x"2023fd75",
00000697 => x"2773fa90",
00000698 => x"07b73420",
00000699 => x"07c98000",
00000700 => x"62f71063",
00000701 => x"067000ef",
00000702 => x"90734781",
00000703 => x"400c3427",
00000704 => x"0513650d",
00000705 => x"10eff605",
00000706 => x"10ef2860",
00000707 => x"01633190",
00000708 => x"401c6205",
00000709 => x"46854501",
00000710 => x"46010785",
00000711 => x"c01c4581",
00000712 => x"30d010ef",
00000713 => x"10ef4501",
00000714 => x"000133f0",
00000715 => x"34b010ef",
00000716 => x"0001fd75",
00000717 => x"27730001",
00000718 => x"07b73420",
00000719 => x"07cd8000",
00000720 => x"5ef71463",
00000721 => x"017000ef",
00000722 => x"30d010ef",
00000723 => x"90734781",
00000724 => x"400c3427",
00000725 => x"0513650d",
00000726 => x"10eff945",
00000727 => x"10ef2320",
00000728 => x"01632430",
00000729 => x"401c5e05",
00000730 => x"45854601",
00000731 => x"45010785",
00000732 => x"10efc01c",
00000733 => x"10ef2390",
00000734 => x"45012970",
00000735 => x"25d010ef",
00000736 => x"275010ef",
00000737 => x"00010001",
00000738 => x"34202773",
00000739 => x"800007b7",
00000740 => x"176307cd",
00000741 => x"00ef5af7",
00000742 => x"00017c40",
00000743 => x"22f010ef",
00000744 => x"90734781",
00000745 => x"a5833427",
00000746 => x"650d8181",
00000747 => x"fc850513",
00000748 => x"1dc010ef",
00000749 => x"062010ef",
00000750 => x"81818413",
00000751 => x"58050c63",
00000752 => x"0785401c",
00000753 => x"10efc01c",
00000754 => x"87aa0760",
00000755 => x"3e850513",
00000756 => x"00f537b3",
00000757 => x"10ef95be",
00000758 => x"00730860",
00000759 => x"27731050",
00000760 => x"07b73420",
00000761 => x"079d8000",
00000762 => x"56f70463",
00000763 => x"790000ef",
00000764 => x"55fd557d",
00000765 => x"068010ef",
00000766 => x"90734781",
00000767 => x"400c3427",
00000768 => x"0513650d",
00000769 => x"10ef0185",
00000770 => x"27f31860",
00000771 => x"07373010",
00000772 => x"8ff90010",
00000773 => x"54078e63",
00000774 => x"0785401c",
00000775 => x"10efc01c",
00000776 => x"27f332a0",
00000777 => x"26f33010",
00000778 => x"47093420",
00000779 => x"54e69063",
00000780 => x"52079863",
00000781 => x"726000ef",
00000782 => x"90734781",
00000783 => x"400c3427",
00000784 => x"0513650d",
00000785 => x"10ef0505",
00000786 => x"401c1460",
00000787 => x"07854509",
00000788 => x"00efc01c",
00000789 => x"27f32770",
00000790 => x"650dfff0",
00000791 => x"f9050513",
00000792 => x"12c010ef",
00000793 => x"342027f3",
00000794 => x"50078a63",
00000795 => x"6ee000ef",
00000796 => x"85936585",
00000797 => x"45093465",
00000798 => x"235000ef",
00000799 => x"650d400c",
00000800 => x"09450513",
00000801 => x"108010ef",
00000802 => x"2ee010ef",
00000803 => x"52050463",
00000804 => x"90734781",
00000805 => x"401c3427",
00000806 => x"c01c0785",
00000807 => x"3a8010ef",
00000808 => x"ff402483",
00000809 => x"892a85aa",
00000810 => x"8626650d",
00000811 => x"0bc50513",
00000812 => x"0dc010ef",
00000813 => x"864a46e5",
00000814 => x"450185a6",
00000815 => x"3b8010ef",
00000816 => x"4c051863",
00000817 => x"342027f3",
00000818 => x"4c079463",
00000819 => x"68e000ef",
00000820 => x"650d400c",
00000821 => x"0fc50513",
00000822 => x"0b4010ef",
00000823 => x"0785401c",
00000824 => x"4781c01c",
00000825 => x"34279073",
00000826 => x"260010ef",
00000827 => x"000480e7",
00000828 => x"342027f3",
00000829 => x"4a079063",
00000830 => x"00000073",
00000831 => x"680000ef",
00000832 => x"650d400c",
00000833 => x"12c50513",
00000834 => x"084010ef",
00000835 => x"0785401c",
00000836 => x"4781c01c",
00000837 => x"34279073",
00000838 => x"230010ef",
00000839 => x"0004a003",
00000840 => x"342027f3",
00000841 => x"46079c63",
00000842 => x"00000073",
00000843 => x"62e000ef",
00000844 => x"650d400c",
00000845 => x"15c50513",
00000846 => x"054010ef",
00000847 => x"0785401c",
00000848 => x"4781c01c",
00000849 => x"34279073",
00000850 => x"200010ef",
00000851 => x"0004a023",
00000852 => x"34202773",
00000853 => x"1763479d",
00000854 => x"007344f7",
00000855 => x"00ef0000",
00000856 => x"00015fc0",
00000857 => x"650d400c",
00000858 => x"18c50513",
00000859 => x"020010ef",
00000860 => x"0785401c",
00000861 => x"4781c01c",
00000862 => x"34279073",
00000863 => x"08100793",
00000864 => x"3a079073",
00000865 => x"3a0027f3",
00000866 => x"10734765",
00000867 => x"27733a07",
00000868 => x"17633a00",
00000869 => x"27f300f7",
00000870 => x"89633420",
00000871 => x"00014007",
00000872 => x"5dc000ef",
00000873 => x"650d400c",
00000874 => x"1bc50513",
00000875 => x"7e1000ef",
00000876 => x"0785401c",
00000877 => x"4781c01c",
00000878 => x"34279073",
00000879 => x"08100793",
00000880 => x"3a079073",
00000881 => x"3b002773",
00000882 => x"ababd7b7",
00000883 => x"dcd78793",
00000884 => x"3b079073",
00000885 => x"3b0027f3",
00000886 => x"00e79663",
00000887 => x"342027f3",
00000888 => x"3c078863",
00000889 => x"598000ef",
00000890 => x"90734781",
00000891 => x"400c3427",
00000892 => x"0513650d",
00000893 => x"00ef1ec5",
00000894 => x"27837970",
00000895 => x"6705fa00",
00000896 => x"89638ff9",
00000897 => x"27f33c07",
00000898 => x"8b853010",
00000899 => x"3a078c63",
00000900 => x"35b7401c",
00000901 => x"09371122",
00000902 => x"0785f000",
00000903 => x"8593c01c",
00000904 => x"d4b73445",
00000905 => x"2023aabb",
00000906 => x"861300b9",
00000907 => x"0537cdd4",
00000908 => x"10eff000",
00000909 => x"156312a0",
00000910 => x"27833805",
00000911 => x"84930009",
00000912 => x"9f63cdd4",
00000913 => x"27f33697",
00000914 => x"9b633420",
00000915 => x"00ef3607",
00000916 => x"000150c0",
00000917 => x"90734781",
00000918 => x"400c3427",
00000919 => x"0513650d",
00000920 => x"00ef2245",
00000921 => x"278372b0",
00000922 => x"6705fa00",
00000923 => x"81638ff9",
00000924 => x"27f33807",
00000925 => x"8b853010",
00000926 => x"36078463",
00000927 => x"74b7401c",
00000928 => x"09375566",
00000929 => x"0785f000",
00000930 => x"78848493",
00000931 => x"e637c01c",
00000932 => x"2223eeff",
00000933 => x"06130099",
00000934 => x"85a6dbb6",
00000935 => x"00490513",
00000936 => x"0bc010ef",
00000937 => x"32050c63",
00000938 => x"00492783",
00000939 => x"32979863",
00000940 => x"4aa000ef",
00000941 => x"90734781",
00000942 => x"400c3427",
00000943 => x"0513650d",
00000944 => x"00ef2585",
00000945 => x"27f36cb0",
00000946 => x"8b853010",
00000947 => x"32078863",
00000948 => x"0785401c",
00000949 => x"202fc01c",
00000950 => x"27730800",
00000951 => x"47893420",
00000952 => x"30f71c63",
00000953 => x"476000ef",
00000954 => x"907357fd",
00000955 => x"650d3207",
00000956 => x"29850513",
00000957 => x"699000ef",
00000958 => x"81c1a783",
00000959 => x"81c18493",
00000960 => x"30078463",
00000961 => x"b03025f3",
00000962 => x"0513650d",
00000963 => x"00ef2b05",
00000964 => x"409867f0",
00000965 => x"eb634785",
00000966 => x"000140e7",
00000967 => x"47894098",
00000968 => x"2ee7fc63",
00000969 => x"b05025f3",
00000970 => x"0513650d",
00000971 => x"00ef30c5",
00000972 => x"a4dd65f0",
00000973 => x"448000ef",
00000974 => x"c48ff06f",
00000975 => x"440000ef",
00000976 => x"c78ff06f",
00000977 => x"438000ef",
00000978 => x"cb0ff06f",
00000979 => x"0513650d",
00000980 => x"00ef95c5",
00000981 => x"000163b0",
00000982 => x"424000ef",
00000983 => x"ce4ff06f",
00000984 => x"41c000ef",
00000985 => x"d98ff06f",
00000986 => x"0513650d",
00000987 => x"00ef9905",
00000988 => x"f06f61f0",
00000989 => x"0001d8af",
00000990 => x"404000ef",
00000991 => x"dc0ff06f",
00000992 => x"3fc000ef",
00000993 => x"e18ff06f",
00000994 => x"0513650d",
00000995 => x"00019905",
00000996 => x"5fd000ef",
00000997 => x"e08ff06f",
00000998 => x"0513650d",
00000999 => x"bfcda0c5",
00001000 => x"3dc000ef",
00001001 => x"e24ff06f",
00001002 => x"3d4000ef",
00001003 => x"e48ff06f",
00001004 => x"3cc000ef",
00001005 => x"e68ff06f",
00001006 => x"3c4000ef",
00001007 => x"eb8ff06f",
00001008 => x"0513650d",
00001009 => x"00ef9905",
00001010 => x"f06f5c70",
00001011 => x"0001eaaf",
00001012 => x"0513650d",
00001013 => x"0001b205",
00001014 => x"5b5000ef",
00001015 => x"3a0000ef",
00001016 => x"ef4ff06f",
00001017 => x"0513650d",
00001018 => x"b7fdb305",
00001019 => x"0513650d",
00001020 => x"00ef9905",
00001021 => x"f06f59b0",
00001022 => x"0001ee6f",
00001023 => x"0513650d",
00001024 => x"00efb805",
00001025 => x"879358b0",
00001026 => x"f06f8101",
00001027 => x"0001f0ef",
00001028 => x"0513650d",
00001029 => x"00efb885",
00001030 => x"f06f5770",
00001031 => x"0001f06f",
00001032 => x"35c000ef",
00001033 => x"f28ff06f",
00001034 => x"354000ef",
00001035 => x"f5cff06f",
00001036 => x"34c000ef",
00001037 => x"f90ff06f",
00001038 => x"0513650d",
00001039 => x"00efc685",
00001040 => x"f06f54f0",
00001041 => x"0001f82f",
00001042 => x"334000ef",
00001043 => x"fa0ff06f",
00001044 => x"32c000ef",
00001045 => x"fc4ff06f",
00001046 => x"324000ef",
00001047 => x"fe8ff06f",
00001048 => x"31c000ef",
00001049 => x"80dff06f",
00001050 => x"314000ef",
00001051 => x"831ff06f",
00001052 => x"30c000ef",
00001053 => x"855ff06f",
00001054 => x"304000ef",
00001055 => x"889ff06f",
00001056 => x"0513650d",
00001057 => x"00efe145",
00001058 => x"f06f5070",
00001059 => x"000187bf",
00001060 => x"2ec000ef",
00001061 => x"8b1ff06f",
00001062 => x"0513650d",
00001063 => x"00ef9905",
00001064 => x"f06f4ef0",
00001065 => x"00018abf",
00001066 => x"2d4000ef",
00001067 => x"8e5ff06f",
00001068 => x"0513650d",
00001069 => x"00efa0c5",
00001070 => x"f06f4d70",
00001071 => x"00018d7f",
00001072 => x"2bc000ef",
00001073 => x"911ff06f",
00001074 => x"0513650d",
00001075 => x"00efa0c5",
00001076 => x"f06f4bf0",
00001077 => x"0001903f",
00001078 => x"2a4000ef",
00001079 => x"941ff06f",
00001080 => x"0513650d",
00001081 => x"00ef9905",
00001082 => x"f06f4a70",
00001083 => x"0001937f",
00001084 => x"28c000ef",
00001085 => x"985ff06f",
00001086 => x"0513650d",
00001087 => x"00019905",
00001088 => x"48d000ef",
00001089 => x"981ff06f",
00001090 => x"0513650d",
00001091 => x"bfcda0c5",
00001092 => x"26c000ef",
00001093 => x"9e5ff06f",
00001094 => x"0513650d",
00001095 => x"00ef9905",
00001096 => x"f06f46f0",
00001097 => x"00019d7f",
00001098 => x"f06f2c91",
00001099 => x"0001a1ff",
00001100 => x"0513650d",
00001101 => x"00ef9905",
00001102 => x"f06f4570",
00001103 => x"0001a13f",
00001104 => x"bca92c35",
00001105 => x"0513650d",
00001106 => x"00ef9905",
00001107 => x"bc894430",
00001108 => x"bc792429",
00001109 => x"0513650d",
00001110 => x"00ef9905",
00001111 => x"bc694330",
00001112 => x"0513650d",
00001113 => x"00ef95c5",
00001114 => x"00014270",
00001115 => x"b4e92c01",
00001116 => x"0513650d",
00001117 => x"00efe145",
00001118 => x"bc7d4170",
00001119 => x"25f32401",
00001120 => x"650d3420",
00001121 => x"08450513",
00001122 => x"405000ef",
00001123 => x"0001b4d5",
00001124 => x"be3d22f5",
00001125 => x"00000073",
00001126 => x"b69d22c9",
00001127 => x"00000073",
00001128 => x"b6792af1",
00001129 => x"00000073",
00001130 => x"be6d2ad1",
00001131 => x"bedd227d",
00001132 => x"b91d226d",
00001133 => x"0513650d",
00001134 => x"00ef9905",
00001135 => x"b12d3d30",
00001136 => x"b9492a75",
00001137 => x"0513650d",
00001138 => x"00019905",
00001139 => x"3c1000ef",
00001140 => x"0001b151",
00001141 => x"0513650d",
00001142 => x"bfcda0c5",
00001143 => x"b9d92245",
00001144 => x"0513650d",
00001145 => x"00019905",
00001146 => x"3a5000ef",
00001147 => x"0001b1e1",
00001148 => x"0513650d",
00001149 => x"bfcda0c5",
00001150 => x"b1fd2251",
00001151 => x"0513650d",
00001152 => x"00ef9905",
00001153 => x"b1cd38b0",
00001154 => x"0513650d",
00001155 => x"00ef2d45",
00001156 => x"409c37f0",
00001157 => x"ce0798e3",
00001158 => x"478d4098",
00001159 => x"00e7fa63",
00001160 => x"b06025f3",
00001161 => x"0513650d",
00001162 => x"00ef3305",
00001163 => x"00013630",
00001164 => x"47914098",
00001165 => x"00e7fa63",
00001166 => x"b07025f3",
00001167 => x"0513650d",
00001168 => x"00ef3545",
00001169 => x"000134b0",
00001170 => x"47954098",
00001171 => x"00e7fa63",
00001172 => x"b08025f3",
00001173 => x"0513650d",
00001174 => x"00ef3785",
00001175 => x"00013330",
00001176 => x"47994098",
00001177 => x"00e7fa63",
00001178 => x"b09025f3",
00001179 => x"0513650d",
00001180 => x"00ef39c5",
00001181 => x"000131b0",
00001182 => x"479d4098",
00001183 => x"00e7fa63",
00001184 => x"b0a025f3",
00001185 => x"0513650d",
00001186 => x"00ef3c05",
00001187 => x"00013030",
00001188 => x"47a14098",
00001189 => x"00e7fa63",
00001190 => x"b0b025f3",
00001191 => x"0513650d",
00001192 => x"00ef3e45",
00001193 => x"00012eb0",
00001194 => x"47a54098",
00001195 => x"00e7fa63",
00001196 => x"b0c025f3",
00001197 => x"0513650d",
00001198 => x"00ef4085",
00001199 => x"00012d30",
00001200 => x"47a94098",
00001201 => x"00e7fa63",
00001202 => x"b0d025f3",
00001203 => x"0513650d",
00001204 => x"00ef42c5",
00001205 => x"00012bb0",
00001206 => x"05136511",
00001207 => x"00efcd85",
00001208 => x"25f32af0",
00001209 => x"650dc020",
00001210 => x"45050513",
00001211 => x"2a1000ef",
00001212 => x"c00025f3",
00001213 => x"0513650d",
00001214 => x"00ef4685",
00001215 => x"40182930",
00001216 => x"81018413",
00001217 => x"8141a583",
00001218 => x"650d4014",
00001219 => x"0513863a",
00001220 => x"00ef47c5",
00001221 => x"401c27b0",
00001222 => x"45ed466d",
00001223 => x"650de385",
00001224 => x"4ac50513",
00001225 => x"269000ef",
00001226 => x"fadfe06f",
00001227 => x"b04025f3",
00001228 => x"0513650d",
00001229 => x"00ef2e85",
00001230 => x"b6cd2570",
00001231 => x"0513650d",
00001232 => x"b7cd4dc5",
00001233 => x"27730000",
00001234 => x"a023b000",
00001235 => x"678982e1",
00001236 => x"80078793",
00001237 => x"3007a073",
00001238 => x"65098082",
00001239 => x"466d1141",
00001240 => x"051345ed",
00001241 => x"c6067c45",
00001242 => x"225000ef",
00001243 => x"81418793",
00001244 => x"40b24398",
00001245 => x"c3980705",
00001246 => x"80820141",
00001247 => x"11416509",
00001248 => x"45ed466d",
00001249 => x"7d450513",
00001250 => x"00efc606",
00001251 => x"87932030",
00001252 => x"43988101",
00001253 => x"070540b2",
00001254 => x"0141c398",
00001255 => x"25038082",
00001256 => x"8159fe80",
00001257 => x"80828905",
00001258 => x"891d8985",
00001259 => x"67910592",
00001260 => x"87938d4d",
00001261 => x"8d5d7087",
00001262 => x"f8a02623",
00001263 => x"67918082",
00001264 => x"70078793",
00001265 => x"f8f02623",
00001266 => x"06938082",
00001267 => x"429cf8c0",
00001268 => x"07136711",
00001269 => x"8fd97007",
00001270 => x"8082c29c",
00001271 => x"f8002623",
00001272 => x"00008082",
00001273 => x"00000000",
00001274 => x"00000000",
00001275 => x"00000000",
00001276 => x"de067139",
00001277 => x"da1adc16",
00001278 => x"d62ad81e",
00001279 => x"d232d42e",
00001280 => x"ce3ad036",
00001281 => x"ca42cc3e",
00001282 => x"c672c846",
00001283 => x"c27ac476",
00001284 => x"2773c07e",
00001285 => x"10733410",
00001286 => x"27f33407",
00001287 => x"c3633420",
00001288 => x"16830607",
00001289 => x"458d0007",
00001290 => x"06138a8d",
00001291 => x"95630027",
00001292 => x"061300b6",
00001293 => x"00010047",
00001294 => x"34161073",
00001295 => x"7b63472d",
00001296 => x"000102f7",
00001297 => x"87936785",
00001298 => x"00015947",
00001299 => x"50f29782",
00001300 => x"535252e2",
00001301 => x"553253c2",
00001302 => x"561255a2",
00001303 => x"47725682",
00001304 => x"485247e2",
00001305 => x"4e3248c2",
00001306 => x"4f124ea2",
00001307 => x"61214f82",
00001308 => x"30200073",
00001309 => x"078a670d",
00001310 => x"4fc70713",
00001311 => x"439c97ba",
00001312 => x"00018782",
00001313 => x"80000737",
00001314 => x"ffd74713",
00001315 => x"474197ba",
00001316 => x"faf76ae3",
00001317 => x"078a670d",
00001318 => x"52c70713",
00001319 => x"439c97ba",
00001320 => x"00018782",
00001321 => x"8241a783",
00001322 => x"0001b755",
00001323 => x"8281a783",
00001324 => x"0001bf71",
00001325 => x"82c1a783",
00001326 => x"0001bf51",
00001327 => x"8301a783",
00001328 => x"0001b771",
00001329 => x"8341a783",
00001330 => x"0001b751",
00001331 => x"8381a783",
00001332 => x"0001bfb5",
00001333 => x"83c1a783",
00001334 => x"0001bf95",
00001335 => x"8401a783",
00001336 => x"0001b7b5",
00001337 => x"8441a783",
00001338 => x"0001b795",
00001339 => x"8481a783",
00001340 => x"0001bfb1",
00001341 => x"84c1a783",
00001342 => x"0001bf91",
00001343 => x"8501a783",
00001344 => x"0001b7b1",
00001345 => x"8541a783",
00001346 => x"0001b791",
00001347 => x"8581a783",
00001348 => x"0001bf35",
00001349 => x"85c1a783",
00001350 => x"0001bf15",
00001351 => x"8601a783",
00001352 => x"0001b735",
00001353 => x"8641a783",
00001354 => x"0000b715",
00001355 => x"00000000",
00001356 => x"00000000",
00001357 => x"00000000",
00001358 => x"650dc511",
00001359 => x"57050513",
00001360 => x"02d0006f",
00001361 => x"0513650d",
00001362 => x"bfdd5785",
00001363 => x"c84a1101",
00001364 => x"650d892a",
00001365 => x"0513ca26",
00001366 => x"64915805",
00001367 => x"c64ecc22",
00001368 => x"4471ce06",
00001369 => x"009000ef",
00001370 => x"e1448493",
00001371 => x"000159f1",
00001372 => x"008957b3",
00001373 => x"97a68bbd",
00001374 => x"0007c503",
00001375 => x"00ef1471",
00001376 => x"17e37de0",
00001377 => x"40f2ff34",
00001378 => x"44d24462",
00001379 => x"49b24942",
00001380 => x"80826105",
00001381 => x"1141650d",
00001382 => x"58450513",
00001383 => x"c422c606",
00001384 => x"7cc000ef",
00001385 => x"34202473",
00001386 => x"fb6347ad",
00001387 => x"07b70287",
00001388 => x"c7938000",
00001389 => x"97a2ffd7",
00001390 => x"7b634741",
00001391 => x"000100f7",
00001392 => x"0513650d",
00001393 => x"00ef7245",
00001394 => x"85227a60",
00001395 => x"a03d3741",
00001396 => x"078a670d",
00001397 => x"75070713",
00001398 => x"439c97ba",
00001399 => x"00018782",
00001400 => x"1793670d",
00001401 => x"07130024",
00001402 => x"97ba7947",
00001403 => x"8782439c",
00001404 => x"0513650d",
00001405 => x"000158c5",
00001406 => x"774000ef",
00001407 => x"0513650d",
00001408 => x"00ef73c5",
00001409 => x"257376a0",
00001410 => x"37893400",
00001411 => x"0513650d",
00001412 => x"00ef7445",
00001413 => x"257375a0",
00001414 => x"3f0d3430",
00001415 => x"40b24422",
00001416 => x"0513650d",
00001417 => x"01417f05",
00001418 => x"7440006f",
00001419 => x"0513650d",
00001420 => x"b7d95ac5",
00001421 => x"0513650d",
00001422 => x"bf7d5c85",
00001423 => x"0513650d",
00001424 => x"bf5d5dc5",
00001425 => x"0513650d",
00001426 => x"b77d5e85",
00001427 => x"0513650d",
00001428 => x"b75d6005",
00001429 => x"0513650d",
00001430 => x"bf796145",
00001431 => x"0513650d",
00001432 => x"bf596305",
00001433 => x"0513650d",
00001434 => x"b7796445",
00001435 => x"0513650d",
00001436 => x"b7596645",
00001437 => x"0513650d",
00001438 => x"bfbd6845",
00001439 => x"0513650d",
00001440 => x"bf9d6a05",
00001441 => x"0513650d",
00001442 => x"b7bd6b85",
00001443 => x"0513650d",
00001444 => x"b79d6d45",
00001445 => x"0513650d",
00001446 => x"bfb96e85",
00001447 => x"0513650d",
00001448 => x"bf996fc5",
00001449 => x"0513650d",
00001450 => x"b7b97105",
00001451 => x"e96347c1",
00001452 => x"879300a7",
00001453 => x"050a8241",
00001454 => x"c10c953e",
00001455 => x"80824501",
00001456 => x"80824505",
00001457 => x"00000000",
00001458 => x"ed6347c1",
00001459 => x"879300a7",
00001460 => x"050a8241",
00001461 => x"6785953e",
00001462 => x"59478793",
00001463 => x"4501c11c",
00001464 => x"00018082",
00001465 => x"80824505",
00001466 => x"00000000",
00001467 => x"c6061141",
00001468 => x"c226c422",
00001469 => x"301027f3",
00001470 => x"650de791",
00001471 => x"7c450513",
00001472 => x"66c000ef",
00001473 => x"87936785",
00001474 => x"90733f07",
00001475 => x"44013057",
00001476 => x"000144c5",
00001477 => x"04058522",
00001478 => x"0ff47413",
00001479 => x"1be33775",
00001480 => x"40b2fe94",
00001481 => x"44924422",
00001482 => x"80820141",
00001483 => x"ca261101",
00001484 => x"c452c64e",
00001485 => x"c05ac256",
00001486 => x"cc22ce06",
00001487 => x"4481c84a",
00001488 => x"5ac15a61",
00001489 => x"49914b0d",
00001490 => x"f13027f3",
00001491 => x"03448733",
00001492 => x"d7b30761",
00001493 => x"f79300e7",
00001494 => x"d5130ff7",
00001495 => x"09330047",
00001496 => x"87930355",
00001497 => x"f4130307",
00001498 => x"79130ff7",
00001499 => x"c5090ff9",
00001500 => x"03050513",
00001501 => x"5e8000ef",
00001502 => x"01240533",
00001503 => x"0ff57513",
00001504 => x"5dc000ef",
00001505 => x"01648663",
00001506 => x"02e00513",
00001507 => x"5d0000ef",
00001508 => x"9be30485",
00001509 => x"40f2fb34",
00001510 => x"44d24462",
00001511 => x"49b24942",
00001512 => x"4a924a22",
00001513 => x"61054b02",
00001514 => x"00008082",
00001515 => x"7179650d",
00001516 => x"7f850513",
00001517 => x"d422d606",
00001518 => x"d04ad226",
00001519 => x"00efce4e",
00001520 => x"65115ce0",
00001521 => x"82450513",
00001522 => x"5c4000ef",
00001523 => x"f14025f3",
00001524 => x"05136511",
00001525 => x"00ef8485",
00001526 => x"25f35b60",
00001527 => x"6511f110",
00001528 => x"86450513",
00001529 => x"5a8000ef",
00001530 => x"f1202473",
00001531 => x"85a26511",
00001532 => x"88050513",
00001533 => x"47cd2b61",
00001534 => x"00f41663",
00001535 => x"05136511",
00001536 => x"23698985",
00001537 => x"f13025f3",
00001538 => x"05136511",
00001539 => x"2bbd8a45",
00001540 => x"650d3f31",
00001541 => x"9a850513",
00001542 => x"65112b95",
00001543 => x"8c050513",
00001544 => x"27f323b5",
00001545 => x"83f93010",
00001546 => x"2c079663",
00001547 => x"05136511",
00001548 => x"00018d45",
00001549 => x"65112ba1",
00001550 => x"8f450513",
00001551 => x"27f32b81",
00001552 => x"f7933100",
00001553 => x"89630207",
00001554 => x"65112c07",
00001555 => x"90c50513",
00001556 => x"65112b35",
00001557 => x"91c50513",
00001558 => x"29732b15",
00001559 => x"44013010",
00001560 => x"44e94985",
00001561 => x"008997b3",
00001562 => x"0127f7b3",
00001563 => x"0513cb91",
00001564 => x"75130414",
00001565 => x"21dd0ff5",
00001566 => x"02000513",
00001567 => x"000121c5",
00001568 => x"11e30405",
00001569 => x"2473fe94",
00001570 => x"7793fc00",
00001571 => x"c7890014",
00001572 => x"05136511",
00001573 => x"29dd9305",
00001574 => x"00247793",
00001575 => x"6511c791",
00001576 => x"93850513",
00001577 => x"000121e5",
00001578 => x"c4098811",
00001579 => x"05136511",
00001580 => x"29e99445",
00001581 => x"05136511",
00001582 => x"29c994c5",
00001583 => x"6ba000ef",
00001584 => x"0f63c62a",
00001585 => x"00ef2405",
00001586 => x"45b277e0",
00001587 => x"6511862a",
00001588 => x"96450513",
00001589 => x"00012965",
00001590 => x"3b9000ef",
00001591 => x"651185aa",
00001592 => x"9a450513",
00001593 => x"65112165",
00001594 => x"9bc50513",
00001595 => x"25832145",
00001596 => x"6511fe00",
00001597 => x"9e050513",
00001598 => x"25832951",
00001599 => x"6511fe40",
00001600 => x"9f050513",
00001601 => x"65112161",
00001602 => x"a0050513",
00001603 => x"25832141",
00001604 => x"6511ff00",
00001605 => x"a3050513",
00001606 => x"65112995",
00001607 => x"a4c50513",
00001608 => x"250321b5",
00001609 => x"8911fe80",
00001610 => x"c11ff0ef",
00001611 => x"ff802583",
00001612 => x"05136511",
00001613 => x"2999a645",
00001614 => x"05136511",
00001615 => x"21b9a845",
00001616 => x"fe802503",
00001617 => x"f0ef8921",
00001618 => x"2583bf3f",
00001619 => x"6511ff40",
00001620 => x"a9c50513",
00001621 => x"65112925",
00001622 => x"ab850513",
00001623 => x"25032905",
00001624 => x"8941fe80",
00001625 => x"bd5ff0ef",
00001626 => x"ffc02583",
00001627 => x"05136511",
00001628 => x"2929ad05",
00001629 => x"05136511",
00001630 => x"2909af05",
00001631 => x"fe802503",
00001632 => x"04057513",
00001633 => x"bb5ff0ef",
00001634 => x"fe802783",
00001635 => x"0407f793",
00001636 => x"6511cfa1",
00001637 => x"b0850513",
00001638 => x"27032ed5",
00001639 => x"8b3dfec0",
00001640 => x"4785c701",
00001641 => x"00e79733",
00001642 => x"fec02403",
00001643 => x"883d8011",
00001644 => x"4785c401",
00001645 => x"00879433",
00001646 => x"fec02583",
00001647 => x"65114485",
00001648 => x"89bd81a1",
00001649 => x"00b494b3",
00001650 => x"00b415b3",
00001651 => x"02e585b3",
00001652 => x"862686a2",
00001653 => x"b0c50513",
00001654 => x"19632e55",
00001655 => x"65111494",
00001656 => x"051385a2",
00001657 => x"265db4c5",
00001658 => x"05136511",
00001659 => x"2e79b785",
00001660 => x"fe802503",
00001661 => x"f0ef8905",
00001662 => x"6511b43f",
00001663 => x"b9050513",
00001664 => x"25032671",
00001665 => x"8909fe80",
00001666 => x"b31ff0ef",
00001667 => x"05136511",
00001668 => x"2eadba85",
00001669 => x"fe802783",
00001670 => x"0207f793",
00001671 => x"10078e63",
00001672 => x"05136511",
00001673 => x"000190c5",
00001674 => x"65112695",
00001675 => x"bc050513",
00001676 => x"65112eb1",
00001677 => x"fe802403",
00001678 => x"be850513",
00001679 => x"65412e81",
00001680 => x"f0ef8d61",
00001681 => x"6511af7f",
00001682 => x"bf450513",
00001683 => x"05372681",
00001684 => x"8d610002",
00001685 => x"ae5ff0ef",
00001686 => x"05136511",
00001687 => x"263dc005",
00001688 => x"00040537",
00001689 => x"f0ef8d61",
00001690 => x"6511ad3f",
00001691 => x"c0c50513",
00001692 => x"05372e31",
00001693 => x"8d610008",
00001694 => x"ac1ff0ef",
00001695 => x"05136511",
00001696 => x"2629c185",
00001697 => x"00100537",
00001698 => x"f0ef8d61",
00001699 => x"6511aaff",
00001700 => x"c2450513",
00001701 => x"05372ce5",
00001702 => x"8d610020",
00001703 => x"a9dff0ef",
00001704 => x"05136511",
00001705 => x"24ddc305",
00001706 => x"00400537",
00001707 => x"f0ef8d61",
00001708 => x"6511a8bf",
00001709 => x"c3c50513",
00001710 => x"05372cd1",
00001711 => x"8d610100",
00001712 => x"a79ff0ef",
00001713 => x"05136511",
00001714 => x"24c9c485",
00001715 => x"00800537",
00001716 => x"f0ef8d61",
00001717 => x"6511a67f",
00001718 => x"c5450513",
00001719 => x"05372c45",
00001720 => x"8d610200",
00001721 => x"50b25422",
00001722 => x"59025492",
00001723 => x"614549f2",
00001724 => x"a49ff06f",
00001725 => x"89634705",
00001726 => x"470900e7",
00001727 => x"00e79a63",
00001728 => x"05136511",
00001729 => x"b33d8ec5",
00001730 => x"05136511",
00001731 => x"b31d8dc5",
00001732 => x"05136511",
00001733 => x"bb398e45",
00001734 => x"05136511",
00001735 => x"bb0d9145",
00001736 => x"05136511",
00001737 => x"249d9905",
00001738 => x"0001bb45",
00001739 => x"05136511",
00001740 => x"2ca9b645",
00001741 => x"0001bd55",
00001742 => x"05136511",
00001743 => x"b5ed9145",
00001744 => x"65110000",
00001745 => x"c6050513",
00001746 => x"0000a415",
00001747 => x"65917115",
00001748 => x"0613c5d2",
00001749 => x"85930b00",
00001750 => x"850ad645",
00001751 => x"cda26a11",
00001752 => x"c1dac3d6",
00001753 => x"cf86df5e",
00001754 => x"c9cacba6",
00001755 => x"dd62c7ce",
00001756 => x"00ef840a",
00001757 => x"8ad23370",
00001758 => x"80000b37",
00001759 => x"00014b91",
00001760 => x"cd8a0513",
00001761 => x"89a222e5",
00001762 => x"00014901",
00001763 => x"0009ac03",
00001764 => x"00014481",
00001765 => x"009b57b3",
00001766 => x"0187f7b3",
00001767 => x"02300513",
00001768 => x"0513e781",
00001769 => x"00010200",
00001770 => x"04852a55",
00001771 => x"02000793",
00001772 => x"fef492e3",
00001773 => x"09910905",
00001774 => x"fd791ae3",
00001775 => x"191c0441",
00001776 => x"fcf410e3",
00001777 => x"40fe446e",
00001778 => x"494e44de",
00001779 => x"4a2e49be",
00001780 => x"5bfa4b0e",
00001781 => x"85135c6a",
00001782 => x"4a9ecd8a",
00001783 => x"a279612d",
00001784 => x"00000000",
00001785 => x"c6061141",
00001786 => x"2673c422",
00001787 => x"15b73010",
00001788 => x"85934000",
00001789 => x"77b31055",
00001790 => x"440100b6",
00001791 => x"00b78863",
00001792 => x"e5094405",
00001793 => x"05136511",
00001794 => x"2249cdc5",
00001795 => x"852240b2",
00001796 => x"01414422",
00001797 => x"25038082",
00001798 => x"8145fe80",
00001799 => x"80828905",
00001800 => x"c02a1141",
00001801 => x"0793c22e",
00001802 => x"a023f900",
00001803 => x"47120007",
00001804 => x"f8e02a23",
00001805 => x"c3984702",
00001806 => x"80820141",
00001807 => x"00011141",
00001808 => x"f9402783",
00001809 => x"f9002703",
00001810 => x"f9402683",
00001811 => x"fed79ae3",
00001812 => x"c23ec03a",
00001813 => x"45924502",
00001814 => x"80820141",
00001815 => x"f9800693",
00001816 => x"c290567d",
00001817 => x"c2ccc288",
00001818 => x"00008082",
00001819 => x"68111141",
00001820 => x"00058523",
00001821 => x"00544781",
00001822 => x"e2480813",
00001823 => x"00014729",
00001824 => x"02e57633",
00001825 => x"00f688b3",
00001826 => x"96420785",
00001827 => x"00064603",
00001828 => x"02e55533",
00001829 => x"00c88023",
00001830 => x"fee794e3",
00001831 => x"47258636",
00001832 => x"03000513",
00001833 => x"00964803",
00001834 => x"177d87ba",
00001835 => x"83410742",
00001836 => x"00a81863",
00001837 => x"000604a3",
00001838 => x"f76d167d",
00001839 => x"00014781",
00001840 => x"470197b6",
00001841 => x"0007c603",
00001842 => x"0513ca11",
00001843 => x"972e0017",
00001844 => x"00c70023",
00001845 => x"01051713",
00001846 => x"00018341",
00001847 => x"fff78613",
00001848 => x"00f69863",
00001849 => x"802395ba",
00001850 => x"01410005",
00001851 => x"00018082",
00001852 => x"bfc987b2",
00001853 => x"25030000",
00001854 => x"8149fe80",
00001855 => x"80828905",
00001856 => x"fa002023",
00001857 => x"fe002703",
00001858 => x"47810506",
00001859 => x"02a75533",
00001860 => x"17796705",
00001861 => x"81410542",
00001862 => x"02a76463",
00001863 => x"8a058a85",
00001864 => x"06fa07e2",
00001865 => x"8fd5898d",
00001866 => x"8fd10676",
00001867 => x"8fcd05da",
00001868 => x"17378fc9",
00001869 => x"8fd91000",
00001870 => x"faf02023",
00001871 => x"00018082",
00001872 => x"ffe78813",
00001873 => x"0fd87813",
00001874 => x"00081863",
00001875 => x"0001810d",
00001876 => x"f7930785",
00001877 => x"b7c90ff7",
00001878 => x"bfdd8105",
00001879 => x"faa02223",
00001880 => x"25038082",
00001881 => x"817dfa00",
00001882 => x"00008082",
00001883 => x"46b54729",
00001884 => x"00054783",
00001885 => x"e3990505",
00001886 => x"00018082",
00001887 => x"00e79463",
00001888 => x"fad02223",
00001889 => x"faf02223",
00001890 => x"0000b7e5",
00001891 => x"d422715d",
00001892 => x"6411c2be",
00001893 => x"d226185c",
00001894 => x"cc52ce4e",
00001895 => x"c85aca56",
00001896 => x"d04ad606",
00001897 => x"dc32da2e",
00001898 => x"c0bade36",
00001899 => x"c6c6c4c2",
00001900 => x"0993c03e",
00001901 => x"4a290250",
00001902 => x"04934ab5",
00001903 => x"0b130730",
00001904 => x"04130750",
00001905 => x"0001e304",
00001906 => x"00054783",
00001907 => x"9d63c785",
00001908 => x"47830d37",
00001909 => x"09130015",
00001910 => x"87630025",
00001911 => x"e5630697",
00001912 => x"071302f4",
00001913 => x"8b630630",
00001914 => x"071306e7",
00001915 => x"81630690",
00001916 => x"000108e7",
00001917 => x"542250b2",
00001918 => x"59025492",
00001919 => x"4a6249f2",
00001920 => x"4b424ad2",
00001921 => x"80826161",
00001922 => x"09678863",
00001923 => x"07800713",
00001924 => x"fee792e3",
00001925 => x"00544782",
00001926 => x"438c8536",
00001927 => x"00478713",
00001928 => x"0613c03a",
00001929 => x"47010200",
00001930 => x"00e5d7b3",
00001931 => x"97a28bbd",
00001932 => x"0007c783",
00001933 => x"16fd0711",
00001934 => x"00f68423",
00001935 => x"fec716e3",
00001936 => x"00010623",
00001937 => x"0001a801",
00001938 => x"43884782",
00001939 => x"00478713",
00001940 => x"0001c03a",
00001941 => x"f19ff0ef",
00001942 => x"b7bd854a",
00001943 => x"87134782",
00001944 => x"c7830047",
00001945 => x"c03a0007",
00001946 => x"faf02223",
00001947 => x"0001b7f5",
00001948 => x"43884782",
00001949 => x"00478713",
00001950 => x"5963c03a",
00001951 => x"07930005",
00001952 => x"053302d0",
00001953 => x"222340a0",
00001954 => x"0001faf0",
00001955 => x"0001004c",
00001956 => x"dddff0ef",
00001957 => x"bf7d0048",
00001958 => x"004c4782",
00001959 => x"00478713",
00001960 => x"c03a4388",
00001961 => x"0001b7f5",
00001962 => x"01479463",
00001963 => x"fb502223",
00001964 => x"00150913",
00001965 => x"0000bf55",
00001966 => x"872a47cd",
00001967 => x"02a7e263",
00001968 => x"000f17b7",
00001969 => x"88878793",
00001970 => x"00a7d7b3",
00001971 => x"45058b85",
00001972 => x"1733cb91",
00001973 => x"207300e5",
00001974 => x"45013047",
00001975 => x"00018082",
00001976 => x"00014505",
00001977 => x"00008082",
00001978 => x"00011141",
00001979 => x"c80026f3",
00001980 => x"c0002773",
00001981 => x"c80027f3",
00001982 => x"fed79ae3",
00001983 => x"c23ec03a",
00001984 => x"45924502",
00001985 => x"80820141",
00001986 => x"90734781",
00001987 => x"9073b007",
00001988 => x"1073b805",
00001989 => x"8082b005",
00001990 => x"00011141",
00001991 => x"c82026f3",
00001992 => x"c0202773",
00001993 => x"c82027f3",
00001994 => x"fed79ae3",
00001995 => x"c23ec03a",
00001996 => x"45924502",
00001997 => x"80820141",
00001998 => x"90734781",
00001999 => x"9073b027",
00002000 => x"1073b825",
00002001 => x"8082b025",
00002002 => x"34109073",
00002003 => x"80936089",
00002004 => x"b0738000",
00002005 => x"00733000",
00002006 => x"00003020",
00002007 => x"100527af",
00002008 => x"00b78663",
00002009 => x"00052003",
00002010 => x"80824505",
00002011 => x"18c5252f",
00002012 => x"00a03533",
00002013 => x"11418082",
00002014 => x"010107b7",
00002015 => x"8793c622",
00002016 => x"90731017",
00002017 => x"90733a07",
00002018 => x"90733a17",
00002019 => x"90733a27",
00002020 => x"90733a37",
00002021 => x"90733a47",
00002022 => x"90733a57",
00002023 => x"90733a67",
00002024 => x"90733a77",
00002025 => x"90733a87",
00002026 => x"90733a97",
00002027 => x"90733aa7",
00002028 => x"90733ab7",
00002029 => x"90733ac7",
00002030 => x"90733ad7",
00002031 => x"90733ae7",
00002032 => x"24733af7",
00002033 => x"26f33a00",
00002034 => x"23f33a10",
00002035 => x"22f33a20",
00002036 => x"27733a30",
00002037 => x"2ff33a40",
00002038 => x"2f733a50",
00002039 => x"2ef33a60",
00002040 => x"2e733a70",
00002041 => x"23733a80",
00002042 => x"27f33a90",
00002043 => x"28f33aa0",
00002044 => x"28733ab0",
00002045 => x"25f33ac0",
00002046 => x"26733ad0",
00002047 => x"25733ae0",
00002048 => x"96a23af0",
00002049 => x"9696969e",
00002050 => x"977e9736",
00002051 => x"9776977a",
00002052 => x"971a9772",
00002053 => x"97c697ba",
00002054 => x"97ae97c2",
00002055 => x"97aa97b2",
00002056 => x"0087d513",
00002057 => x"0107d713",
00002058 => x"77134432",
00002059 => x"75130ff7",
00002060 => x"953a0ff5",
00002061 => x"0ff7f713",
00002062 => x"83e1953a",
00002063 => x"0141953e",
00002064 => x"00008082",
00002065 => x"3a0027f3",
00002066 => x"f007f793",
00002067 => x"3a079073",
00002068 => x"907357fd",
00002069 => x"27733b07",
00002070 => x"457d3b00",
00002071 => x"00a757b3",
00002072 => x"c3998b85",
00002073 => x"f97d157d",
00002074 => x"050d4785",
00002075 => x"00a79533",
00002076 => x"00008082",
00002077 => x"87aa471d",
00002078 => x"40c77863",
00002079 => x"fff60713",
00002080 => x"45058e79",
00002081 => x"40061463",
00002082 => x"0037f513",
00002083 => x"0613050e",
00002084 => x"f8130ff0",
00002085 => x"163300f7",
00002086 => x"96b300a6",
00002087 => x"187d00a6",
00002088 => x"46134539",
00002089 => x"6b63fff6",
00002090 => x"68910105",
00002091 => x"00281513",
00002092 => x"e4488893",
00002093 => x"41089546",
00002094 => x"00018502",
00002095 => x"3a002573",
00002096 => x"10738e69",
00002097 => x"00013a06",
00002098 => x"00275613",
00002099 => x"fff64613",
00002100 => x"03f7f513",
00002101 => x"07938e6d",
00002102 => x"5593fff5",
00002103 => x"07130037",
00002104 => x"8dd103e0",
00002105 => x"0cf76463",
00002106 => x"078a6711",
00002107 => x"e8070713",
00002108 => x"439c97ba",
00002109 => x"00018782",
00002110 => x"3a102573",
00002111 => x"10738e69",
00002112 => x"b7d93a16",
00002113 => x"3a202573",
00002114 => x"10738e69",
00002115 => x"bf6d3a26",
00002116 => x"3a302573",
00002117 => x"10738e69",
00002118 => x"b77d3a36",
00002119 => x"3a402573",
00002120 => x"10738e69",
00002121 => x"b74d3a46",
00002122 => x"3a502573",
00002123 => x"10738e69",
00002124 => x"bf593a56",
00002125 => x"3a602573",
00002126 => x"10738e69",
00002127 => x"b7693a66",
00002128 => x"3a702573",
00002129 => x"10738e69",
00002130 => x"bfbd3a76",
00002131 => x"3a802573",
00002132 => x"10738e69",
00002133 => x"bf8d3a86",
00002134 => x"3a902573",
00002135 => x"10738e69",
00002136 => x"b79d3a96",
00002137 => x"3aa02573",
00002138 => x"10738e69",
00002139 => x"bfa93aa6",
00002140 => x"3ab02573",
00002141 => x"10738e69",
00002142 => x"b7b93ab6",
00002143 => x"3ac02573",
00002144 => x"10738e69",
00002145 => x"b7893ac6",
00002146 => x"3ad02573",
00002147 => x"10738e69",
00002148 => x"bf1d3ad6",
00002149 => x"3ae02573",
00002150 => x"10738e69",
00002151 => x"b72d3ae6",
00002152 => x"3af02573",
00002153 => x"10738e69",
00002154 => x"bf393af6",
00002155 => x"3b059073",
00002156 => x"a8bd4541",
00002157 => x"3b159073",
00002158 => x"0001bfe5",
00002159 => x"3b259073",
00002160 => x"0001bfc5",
00002161 => x"3b359073",
00002162 => x"0001b7e5",
00002163 => x"3b459073",
00002164 => x"0001b7c5",
00002165 => x"3b559073",
00002166 => x"0001bfe1",
00002167 => x"3b659073",
00002168 => x"0001bfc1",
00002169 => x"3b759073",
00002170 => x"0001b7e1",
00002171 => x"3b859073",
00002172 => x"0001b7c1",
00002173 => x"3b959073",
00002174 => x"0001bf65",
00002175 => x"3ba59073",
00002176 => x"0001bf45",
00002177 => x"3bb59073",
00002178 => x"0001b765",
00002179 => x"3bc59073",
00002180 => x"0001b745",
00002181 => x"3bd59073",
00002182 => x"0001bf61",
00002183 => x"3be59073",
00002184 => x"0001bf41",
00002185 => x"3bf59073",
00002186 => x"0001b761",
00002187 => x"3c059073",
00002188 => x"157d0001",
00002189 => x"47b9fd75",
00002190 => x"1907e663",
00002191 => x"87936791",
00002192 => x"080af7c7",
00002193 => x"2783983e",
00002194 => x"87820008",
00002195 => x"3c159073",
00002196 => x"0001b785",
00002197 => x"3c259073",
00002198 => x"0001bfa1",
00002199 => x"3c359073",
00002200 => x"0001bf81",
00002201 => x"3c459073",
00002202 => x"0001b7a1",
00002203 => x"3c559073",
00002204 => x"0001b781",
00002205 => x"3c659073",
00002206 => x"0001bf25",
00002207 => x"3c759073",
00002208 => x"0001bf05",
00002209 => x"3c859073",
00002210 => x"0001b725",
00002211 => x"3c959073",
00002212 => x"0001b705",
00002213 => x"3ca59073",
00002214 => x"0001bf21",
00002215 => x"3cb59073",
00002216 => x"0001bf01",
00002217 => x"3cc59073",
00002218 => x"0001b721",
00002219 => x"3cd59073",
00002220 => x"0001b701",
00002221 => x"3ce59073",
00002222 => x"0001bde5",
00002223 => x"3cf59073",
00002224 => x"0001bdc5",
00002225 => x"3d059073",
00002226 => x"0001b5e5",
00002227 => x"3d159073",
00002228 => x"0001b5c5",
00002229 => x"3d259073",
00002230 => x"0001bde1",
00002231 => x"3d359073",
00002232 => x"0001bdc1",
00002233 => x"3d459073",
00002234 => x"0001b5e1",
00002235 => x"3d559073",
00002236 => x"0001b5c1",
00002237 => x"3d659073",
00002238 => x"0001bd65",
00002239 => x"3d759073",
00002240 => x"0001bd45",
00002241 => x"3d859073",
00002242 => x"0001b565",
00002243 => x"3d959073",
00002244 => x"0001b545",
00002245 => x"3da59073",
00002246 => x"0001bd61",
00002247 => x"3db59073",
00002248 => x"0001bd41",
00002249 => x"3dc59073",
00002250 => x"0001b561",
00002251 => x"3dd59073",
00002252 => x"0001b541",
00002253 => x"3de59073",
00002254 => x"0001bda5",
00002255 => x"3df59073",
00002256 => x"0001bd85",
00002257 => x"3e059073",
00002258 => x"0001b5a5",
00002259 => x"3e159073",
00002260 => x"0001b585",
00002261 => x"3e259073",
00002262 => x"0001bda1",
00002263 => x"3e359073",
00002264 => x"0001bd81",
00002265 => x"3e459073",
00002266 => x"0001b5a1",
00002267 => x"3e559073",
00002268 => x"0001b581",
00002269 => x"3e659073",
00002270 => x"0001bd25",
00002271 => x"3e759073",
00002272 => x"0001bd05",
00002273 => x"3e859073",
00002274 => x"0001b525",
00002275 => x"3e959073",
00002276 => x"0001b505",
00002277 => x"3ea59073",
00002278 => x"0001bd21",
00002279 => x"3eb59073",
00002280 => x"0001bd01",
00002281 => x"3ec59073",
00002282 => x"0001b521",
00002283 => x"3ed59073",
00002284 => x"0001b501",
00002285 => x"3ee59073",
00002286 => x"0001bbe5",
00002287 => x"3ef59073",
00002288 => x"0001bbc5",
00002289 => x"3a0027f3",
00002290 => x"90738edd",
00002291 => x"00013a06",
00002292 => x"80824501",
00002293 => x"3a1027f3",
00002294 => x"90738edd",
00002295 => x"bfcd3a16",
00002296 => x"3a2027f3",
00002297 => x"90738edd",
00002298 => x"b7dd3a26",
00002299 => x"3a3027f3",
00002300 => x"90738edd",
00002301 => x"bfe93a36",
00002302 => x"3a4027f3",
00002303 => x"90738edd",
00002304 => x"b7f93a46",
00002305 => x"3a5027f3",
00002306 => x"90738edd",
00002307 => x"b7c93a56",
00002308 => x"3a6027f3",
00002309 => x"90738edd",
00002310 => x"bf5d3a66",
00002311 => x"3a7027f3",
00002312 => x"90738edd",
00002313 => x"b76d3a76",
00002314 => x"3a8027f3",
00002315 => x"90738edd",
00002316 => x"bf793a86",
00002317 => x"3a9027f3",
00002318 => x"90738edd",
00002319 => x"bf493a96",
00002320 => x"3aa027f3",
00002321 => x"90738edd",
00002322 => x"b7593aa6",
00002323 => x"3ab027f3",
00002324 => x"90738edd",
00002325 => x"bfad3ab6",
00002326 => x"3ac027f3",
00002327 => x"90738edd",
00002328 => x"b7bd3ac6",
00002329 => x"3ad027f3",
00002330 => x"90738edd",
00002331 => x"b78d3ad6",
00002332 => x"3ae027f3",
00002333 => x"90738edd",
00002334 => x"bf993ae6",
00002335 => x"3af027f3",
00002336 => x"90738edd",
00002337 => x"b7a93af6",
00002338 => x"00014505",
00002339 => x"00008082",
00002340 => x"90734785",
00002341 => x"9073b037",
00002342 => x"9073b047",
00002343 => x"9073b057",
00002344 => x"9073b067",
00002345 => x"9073b077",
00002346 => x"9073b087",
00002347 => x"9073b097",
00002348 => x"9073b0a7",
00002349 => x"9073b0b7",
00002350 => x"9073b0c7",
00002351 => x"9073b0d7",
00002352 => x"9073b0e7",
00002353 => x"9073b0f7",
00002354 => x"9073b107",
00002355 => x"9073b117",
00002356 => x"9073b127",
00002357 => x"9073b137",
00002358 => x"9073b147",
00002359 => x"9073b157",
00002360 => x"9073b167",
00002361 => x"9073b177",
00002362 => x"9073b187",
00002363 => x"9073b197",
00002364 => x"9073b1a7",
00002365 => x"9073b1b7",
00002366 => x"9073b1c7",
00002367 => x"2773b1d7",
00002368 => x"27f3b030",
00002369 => x"97bab040",
00002370 => x"b0502773",
00002371 => x"277397ba",
00002372 => x"97bab060",
00002373 => x"b0702773",
00002374 => x"277397ba",
00002375 => x"97bab080",
00002376 => x"b0902773",
00002377 => x"277397ba",
00002378 => x"97bab0a0",
00002379 => x"b0b02773",
00002380 => x"277397ba",
00002381 => x"97bab0c0",
00002382 => x"b0d02773",
00002383 => x"277397ba",
00002384 => x"97bab0e0",
00002385 => x"b0f02773",
00002386 => x"277397ba",
00002387 => x"97bab100",
00002388 => x"b1102773",
00002389 => x"277397ba",
00002390 => x"97bab120",
00002391 => x"b1302773",
00002392 => x"277397ba",
00002393 => x"97bab140",
00002394 => x"b1502773",
00002395 => x"277397ba",
00002396 => x"97bab160",
00002397 => x"b1702773",
00002398 => x"277397ba",
00002399 => x"97bab180",
00002400 => x"b1902573",
00002401 => x"257397aa",
00002402 => x"97aab1a0",
00002403 => x"b1b02573",
00002404 => x"257397aa",
00002405 => x"97aab1c0",
00002406 => x"b1d02573",
00002407 => x"8082953e",
00002408 => x"fe802503",
00002409 => x"89058151",
00002410 => x"891d8082",
00002411 => x"89858a05",
00002412 => x"06220512",
00002413 => x"058e8d51",
00002414 => x"fb000793",
00002415 => x"a0238d4d",
00002416 => x"65130007",
00002417 => x"c3880015",
00002418 => x"07138082",
00002419 => x"431cfb00",
00002420 => x"c31c9bdd",
00002421 => x"00008082",
00002422 => x"faa02a23",
00002423 => x"fb002783",
00002424 => x"fe07cee3",
00002425 => x"fb002503",
00002426 => x"45138179",
00002427 => x"89050015",
00002428 => x"00008082",
00002429 => x"fb002783",
00002430 => x"0047e793",
00002431 => x"faf02823",
00002432 => x"fb002783",
00002433 => x"fe07cee3",
00002434 => x"00008082",
00002435 => x"fb002783",
00002436 => x"0027e793",
00002437 => x"faf02823",
00002438 => x"fb002783",
00002439 => x"fe07cee3",
00002440 => x"25038082",
00002441 => x"814dfe80",
00002442 => x"80828905",
00002443 => x"f793891d",
00002444 => x"8a0d0016",
00002445 => x"07be052a",
00002446 => x"8fc98985",
00002447 => x"8fd10636",
00002448 => x"071305a6",
00002449 => x"8fcdfa80",
00002450 => x"00072023",
00002451 => x"1007e793",
00002452 => x"8082c31c",
00002453 => x"fa800713",
00002454 => x"f793431c",
00002455 => x"c31ceff7",
00002456 => x"00008082",
00002457 => x"faa02623",
00002458 => x"fa802783",
00002459 => x"fe07cee3",
00002460 => x"fac02503",
00002461 => x"25038082",
00002462 => x"817dfa80",
00002463 => x"25038082",
00002464 => x"8141fe80",
00002465 => x"80828905",
00002466 => x"f8400713",
00002467 => x"47854314",
00002468 => x"00a797b3",
00002469 => x"c31c8fd5",
00002470 => x"22238082",
00002471 => x"8082f8a0",
00002472 => x"f8a02023",
00002473 => x"00008082",
00002474 => x"00a5c7b3",
00002475 => x"0037f793",
00002476 => x"00c508b3",
00002477 => x"06079263",
00002478 => x"00300793",
00002479 => x"04c7fe63",
00002480 => x"00357793",
00002481 => x"00050713",
00002482 => x"06079863",
00002483 => x"ffc8f613",
00002484 => x"fe060793",
00002485 => x"08f76c63",
00002486 => x"02c77c63",
00002487 => x"00058693",
00002488 => x"00070793",
00002489 => x"0006a803",
00002490 => x"00478793",
00002491 => x"00468693",
00002492 => x"ff07ae23",
00002493 => x"fec7e8e3",
00002494 => x"fff60793",
00002495 => x"40e787b3",
00002496 => x"ffc7f793",
00002497 => x"00478793",
00002498 => x"00f70733",
00002499 => x"00f585b3",
00002500 => x"01176863",
00002501 => x"00008067",
00002502 => x"00050713",
00002503 => x"ff157ce3",
00002504 => x"0005c783",
00002505 => x"00170713",
00002506 => x"00158593",
00002507 => x"fef70fa3",
00002508 => x"ff1768e3",
00002509 => x"00008067",
00002510 => x"0005c683",
00002511 => x"00170713",
00002512 => x"00377793",
00002513 => x"fed70fa3",
00002514 => x"00158593",
00002515 => x"f80780e3",
00002516 => x"0005c683",
00002517 => x"00170713",
00002518 => x"00377793",
00002519 => x"fed70fa3",
00002520 => x"00158593",
00002521 => x"fc079ae3",
00002522 => x"f65ff06f",
00002523 => x"0045a683",
00002524 => x"0005a283",
00002525 => x"0085af83",
00002526 => x"00c5af03",
00002527 => x"0105ae83",
00002528 => x"0145ae03",
00002529 => x"0185a303",
00002530 => x"01c5a803",
00002531 => x"00d72223",
00002532 => x"0205a683",
00002533 => x"00572023",
00002534 => x"01f72423",
00002535 => x"01e72623",
00002536 => x"01d72823",
00002537 => x"01c72a23",
00002538 => x"00672c23",
00002539 => x"01072e23",
00002540 => x"02d72023",
00002541 => x"02470713",
00002542 => x"02458593",
00002543 => x"faf768e3",
00002544 => x"f19ff06f",
00002545 => x"315b6325",
00002546 => x"6b6f5b6d",
00002547 => x"5b63255d",
00002548 => x"000a6d30",
00002549 => x"315b6325",
00002550 => x"41465b6d",
00002551 => x"44454c49",
00002552 => x"5b63255d",
00002553 => x"000a6d30",
00002554 => x"203c3c0a",
00002555 => x"434f5250",
00002556 => x"4f535345",
00002557 => x"50432f52",
00002558 => x"45542055",
00002559 => x"3e205453",
00002560 => x"00000a3e",
00002561 => x"6c697562",
00002562 => x"4a203a64",
00002563 => x"31206e61",
00002564 => x"30322031",
00002565 => x"31203132",
00002566 => x"38313a36",
00002567 => x"0a39333a",
00002568 => x"00000000",
00002569 => x"696d6f43",
00002570 => x"6620676e",
00002571 => x"206d6f72",
00002572 => x"64726168",
00002573 => x"65726177",
00002574 => x"73657220",
00002575 => x"203f7465",
00002576 => x"00000000",
00002577 => x"0a736579",
00002578 => x"00000000",
00002579 => x"6e6b6e75",
00002580 => x"206e776f",
00002581 => x"61636d28",
00002582 => x"20657375",
00002583 => x"54203d21",
00002584 => x"5f504152",
00002585 => x"45444f43",
00002586 => x"5345525f",
00002587 => x"0a295445",
00002588 => x"00000000",
00002589 => x"6e490a0a",
00002590 => x"61697469",
00002591 => x"697a696c",
00002592 => x"4e20676e",
00002593 => x"56524f45",
00002594 => x"52203233",
00002595 => x"2e2e4554",
00002596 => x"0000202e",
00002597 => x"20455452",
00002598 => x"6f727265",
00002599 => x"25282072",
00002600 => x"0a212969",
00002601 => x"00000000",
00002602 => x"20515249",
00002603 => x"62616e65",
00002604 => x"6520656c",
00002605 => x"726f7272",
00002606 => x"69252820",
00002607 => x"000a2129",
00002608 => x"6174530a",
00002609 => x"6e697472",
00002610 => x"65742067",
00002611 => x"2e737473",
00002612 => x"0a0a2e2e",
00002613 => x"00000000",
00002614 => x"5d69255b",
00002615 => x"5d6d5b20",
00002616 => x"74736e69",
00002617 => x"5b746572",
00002618 => x"63205d68",
00002619 => x"746e756f",
00002620 => x"74207265",
00002621 => x"3a747365",
00002622 => x"00000020",
00002623 => x"5d69255b",
00002624 => x"5d6d5b20",
00002625 => x"6c637963",
00002626 => x"5d685b65",
00002627 => x"756f6320",
00002628 => x"7265746e",
00002629 => x"73657420",
00002630 => x"00203a74",
00002631 => x"5d69255b",
00002632 => x"6f636d20",
00002633 => x"69746e75",
00002634 => x"6269686e",
00002635 => x"79632e74",
00002636 => x"52534320",
00002637 => x"73657420",
00002638 => x"00203a74",
00002639 => x"5d69255b",
00002640 => x"6f636d20",
00002641 => x"65746e75",
00002642 => x"2e6e6572",
00002643 => x"43207963",
00002644 => x"74205253",
00002645 => x"3a747365",
00002646 => x"00000020",
00002647 => x"55434553",
00002648 => x"59544952",
00002649 => x"4f495620",
00002650 => x"4954414c",
00002651 => x"20214e4f",
00002652 => x"00000000",
00002653 => x"5d69255b",
00002654 => x"696e4920",
00002655 => x"6c616974",
00002656 => x"6e697a69",
00002657 => x"50482067",
00002658 => x"203a734d",
00002659 => x"00000000",
00002660 => x"70696b73",
00002661 => x"20646570",
00002662 => x"746f6e28",
00002663 => x"706d6920",
00002664 => x"656d656c",
00002665 => x"6465746e",
00002666 => x"00000a29",
00002667 => x"5d69255b",
00002668 => x"74734520",
00002669 => x"74616d69",
00002670 => x"20676e69",
00002671 => x"20737562",
00002672 => x"656d6974",
00002673 => x"74756f2d",
00002674 => x"74616c20",
00002675 => x"79636e65",
00002676 => x"0000203a",
00002677 => x"2075257e",
00002678 => x"6c637963",
00002679 => x"00207365",
00002680 => x"5d69255b",
00002681 => x"74784520",
00002682 => x"616e7265",
00002683 => x"656d206c",
00002684 => x"79726f6d",
00002685 => x"63636120",
00002686 => x"20737365",
00002687 => x"30204028",
00002688 => x"29782578",
00002689 => x"73657420",
00002690 => x"00203a74",
00002691 => x"70696b73",
00002692 => x"20646570",
00002693 => x"206e6f28",
00002694 => x"6c616572",
00002695 => x"72616820",
00002696 => x"72617764",
00002697 => x"000a2965",
00002698 => x"5d69255b",
00002699 => x"6c6c4920",
00002700 => x"6c616765",
00002701 => x"52534320",
00002702 => x"78302820",
00002703 => x"29666666",
00002704 => x"63636120",
00002705 => x"20737365",
00002706 => x"74736574",
00002707 => x"0000203a",
00002708 => x"5d69255b",
00002709 => x"61655220",
00002710 => x"6e6f2d64",
00002711 => x"4320796c",
00002712 => x"28205253",
00002713 => x"656d6974",
00002714 => x"72772029",
00002715 => x"20657469",
00002716 => x"65636361",
00002717 => x"74207373",
00002718 => x"3a747365",
00002719 => x"00000020",
00002720 => x"5d69255b",
00002721 => x"61655220",
00002722 => x"6e6f2d64",
00002723 => x"4320796c",
00002724 => x"28205253",
00002725 => x"656d6974",
00002726 => x"6f6e2029",
00002727 => x"6972772d",
00002728 => x"28206574",
00002729 => x"3d317372",
00002730 => x"61202930",
00002731 => x"73656363",
00002732 => x"65742073",
00002733 => x"203a7473",
00002734 => x"00000000",
00002735 => x"5d69255b",
00002736 => x"6e655020",
00002737 => x"676e6964",
00002738 => x"51524920",
00002739 => x"73657420",
00002740 => x"66282074",
00002741 => x"206d6f72",
00002742 => x"4d49544d",
00002743 => x"203a2945",
00002744 => x"00000000",
00002745 => x"5d69255b",
00002746 => x"656c4320",
00002747 => x"70207261",
00002748 => x"69646e65",
00002749 => x"4920676e",
00002750 => x"28205152",
00002751 => x"20616976",
00002752 => x"2070696d",
00002753 => x"29525343",
00002754 => x"73657420",
00002755 => x"66282074",
00002756 => x"206d6f72",
00002757 => x"4d49544d",
00002758 => x"203a2945",
00002759 => x"00000000",
00002760 => x"20515249",
00002761 => x"67697274",
00002762 => x"65726567",
00002763 => x"00202164",
00002764 => x"5049544d",
00002765 => x"746f6e20",
00002766 => x"6e657020",
00002767 => x"676e6964",
00002768 => x"00002021",
00002769 => x"5d69255b",
00002770 => x"415f4920",
00002771 => x"4e47494c",
00002772 => x"6e692820",
00002773 => x"75727473",
00002774 => x"6f697463",
00002775 => x"6c61206e",
00002776 => x"6d6e6769",
00002777 => x"29746e65",
00002778 => x"63786520",
00002779 => x"69747065",
00002780 => x"74206e6f",
00002781 => x"3a747365",
00002782 => x"00000020",
00002783 => x"000a6b6f",
00002784 => x"6c696166",
00002785 => x"0000000a",
00002786 => x"70696b73",
00002787 => x"20646570",
00002788 => x"746f6e28",
00002789 => x"736f7020",
00002790 => x"6c626973",
00002791 => x"68772065",
00002792 => x"43206e65",
00002793 => x"74786520",
00002794 => x"69736e65",
00002795 => x"69206e6f",
00002796 => x"6e652073",
00002797 => x"656c6261",
00002798 => x"000a2964",
00002799 => x"5d69255b",
00002800 => x"415f4920",
00002801 => x"28204343",
00002802 => x"74736e69",
00002803 => x"74637572",
00002804 => x"206e6f69",
00002805 => x"20737562",
00002806 => x"65636361",
00002807 => x"20297373",
00002808 => x"65637865",
00002809 => x"6f697470",
00002810 => x"6574206e",
00002811 => x"203a7473",
00002812 => x"00000000",
00002813 => x"5d69255b",
00002814 => x"495f4920",
00002815 => x"47454c4c",
00002816 => x"6c692820",
00002817 => x"6167656c",
00002818 => x"6e69206c",
00002819 => x"75727473",
00002820 => x"6f697463",
00002821 => x"6520296e",
00002822 => x"70656378",
00002823 => x"6e6f6974",
00002824 => x"73657420",
00002825 => x"00203a74",
00002826 => x"5d69255b",
00002827 => x"5f494320",
00002828 => x"454c4c49",
00002829 => x"69282047",
00002830 => x"67656c6c",
00002831 => x"63206c61",
00002832 => x"72706d6f",
00002833 => x"65737365",
00002834 => x"6e692064",
00002835 => x"75727473",
00002836 => x"6f697463",
00002837 => x"6520296e",
00002838 => x"70656378",
00002839 => x"6e6f6974",
00002840 => x"73657420",
00002841 => x"00203a74",
00002842 => x"70696b73",
00002843 => x"20646570",
00002844 => x"746f6e28",
00002845 => x"736f7020",
00002846 => x"6c626973",
00002847 => x"68772065",
00002848 => x"43206e65",
00002849 => x"5458452d",
00002850 => x"73696420",
00002851 => x"656c6261",
00002852 => x"000a2964",
00002853 => x"5d69255b",
00002854 => x"45524220",
00002855 => x"28204b41",
00002856 => x"61657262",
00002857 => x"6e69206b",
00002858 => x"75727473",
00002859 => x"6f697463",
00002860 => x"6520296e",
00002861 => x"70656378",
00002862 => x"6e6f6974",
00002863 => x"73657420",
00002864 => x"00203a74",
00002865 => x"5d69255b",
00002866 => x"415f4c20",
00002867 => x"4e47494c",
00002868 => x"6f6c2820",
00002869 => x"61206461",
00002870 => x"65726464",
00002871 => x"61207373",
00002872 => x"6e67696c",
00002873 => x"746e656d",
00002874 => x"78652029",
00002875 => x"74706563",
00002876 => x"206e6f69",
00002877 => x"74736574",
00002878 => x"0000203a",
00002879 => x"5d69255b",
00002880 => x"415f4c20",
00002881 => x"28204343",
00002882 => x"64616f6c",
00002883 => x"73756220",
00002884 => x"63636120",
00002885 => x"29737365",
00002886 => x"63786520",
00002887 => x"69747065",
00002888 => x"74206e6f",
00002889 => x"3a747365",
00002890 => x"00000020",
00002891 => x"5d69255b",
00002892 => x"415f5320",
00002893 => x"4e47494c",
00002894 => x"74732820",
00002895 => x"2065726f",
00002896 => x"72646461",
00002897 => x"20737365",
00002898 => x"67696c61",
00002899 => x"6e656d6e",
00002900 => x"65202974",
00002901 => x"70656378",
00002902 => x"6e6f6974",
00002903 => x"73657420",
00002904 => x"00203a74",
00002905 => x"5d69255b",
00002906 => x"415f5320",
00002907 => x"28204343",
00002908 => x"726f7473",
00002909 => x"75622065",
00002910 => x"63612073",
00002911 => x"73736563",
00002912 => x"78652029",
00002913 => x"74706563",
00002914 => x"206e6f69",
00002915 => x"74736574",
00002916 => x"0000203a",
00002917 => x"5d69255b",
00002918 => x"564e4520",
00002919 => x"4c4c4143",
00002920 => x"63652820",
00002921 => x"206c6c61",
00002922 => x"74736e69",
00002923 => x"74637572",
00002924 => x"296e6f69",
00002925 => x"6f726620",
00002926 => x"2d4d206d",
00002927 => x"65646f6d",
00002928 => x"63786520",
00002929 => x"69747065",
00002930 => x"74206e6f",
00002931 => x"3a747365",
00002932 => x"00000020",
00002933 => x"5d69255b",
00002934 => x"564e4520",
00002935 => x"4c4c4143",
00002936 => x"63652820",
00002937 => x"206c6c61",
00002938 => x"74736e69",
00002939 => x"74637572",
00002940 => x"296e6f69",
00002941 => x"6f726620",
00002942 => x"2d55206d",
00002943 => x"65646f6d",
00002944 => x"63786520",
00002945 => x"69747065",
00002946 => x"74206e6f",
00002947 => x"3a747365",
00002948 => x"00000020",
00002949 => x"70696b73",
00002950 => x"20646570",
00002951 => x"746f6e28",
00002952 => x"736f7020",
00002953 => x"6c626973",
00002954 => x"68772065",
00002955 => x"55206e65",
00002956 => x"5458452d",
00002957 => x"73696420",
00002958 => x"656c6261",
00002959 => x"000a2964",
00002960 => x"5d69255b",
00002961 => x"49544d20",
00002962 => x"616d2820",
00002963 => x"6e696863",
00002964 => x"69742065",
00002965 => x"2972656d",
00002966 => x"746e6920",
00002967 => x"75727265",
00002968 => x"74207470",
00002969 => x"3a747365",
00002970 => x"00000020",
00002971 => x"5d69255b",
00002972 => x"49534d20",
00002973 => x"69762820",
00002974 => x"65742061",
00002975 => x"65627473",
00002976 => x"2968636e",
00002977 => x"746e6920",
00002978 => x"75727265",
00002979 => x"74207470",
00002980 => x"3a747365",
00002981 => x"00000020",
00002982 => x"5d69255b",
00002983 => x"49454d20",
00002984 => x"69762820",
00002985 => x"65742061",
00002986 => x"65627473",
00002987 => x"2968636e",
00002988 => x"746e6920",
00002989 => x"75727265",
00002990 => x"74207470",
00002991 => x"3a747365",
00002992 => x"00000020",
00002993 => x"5d69255b",
00002994 => x"52494620",
00002995 => x"28203051",
00002996 => x"74736166",
00002997 => x"51524920",
00002998 => x"69202930",
00002999 => x"7265746e",
00003000 => x"74707572",
00003001 => x"73657420",
00003002 => x"76282074",
00003003 => x"57206169",
00003004 => x"3a295444",
00003005 => x"00000020",
00003006 => x"5d69255b",
00003007 => x"52494620",
00003008 => x"28203151",
00003009 => x"74736166",
00003010 => x"51524920",
00003011 => x"69202931",
00003012 => x"7265746e",
00003013 => x"74707572",
00003014 => x"73657420",
00003015 => x"76282074",
00003016 => x"47206169",
00003017 => x"294f4950",
00003018 => x"0000203a",
00003019 => x"5d69255b",
00003020 => x"52494620",
00003021 => x"28203251",
00003022 => x"74736166",
00003023 => x"51524920",
00003024 => x"69202932",
00003025 => x"7265746e",
00003026 => x"74707572",
00003027 => x"73657420",
00003028 => x"76282074",
00003029 => x"55206169",
00003030 => x"29545241",
00003031 => x"0000203a",
00003032 => x"5d69255b",
00003033 => x"52494620",
00003034 => x"28203351",
00003035 => x"74736166",
00003036 => x"51524920",
00003037 => x"69202933",
00003038 => x"7265746e",
00003039 => x"74707572",
00003040 => x"73657420",
00003041 => x"76282074",
00003042 => x"53206169",
00003043 => x"3a294950",
00003044 => x"00000020",
00003045 => x"5d69255b",
00003046 => x"52494620",
00003047 => x"28203351",
00003048 => x"74736166",
00003049 => x"51524920",
00003050 => x"69202933",
00003051 => x"7265746e",
00003052 => x"74707572",
00003053 => x"73657420",
00003054 => x"76282074",
00003055 => x"54206169",
00003056 => x"3a294957",
00003057 => x"00000020",
00003058 => x"5d69255b",
00003059 => x"49465720",
00003060 => x"61772820",
00003061 => x"66207469",
00003062 => x"6920726f",
00003063 => x"7265746e",
00003064 => x"74707572",
00003065 => x"73202f20",
00003066 => x"7065656c",
00003067 => x"736e6920",
00003068 => x"63757274",
00003069 => x"6e6f6974",
00003070 => x"65742029",
00003071 => x"28207473",
00003072 => x"656b6177",
00003073 => x"2070752d",
00003074 => x"20616976",
00003075 => x"4d49544d",
00003076 => x"203a2945",
00003077 => x"00000000",
00003078 => x"5d69255b",
00003079 => x"766e4920",
00003080 => x"64696c61",
00003081 => x"52534320",
00003082 => x"63636120",
00003083 => x"20737365",
00003084 => x"74736d28",
00003085 => x"73757461",
00003086 => x"72662029",
00003087 => x"75206d6f",
00003088 => x"20726573",
00003089 => x"65646f6d",
00003090 => x"73657420",
00003091 => x"00203a74",
00003092 => x"5d69255b",
00003093 => x"45545220",
00003094 => x"75722820",
00003095 => x"6d69746e",
00003096 => x"6e652065",
00003097 => x"20292e76",
00003098 => x"75626564",
00003099 => x"72742067",
00003100 => x"68207061",
00003101 => x"6c646e61",
00003102 => x"74207265",
00003103 => x"3a747365",
00003104 => x"00000020",
00003105 => x"77736e61",
00003106 => x"203a7265",
00003107 => x"78257830",
00003108 => x"00000000",
00003109 => x"5d69255b",
00003110 => x"79685020",
00003111 => x"61636973",
00003112 => x"656d206c",
00003113 => x"79726f6d",
00003114 => x"6f727020",
00003115 => x"74636574",
00003116 => x"206e6f69",
00003117 => x"504d5028",
00003118 => x"00203a29",
00003119 => x"61657243",
00003120 => x"676e6974",
00003121 => x"6f727020",
00003122 => x"74636574",
00003123 => x"70206465",
00003124 => x"20656761",
00003125 => x"50414e28",
00003126 => x"202c544f",
00003127 => x"2c58215b",
00003128 => x"522c5721",
00003129 => x"25202c5d",
00003130 => x"79622075",
00003131 => x"29736574",
00003132 => x"30204020",
00003133 => x"3a782578",
00003134 => x"00000020",
00003135 => x"5d69255b",
00003136 => x"50202d20",
00003137 => x"203a504d",
00003138 => x"6f6d2d55",
00003139 => x"5b206564",
00003140 => x"212c5821",
00003141 => x"5d522c57",
00003142 => x"65786520",
00003143 => x"65747563",
00003144 => x"73657420",
00003145 => x"20203a74",
00003146 => x"00000000",
00003147 => x"5d69255b",
00003148 => x"50202d20",
00003149 => x"203a504d",
00003150 => x"6f6d2d55",
00003151 => x"5b206564",
00003152 => x"212c5821",
00003153 => x"5d522c57",
00003154 => x"61657220",
00003155 => x"65742064",
00003156 => x"203a7473",
00003157 => x"20202020",
00003158 => x"00000000",
00003159 => x"5d69255b",
00003160 => x"50202d20",
00003161 => x"203a504d",
00003162 => x"6f6d2d55",
00003163 => x"5b206564",
00003164 => x"212c5821",
00003165 => x"5d522c57",
00003166 => x"69727720",
00003167 => x"74206574",
00003168 => x"3a747365",
00003169 => x"20202020",
00003170 => x"00000000",
00003171 => x"5d69255b",
00003172 => x"50202d20",
00003173 => x"203a504d",
00003174 => x"63706d70",
00003175 => x"2e306766",
00003176 => x"6d5b2030",
00003177 => x"3d65646f",
00003178 => x"5d66666f",
00003179 => x"636f6c20",
00003180 => x"6574206b",
00003181 => x"203a7473",
00003182 => x"00000000",
00003183 => x"5d69255b",
00003184 => x"50202d20",
00003185 => x"203a504d",
00003186 => x"61706d70",
00003187 => x"30726464",
00003188 => x"6f6d5b20",
00003189 => x"6f3d6564",
00003190 => x"205d6666",
00003191 => x"6b636f6c",
00003192 => x"73657420",
00003193 => x"20203a74",
00003194 => x"00000000",
00003195 => x"5d69255b",
00003196 => x"6f744120",
00003197 => x"2063696d",
00003198 => x"65636361",
00003199 => x"28207373",
00003200 => x"532b524c",
00003201 => x"74202943",
00003202 => x"20747365",
00003203 => x"63757328",
00003204 => x"64656563",
00003205 => x"20676e69",
00003206 => x"65636361",
00003207 => x"3a297373",
00003208 => x"00000020",
00003209 => x"5d69255b",
00003210 => x"6f744120",
00003211 => x"2063696d",
00003212 => x"65636361",
00003213 => x"28207373",
00003214 => x"532b524c",
00003215 => x"74202943",
00003216 => x"20747365",
00003217 => x"69616628",
00003218 => x"676e696c",
00003219 => x"63636120",
00003220 => x"29737365",
00003221 => x"0000203a",
00003222 => x"5d69255b",
00003223 => x"6f744120",
00003224 => x"2063696d",
00003225 => x"534f4d41",
00003226 => x"20504157",
00003227 => x"74736574",
00003228 => x"68732820",
00003229 => x"646c756f",
00003230 => x"69617220",
00003231 => x"69206573",
00003232 => x"67656c6c",
00003233 => x"43206c61",
00003234 => x"6520444d",
00003235 => x"70656378",
00003236 => x"6e6f6974",
00003237 => x"00203a29",
00003238 => x"2d2d0a0a",
00003239 => x"4d504820",
00003240 => x"73657220",
00003241 => x"73746c75",
00003242 => x"0a2d2d20",
00003243 => x"00000000",
00003244 => x"65522023",
00003245 => x"65726974",
00003246 => x"6f632064",
00003247 => x"2e72706d",
00003248 => x"736e6920",
00003249 => x"63757274",
00003250 => x"6e6f6974",
00003251 => x"20203a73",
00003252 => x"000a7525",
00003253 => x"48206f6e",
00003254 => x"20734d50",
00003255 => x"69617661",
00003256 => x"6c62616c",
00003257 => x"00000a65",
00003258 => x"2d492023",
00003259 => x"63746566",
00003260 => x"61772068",
00003261 => x"63207469",
00003262 => x"656c6379",
00003263 => x"20203a73",
00003264 => x"20202020",
00003265 => x"20202020",
00003266 => x"000a7525",
00003267 => x"2d492023",
00003268 => x"75737369",
00003269 => x"61772065",
00003270 => x"63207469",
00003271 => x"656c6379",
00003272 => x"20203a73",
00003273 => x"20202020",
00003274 => x"20202020",
00003275 => x"000a7525",
00003276 => x"6f4c2023",
00003277 => x"6f206461",
00003278 => x"61726570",
00003279 => x"6e6f6974",
00003280 => x"20203a73",
00003281 => x"20202020",
00003282 => x"20202020",
00003283 => x"20202020",
00003284 => x"000a7525",
00003285 => x"74532023",
00003286 => x"2065726f",
00003287 => x"7265706f",
00003288 => x"6f697461",
00003289 => x"203a736e",
00003290 => x"20202020",
00003291 => x"20202020",
00003292 => x"20202020",
00003293 => x"000a7525",
00003294 => x"6f4c2023",
00003295 => x"732f6461",
00003296 => x"65726f74",
00003297 => x"69617720",
00003298 => x"79632074",
00003299 => x"73656c63",
00003300 => x"2020203a",
00003301 => x"20202020",
00003302 => x"000a7525",
00003303 => x"6e552023",
00003304 => x"646e6f63",
00003305 => x"6f697469",
00003306 => x"206c616e",
00003307 => x"706d756a",
00003308 => x"20203a73",
00003309 => x"20202020",
00003310 => x"20202020",
00003311 => x"000a7525",
00003312 => x"6f432023",
00003313 => x"7469646e",
00003314 => x"616e6f69",
00003315 => x"7262206c",
00003316 => x"68636e61",
00003317 => x"28207365",
00003318 => x"296c6c61",
00003319 => x"2020203a",
00003320 => x"000a7525",
00003321 => x"6f432023",
00003322 => x"7469646e",
00003323 => x"616e6f69",
00003324 => x"7262206c",
00003325 => x"68636e61",
00003326 => x"28207365",
00003327 => x"656b6174",
00003328 => x"203a296e",
00003329 => x"000a7525",
00003330 => x"6e452023",
00003331 => x"65726574",
00003332 => x"72742064",
00003333 => x"3a737061",
00003334 => x"20202020",
00003335 => x"20202020",
00003336 => x"20202020",
00003337 => x"20202020",
00003338 => x"000a7525",
00003339 => x"6c492023",
00003340 => x"6167656c",
00003341 => x"706f206c",
00003342 => x"74617265",
00003343 => x"736e6f69",
00003344 => x"2020203a",
00003345 => x"20202020",
00003346 => x"20202020",
00003347 => x"000a7525",
00003348 => x"4920230a",
00003349 => x"7274736e",
00003350 => x"69746375",
00003351 => x"3a736e6f",
00003352 => x"0a752520",
00003353 => x"00000000",
00003354 => x"6c432023",
00003355 => x"206b636f",
00003356 => x"6c637963",
00003357 => x"203a7365",
00003358 => x"000a7525",
00003359 => x"7365540a",
00003360 => x"65722074",
00003361 => x"746c7573",
00003362 => x"4f0a3a73",
00003363 => x"20203a4b",
00003364 => x"25202020",
00003365 => x"69252f69",
00003366 => x"4941460a",
00003367 => x"3a44454c",
00003368 => x"2f692520",
00003369 => x"0a0a6925",
00003370 => x"00000000",
00003371 => x"315b6325",
00003372 => x"50435b6d",
00003373 => x"45542055",
00003374 => x"43205453",
00003375 => x"4c504d4f",
00003376 => x"44455445",
00003377 => x"43555320",
00003378 => x"53534543",
00003379 => x"4c4c5546",
00003380 => x"255d2159",
00003381 => x"6d305b63",
00003382 => x"0000000a",
00003383 => x"315b6325",
00003384 => x"50435b6d",
00003385 => x"45542055",
00003386 => x"46205453",
00003387 => x"454c4941",
00003388 => x"255d2144",
00003389 => x"6d305b63",
00003390 => x"0000000a",
00003391 => x"000014a4",
00003392 => x"000014ac",
00003393 => x"000014b4",
00003394 => x"000014bc",
00003395 => x"000014c4",
00003396 => x"000014cc",
00003397 => x"000014d4",
00003398 => x"000014dc",
00003399 => x"000014e4",
00003400 => x"00001444",
00003401 => x"00001444",
00003402 => x"000014ec",
00003403 => x"000014f4",
00003404 => x"00001444",
00003405 => x"00001444",
00003406 => x"00001444",
00003407 => x"000014fc",
00003408 => x"00001444",
00003409 => x"00001444",
00003410 => x"00001444",
00003411 => x"00001504",
00003412 => x"00001444",
00003413 => x"00001444",
00003414 => x"00001444",
00003415 => x"00001444",
00003416 => x"0000150c",
00003417 => x"00001514",
00003418 => x"0000151c",
00003419 => x"00001524",
00003420 => x"65757254",
00003421 => x"0000000a",
00003422 => x"736c6146",
00003423 => x"00000a65",
00003424 => x"00007830",
00003425 => x"4554523c",
00003426 => x"0000203e",
00003427 => x"74736e49",
00003428 => x"74637572",
00003429 => x"206e6f69",
00003430 => x"72646461",
00003431 => x"20737365",
00003432 => x"6173696d",
00003433 => x"6e67696c",
00003434 => x"00006465",
00003435 => x"74736e49",
00003436 => x"74637572",
00003437 => x"206e6f69",
00003438 => x"65636361",
00003439 => x"66207373",
00003440 => x"746c7561",
00003441 => x"00000000",
00003442 => x"656c6c49",
00003443 => x"206c6167",
00003444 => x"74736e69",
00003445 => x"74637572",
00003446 => x"006e6f69",
00003447 => x"61657242",
00003448 => x"696f706b",
00003449 => x"0000746e",
00003450 => x"64616f4c",
00003451 => x"64646120",
00003452 => x"73736572",
00003453 => x"73696d20",
00003454 => x"67696c61",
00003455 => x"0064656e",
00003456 => x"64616f4c",
00003457 => x"63636120",
00003458 => x"20737365",
00003459 => x"6c756166",
00003460 => x"00000074",
00003461 => x"726f7453",
00003462 => x"64612065",
00003463 => x"73657264",
00003464 => x"696d2073",
00003465 => x"696c6173",
00003466 => x"64656e67",
00003467 => x"00000000",
00003468 => x"726f7453",
00003469 => x"63612065",
00003470 => x"73736563",
00003471 => x"75616620",
00003472 => x"0000746c",
00003473 => x"69766e45",
00003474 => x"6d6e6f72",
00003475 => x"20746e65",
00003476 => x"6c6c6163",
00003477 => x"6f726620",
00003478 => x"2d55206d",
00003479 => x"65646f6d",
00003480 => x"00000000",
00003481 => x"69766e45",
00003482 => x"6d6e6f72",
00003483 => x"20746e65",
00003484 => x"6c6c6163",
00003485 => x"6f726620",
00003486 => x"2d4d206d",
00003487 => x"65646f6d",
00003488 => x"00000000",
00003489 => x"6863614d",
00003490 => x"20656e69",
00003491 => x"74666f73",
00003492 => x"65726177",
00003493 => x"746e6920",
00003494 => x"75727265",
00003495 => x"00007470",
00003496 => x"6863614d",
00003497 => x"20656e69",
00003498 => x"656d6974",
00003499 => x"6e692072",
00003500 => x"72726574",
00003501 => x"00747075",
00003502 => x"6863614d",
00003503 => x"20656e69",
00003504 => x"65747865",
00003505 => x"6c616e72",
00003506 => x"746e6920",
00003507 => x"75727265",
00003508 => x"00007470",
00003509 => x"74736146",
00003510 => x"746e6920",
00003511 => x"75727265",
00003512 => x"30207470",
00003513 => x"00000000",
00003514 => x"74736146",
00003515 => x"746e6920",
00003516 => x"75727265",
00003517 => x"31207470",
00003518 => x"00000000",
00003519 => x"74736146",
00003520 => x"746e6920",
00003521 => x"75727265",
00003522 => x"32207470",
00003523 => x"00000000",
00003524 => x"74736146",
00003525 => x"746e6920",
00003526 => x"75727265",
00003527 => x"33207470",
00003528 => x"00000000",
00003529 => x"6e6b6e55",
00003530 => x"206e776f",
00003531 => x"70617274",
00003532 => x"75616320",
00003533 => x"203a6573",
00003534 => x"00000000",
00003535 => x"50204020",
00003536 => x"00003d43",
00003537 => x"544d202c",
00003538 => x"3d4c4156",
00003539 => x"00000000",
00003540 => x"00001674",
00003541 => x"000015c0",
00003542 => x"000015c0",
00003543 => x"000015c0",
00003544 => x"0000167c",
00003545 => x"000015c0",
00003546 => x"000015c0",
00003547 => x"000015c0",
00003548 => x"00001684",
00003549 => x"000015c0",
00003550 => x"000015c0",
00003551 => x"000015c0",
00003552 => x"000015c0",
00003553 => x"0000168c",
00003554 => x"00001694",
00003555 => x"0000169c",
00003556 => x"000016a4",
00003557 => x"000015f0",
00003558 => x"0000162c",
00003559 => x"00001634",
00003560 => x"0000163c",
00003561 => x"00001644",
00003562 => x"0000164c",
00003563 => x"00001654",
00003564 => x"0000165c",
00003565 => x"00001664",
00003566 => x"000015c0",
00003567 => x"000015c0",
00003568 => x"0000166c",
00003569 => x"4554523c",
00003570 => x"4157203e",
00003571 => x"4e494e52",
00003572 => x"43202147",
00003573 => x"43205550",
00003574 => x"73205253",
00003575 => x"65747379",
00003576 => x"6f6e206d",
00003577 => x"76612074",
00003578 => x"616c6961",
00003579 => x"21656c62",
00003580 => x"522f3c20",
00003581 => x"003e4554",
00003582 => x"3c3c0a0a",
00003583 => x"72614820",
00003584 => x"72617764",
00003585 => x"6f432065",
00003586 => x"6769666e",
00003587 => x"74617275",
00003588 => x"206e6f69",
00003589 => x"7265764f",
00003590 => x"77656976",
00003591 => x"0a3e3e20",
00003592 => x"00000000",
00003593 => x"2d2d2d0a",
00003594 => x"6543202d",
00003595 => x"6172746e",
00003596 => x"7250206c",
00003597 => x"7365636f",
00003598 => x"676e6973",
00003599 => x"696e5520",
00003600 => x"2d2d2074",
00003601 => x"000a2d2d",
00003602 => x"74726148",
00003603 => x"3a444920",
00003604 => x"20202020",
00003605 => x"20202020",
00003606 => x"30202020",
00003607 => x"0a782578",
00003608 => x"00000000",
00003609 => x"646e6556",
00003610 => x"4920726f",
00003611 => x"20203a44",
00003612 => x"20202020",
00003613 => x"30202020",
00003614 => x"0a782578",
00003615 => x"00000000",
00003616 => x"68637241",
00003617 => x"63657469",
00003618 => x"65727574",
00003619 => x"3a444920",
00003620 => x"30202020",
00003621 => x"00782578",
00003622 => x"454e2820",
00003623 => x"3356524f",
00003624 => x"00002932",
00003625 => x"706d490a",
00003626 => x"656d656c",
00003627 => x"7461746e",
00003628 => x"206e6f69",
00003629 => x"203a4449",
00003630 => x"78257830",
00003631 => x"00002820",
00003632 => x"68637241",
00003633 => x"63657469",
00003634 => x"65727574",
00003635 => x"2020203a",
00003636 => x"00202020",
00003637 => x"6e6b6e75",
00003638 => x"006e776f",
00003639 => x"32337672",
00003640 => x"00000000",
00003641 => x"32317672",
00003642 => x"00000038",
00003643 => x"34367672",
00003644 => x"00000000",
00003645 => x"646e450a",
00003646 => x"6e6e6169",
00003647 => x"3a737365",
00003648 => x"20202020",
00003649 => x"20202020",
00003650 => x"00000000",
00003651 => x"0a676962",
00003652 => x"00000000",
00003653 => x"7474696c",
00003654 => x"000a656c",
00003655 => x"65747845",
00003656 => x"6f69736e",
00003657 => x"203a736e",
00003658 => x"20202020",
00003659 => x"00202020",
00003660 => x"7363695a",
00003661 => x"00002072",
00003662 => x"6566695a",
00003663 => x"6965636e",
00003664 => x"00000020",
00003665 => x"2062625a",
00003666 => x"00000000",
00003667 => x"504d500a",
00003668 => x"2020203a",
00003669 => x"20202020",
00003670 => x"20202020",
00003671 => x"20202020",
00003672 => x"00000000",
00003673 => x"72207525",
00003674 => x"6f696765",
00003675 => x"202c736e",
00003676 => x"62207525",
00003677 => x"73657479",
00003678 => x"6e696d20",
00003679 => x"6c616d69",
00003680 => x"61726720",
00003681 => x"616c756e",
00003682 => x"79746972",
00003683 => x"0000000a",
00003684 => x"20746f6e",
00003685 => x"6c706d69",
00003686 => x"6e656d65",
00003687 => x"0a646574",
00003688 => x"00000000",
00003689 => x"204d5048",
00003690 => x"6e756f43",
00003691 => x"73726574",
00003692 => x"2020203a",
00003693 => x"25202020",
00003694 => x"00000a75",
00003695 => x"2d2d0a0a",
00003696 => x"50202d2d",
00003697 => x"65636f72",
00003698 => x"726f7373",
00003699 => x"47202d20",
00003700 => x"72656e65",
00003701 => x"2d206c61",
00003702 => x"0a2d2d2d",
00003703 => x"00000000",
00003704 => x"636f6c43",
00003705 => x"20203a6b",
00003706 => x"20752520",
00003707 => x"000a7a48",
00003708 => x"72657355",
00003709 => x"3a444920",
00003710 => x"25783020",
00003711 => x"00000a78",
00003712 => x"2d2d2d0a",
00003713 => x"7250202d",
00003714 => x"7365636f",
00003715 => x"20726f73",
00003716 => x"654d202d",
00003717 => x"79726f6d",
00003718 => x"6e6f4320",
00003719 => x"75676966",
00003720 => x"69746172",
00003721 => x"2d206e6f",
00003722 => x"0a2d2d2d",
00003723 => x"00000000",
00003724 => x"74736e49",
00003725 => x"62202e72",
00003726 => x"20657361",
00003727 => x"72646461",
00003728 => x"3a737365",
00003729 => x"78302020",
00003730 => x"000a7825",
00003731 => x"65746e49",
00003732 => x"6c616e72",
00003733 => x"454d4920",
00003734 => x"20203a4d",
00003735 => x"20202020",
00003736 => x"00002020",
00003737 => x"4d454d49",
00003738 => x"7a697320",
00003739 => x"20203a65",
00003740 => x"20202020",
00003741 => x"20202020",
00003742 => x"75252020",
00003743 => x"74796220",
00003744 => x"000a7365",
00003745 => x"65746e49",
00003746 => x"6c616e72",
00003747 => x"454d4920",
00003748 => x"7361204d",
00003749 => x"4d4f5220",
00003750 => x"0000203a",
00003751 => x"61746144",
00003752 => x"73616220",
00003753 => x"64612065",
00003754 => x"73657264",
00003755 => x"20203a73",
00003756 => x"78302020",
00003757 => x"000a7825",
00003758 => x"65746e49",
00003759 => x"6c616e72",
00003760 => x"454d4420",
00003761 => x"20203a4d",
00003762 => x"20202020",
00003763 => x"00002020",
00003764 => x"4d454d44",
00003765 => x"7a697320",
00003766 => x"20203a65",
00003767 => x"20202020",
00003768 => x"20202020",
00003769 => x"75252020",
00003770 => x"74796220",
00003771 => x"000a7365",
00003772 => x"65746e49",
00003773 => x"6c616e72",
00003774 => x"632d6920",
00003775 => x"65686361",
00003776 => x"2020203a",
00003777 => x"00002020",
00003778 => x"0000202d",
00003779 => x"62207525",
00003780 => x"73657479",
00003781 => x"75252820",
00003782 => x"74657320",
00003783 => x"2c297328",
00003784 => x"20752520",
00003785 => x"636f6c62",
00003786 => x"2973286b",
00003787 => x"72657020",
00003788 => x"74657320",
00003789 => x"7525202c",
00003790 => x"74796220",
00003791 => x"70207365",
00003792 => x"62207265",
00003793 => x"6b636f6c",
00003794 => x"00202c29",
00003795 => x"772d7525",
00003796 => x"73207961",
00003797 => x"612d7465",
00003798 => x"636f7373",
00003799 => x"69746169",
00003800 => x"000a6576",
00003801 => x"6c6c7566",
00003802 => x"73612d79",
00003803 => x"69636f73",
00003804 => x"76697461",
00003805 => x"00000a65",
00003806 => x"746f6f42",
00003807 => x"64616f6c",
00003808 => x"203a7265",
00003809 => x"20202020",
00003810 => x"20202020",
00003811 => x"00002020",
00003812 => x"2e747845",
00003813 => x"73756220",
00003814 => x"746e6920",
00003815 => x"61667265",
00003816 => x"203a6563",
00003817 => x"00002020",
00003818 => x"2e747845",
00003819 => x"73756220",
00003820 => x"646e4520",
00003821 => x"6e6e6169",
00003822 => x"3a737365",
00003823 => x"00002020",
00003824 => x"2d2d0a0a",
00003825 => x"50202d2d",
00003826 => x"65636f72",
00003827 => x"726f7373",
00003828 => x"50202d20",
00003829 => x"70697265",
00003830 => x"61726568",
00003831 => x"2d20736c",
00003832 => x"0a2d2d2d",
00003833 => x"00000000",
00003834 => x"4f495047",
00003835 => x"202d2020",
00003836 => x"00000000",
00003837 => x"4d49544d",
00003838 => x"202d2045",
00003839 => x"00000000",
00003840 => x"54524155",
00003841 => x"202d2020",
00003842 => x"00000000",
00003843 => x"20495053",
00003844 => x"202d2020",
00003845 => x"00000000",
00003846 => x"20495754",
00003847 => x"202d2020",
00003848 => x"00000000",
00003849 => x"204d5750",
00003850 => x"202d2020",
00003851 => x"00000000",
00003852 => x"20544457",
00003853 => x"202d2020",
00003854 => x"00000000",
00003855 => x"474e5254",
00003856 => x"202d2020",
00003857 => x"00000000",
00003858 => x"30554643",
00003859 => x"202d2020",
00003860 => x"00000000",
00003861 => x"31554643",
00003862 => x"202d2020",
00003863 => x"00000000",
00003864 => x"20656854",
00003865 => x"524f454e",
00003866 => x"20323356",
00003867 => x"636f7250",
00003868 => x"6f737365",
00003869 => x"72502072",
00003870 => x"63656a6f",
00003871 => x"6f430a74",
00003872 => x"69727970",
00003873 => x"20746867",
00003874 => x"31323032",
00003875 => x"7453202c",
00003876 => x"61687065",
00003877 => x"6f4e206e",
00003878 => x"6e69746c",
00003879 => x"53420a67",
00003880 => x"2d332044",
00003881 => x"75616c43",
00003882 => x"4c206573",
00003883 => x"6e656369",
00003884 => x"680a6573",
00003885 => x"73707474",
00003886 => x"672f2f3a",
00003887 => x"75687469",
00003888 => x"6f632e62",
00003889 => x"74732f6d",
00003890 => x"746c6f6e",
00003891 => x"2f676e69",
00003892 => x"726f656e",
00003893 => x"0a323376",
00003894 => x"0000000a",
00003895 => x"5241570a",
00003896 => x"474e494e",
00003897 => x"57532021",
00003898 => x"4153495f",
00003899 => x"65662820",
00003900 => x"72757461",
00003901 => x"72207365",
00003902 => x"69757165",
00003903 => x"29646572",
00003904 => x"20737620",
00003905 => x"495f5748",
00003906 => x"28204153",
00003907 => x"74616566",
00003908 => x"73657275",
00003909 => x"61766120",
00003910 => x"62616c69",
00003911 => x"2029656c",
00003912 => x"6d73696d",
00003913 => x"68637461",
00003914 => x"57530a21",
00003915 => x"4153495f",
00003916 => x"30203d20",
00003917 => x"20782578",
00003918 => x"6d6f6328",
00003919 => x"656c6970",
00003920 => x"6c662072",
00003921 => x"29736761",
00003922 => x"5f57480a",
00003923 => x"20415349",
00003924 => x"7830203d",
00003925 => x"28207825",
00003926 => x"6173696d",
00003927 => x"72736320",
00003928 => x"000a0a29",
00003929 => x"00000000",
00003930 => x"00000000",
00003931 => x"00000180",
00003932 => x"00000000",
00003933 => x"00000000",
00003934 => x"00000000",
00003935 => x"00000180",
00003936 => x"318c0000",
00003937 => x"60c7fc7f",
00003938 => x"87f8c0c7",
00003939 => x"f87f8180",
00003940 => x"ffff0000",
00003941 => x"f0cc00c0",
00003942 => x"cc0cc0cc",
00003943 => x"0cc0c183",
00003944 => x"c003c000",
00003945 => x"d8cc00c0",
00003946 => x"cc0cc0c0",
00003947 => x"0c018180",
00003948 => x"c7e30000",
00003949 => x"cccff8c0",
00003950 => x"cff8c0c0",
00003951 => x"f8060183",
00003952 => x"c7e3c000",
00003953 => x"c6cc00c0",
00003954 => x"cc306180",
00003955 => x"0c180180",
00003956 => x"c7e30000",
00003957 => x"c3cc00c0",
00003958 => x"cc18330c",
00003959 => x"0c600183",
00003960 => x"c003c000",
00003961 => x"c187fc7f",
00003962 => x"8c0c0c07",
00003963 => x"f8ffc180",
00003964 => x"ffff0000",
00003965 => x"00000000",
00003966 => x"00000000",
00003967 => x"00000180",
00003968 => x"318c0000",
00003969 => x"00000000",
00003970 => x"00000000",
00003971 => x"00000180",
00003972 => x"00000000",
00003973 => x"33323130",
00003974 => x"37363534",
00003975 => x"42413938",
00003976 => x"46454443",
00003977 => x"33323130",
00003978 => x"37363534",
00003979 => x"00003938",
00003980 => x"33323130",
00003981 => x"37363534",
00003982 => x"62613938",
00003983 => x"66656463",
00003984 => x"00000000",
00003985 => x"000020f8",
00003986 => x"00002104",
00003987 => x"00002110",
00003988 => x"0000211c",
00003989 => x"00002128",
00003990 => x"00002134",
00003991 => x"00002140",
00003992 => x"0000214c",
00003993 => x"00002158",
00003994 => x"00002164",
00003995 => x"00002170",
00003996 => x"0000217c",
00003997 => x"00002188",
00003998 => x"00002194",
00003999 => x"000021a0",
00004000 => x"000021b4",
00004001 => x"000021bc",
00004002 => x"000021c4",
00004003 => x"000021cc",
00004004 => x"000021d4",
00004005 => x"000021dc",
00004006 => x"000021e4",
00004007 => x"000021ec",
00004008 => x"000021f4",
00004009 => x"000021fc",
00004010 => x"00002204",
00004011 => x"0000220c",
00004012 => x"00002214",
00004013 => x"0000221c",
00004014 => x"00002224",
00004015 => x"0000222c",
00004016 => x"0000224c",
00004017 => x"00002254",
00004018 => x"0000225c",
00004019 => x"00002264",
00004020 => x"0000226c",
00004021 => x"00002274",
00004022 => x"0000227c",
00004023 => x"00002284",
00004024 => x"0000228c",
00004025 => x"00002294",
00004026 => x"0000229c",
00004027 => x"000022a4",
00004028 => x"000022ac",
00004029 => x"000022b4",
00004030 => x"000022bc",
00004031 => x"000022c4",
00004032 => x"000022cc",
00004033 => x"000022d4",
00004034 => x"000022dc",
00004035 => x"000022e4",
00004036 => x"000022ec",
00004037 => x"000022f4",
00004038 => x"000022fc",
00004039 => x"00002304",
00004040 => x"0000230c",
00004041 => x"00002314",
00004042 => x"0000231c",
00004043 => x"00002324",
00004044 => x"0000232c",
00004045 => x"00002334",
00004046 => x"0000233c",
00004047 => x"00002344",
00004048 => x"0000234c",
00004049 => x"00002354",
00004050 => x"0000235c",
00004051 => x"00002364",
00004052 => x"0000236c",
00004053 => x"00002374",
00004054 => x"0000237c",
00004055 => x"00002384",
00004056 => x"0000238c",
00004057 => x"00002394",
00004058 => x"0000239c",
00004059 => x"000023a4",
00004060 => x"000023ac",
00004061 => x"000023b4",
00004062 => x"000023bc",
00004063 => x"000023d4",
00004064 => x"000023e0",
00004065 => x"000023ec",
00004066 => x"000023f8",
00004067 => x"00002404",
00004068 => x"00002410",
00004069 => x"0000241c",
00004070 => x"00002428",
00004071 => x"00002434",
00004072 => x"00002440",
00004073 => x"0000244c",
00004074 => x"00002458",
00004075 => x"00002464",
00004076 => x"00002470",
00004077 => x"0000247c",
00004078 => x"3407d073",
00004079 => x"00008067",
00004080 => x"00000001",
00004081 => x"00008067",
00000027 => x"00002537",
00000028 => x"80050513",
00000029 => x"30051073",
00000030 => x"30401073",
00000031 => x"80002117",
00000032 => x"f8010113",
00000033 => x"ffc17113",
00000034 => x"00010413",
00000035 => x"80000197",
00000036 => x"77418193",
00000037 => x"00000597",
00000038 => x"0a458593",
00000039 => x"30559073",
00000040 => x"f0000593",
00000041 => x"0005a023",
00000042 => x"00458593",
00000043 => x"feb01ce3",
00000044 => x"80000597",
00000045 => x"f5058593",
00000046 => x"85418613",
00000047 => x"00c5d863",
00000048 => x"00058023",
00000049 => x"00158593",
00000050 => x"ff5ff06f",
00000051 => x"00001597",
00000052 => x"f5458593",
00000053 => x"80000617",
00000054 => x"f2c60613",
00000055 => x"80000697",
00000056 => x"f2468693",
00000057 => x"00d65c63",
00000058 => x"00058703",
00000059 => x"00e60023",
00000060 => x"00158593",
00000061 => x"00160613",
00000062 => x"fedff06f",
00000063 => x"00000513",
00000064 => x"00000593",
00000065 => x"b0001073",
00000066 => x"b8001073",
00000067 => x"b0201073",
00000068 => x"b8201073",
00000069 => x"3063d073",
00000070 => x"32001073",
00000071 => x"80000637",
00000072 => x"34261073",
00000073 => x"060000ef",
00000074 => x"30047073",
00000075 => x"00000013",
00000076 => x"10500073",
00000077 => x"0000006f",
00000078 => x"ff810113",
00000079 => x"00812023",
00000080 => x"00912223",
00000081 => x"34202473",
00000082 => x"02044663",
00000083 => x"34102473",
00000084 => x"00041483",
00000085 => x"0034f493",
00000086 => x"00240413",
00000087 => x"34141073",
00000088 => x"00300413",
00000089 => x"00941863",
00000090 => x"34102473",
00000091 => x"00240413",
00000092 => x"34141073",
00000093 => x"00012483",
00000094 => x"00412403",
00000095 => x"00810113",
00000096 => x"30200073",
00000097 => x"00005537",
00000098 => x"ff010113",
00000099 => x"00000693",
00000100 => x"00000613",
00000101 => x"00000593",
00000102 => x"b0050513",
00000103 => x"00112623",
00000104 => x"63c000ef",
00000105 => x"0f1000ef",
00000106 => x"02050063",
00000107 => x"480000ef",
00000108 => x"00000513",
00000109 => x"4d4000ef",
00000110 => x"00001537",
00000111 => x"cd450513",
00000112 => x"6c8000ef",
00000113 => x"020000ef",
00000114 => x"00001537",
00000115 => x"cb050513",
00000116 => x"6b8000ef",
00000117 => x"00c12083",
00000118 => x"00000513",
00000119 => x"01010113",
00000120 => x"00008067",
00000121 => x"ff010113",
00000122 => x"00000513",
00000123 => x"00812423",
00000124 => x"00112623",
00000125 => x"00000413",
00000126 => x"0ad000ef",
00000127 => x"0ff47513",
00000128 => x"0a5000ef",
00000129 => x"0c800513",
00000130 => x"0d1000ef",
00000131 => x"00140413",
00000132 => x"fedff06f",
00000133 => x"00000000",
00000134 => x"00000000",
00000135 => x"00000000",
00000136 => x"fc010113",
00000137 => x"02112e23",
00000138 => x"02512c23",
00000139 => x"02612a23",
00000140 => x"02712823",
00000141 => x"02a12623",
00000142 => x"02b12423",
00000143 => x"02c12223",
00000144 => x"02d12023",
00000145 => x"00e12e23",
00000146 => x"00f12c23",
00000147 => x"01012a23",
00000148 => x"01112823",
00000149 => x"01c12623",
00000150 => x"01d12423",
00000151 => x"01e12223",
00000152 => x"01f12023",
00000153 => x"34102773",
00000154 => x"34071073",
00000155 => x"342027f3",
00000156 => x"0807c863",
00000157 => x"00071683",
00000158 => x"00300593",
00000159 => x"0036f693",
00000160 => x"00270613",
00000161 => x"00b69463",
00000162 => x"00470613",
00000163 => x"34161073",
00000164 => x"00b00713",
00000165 => x"04f77a63",
00000166 => x"46800793",
00000167 => x"000780e7",
00000168 => x"03c12083",
00000169 => x"03812283",
00000170 => x"03412303",
00000171 => x"03012383",
00000172 => x"02c12503",
00000173 => x"02812583",
00000174 => x"02412603",
00000175 => x"02012683",
00000176 => x"01c12703",
00000177 => x"01812783",
00000178 => x"01412803",
00000179 => x"01012883",
00000180 => x"00c12e03",
00000181 => x"00812e83",
00000182 => x"00412f03",
00000183 => x"00012f83",
00000184 => x"04010113",
00000185 => x"30200073",
00000186 => x"00001737",
00000187 => x"00279793",
00000188 => x"cf070713",
00000189 => x"00e787b3",
00000190 => x"0007a783",
00000191 => x"00078067",
00000192 => x"80000737",
00000193 => x"ffd74713",
00000194 => x"00e787b3",
00000195 => x"01400713",
00000196 => x"f8f764e3",
00000197 => x"00001737",
00000198 => x"00279793",
00000199 => x"d2070713",
00000200 => x"00e787b3",
00000201 => x"0007a783",
00000202 => x"00078067",
00000203 => x"800007b7",
00000204 => x"0007a783",
00000205 => x"f69ff06f",
00000206 => x"800007b7",
00000207 => x"0047a783",
00000208 => x"f5dff06f",
00000209 => x"800007b7",
00000210 => x"0087a783",
00000211 => x"f51ff06f",
00000212 => x"800007b7",
00000213 => x"00c7a783",
00000214 => x"f45ff06f",
00000215 => x"8101a783",
00000216 => x"f3dff06f",
00000217 => x"8141a783",
00000218 => x"f35ff06f",
00000219 => x"8181a783",
00000220 => x"f2dff06f",
00000221 => x"81c1a783",
00000222 => x"f25ff06f",
00000223 => x"8201a783",
00000224 => x"f1dff06f",
00000225 => x"8241a783",
00000226 => x"f15ff06f",
00000227 => x"8281a783",
00000228 => x"f0dff06f",
00000229 => x"82c1a783",
00000230 => x"f05ff06f",
00000231 => x"8301a783",
00000232 => x"efdff06f",
00000233 => x"8341a783",
00000234 => x"ef5ff06f",
00000235 => x"8381a783",
00000236 => x"eedff06f",
00000237 => x"83c1a783",
00000238 => x"ee5ff06f",
00000239 => x"8401a783",
00000240 => x"eddff06f",
00000241 => x"8441a783",
00000242 => x"ed5ff06f",
00000243 => x"8481a783",
00000244 => x"ecdff06f",
00000245 => x"84c1a783",
00000246 => x"ec5ff06f",
00000247 => x"8501a783",
00000248 => x"ebdff06f",
00000249 => x"00000000",
00000250 => x"00000000",
00000251 => x"01553513",
00000252 => x"00154513",
00000253 => x"00008067",
00000254 => x"fe010113",
00000255 => x"01212823",
00000256 => x"00050913",
00000257 => x"00001537",
00000258 => x"00912a23",
00000259 => x"d7450513",
00000260 => x"000014b7",
00000261 => x"00812c23",
00000262 => x"01312623",
00000263 => x"00112e23",
00000264 => x"01c00413",
00000265 => x"464000ef",
00000266 => x"ff048493",
00000267 => x"ffc00993",
00000268 => x"008957b3",
00000269 => x"00f7f793",
00000270 => x"00f487b3",
00000271 => x"0007c503",
00000272 => x"ffc40413",
00000273 => x"434000ef",
00000274 => x"ff3414e3",
00000275 => x"01c12083",
00000276 => x"01812403",
00000277 => x"01412483",
00000278 => x"01012903",
00000279 => x"00c12983",
00000280 => x"02010113",
00000281 => x"00008067",
00000282 => x"00001537",
00000283 => x"ff010113",
00000284 => x"d7850513",
00000285 => x"00112623",
00000286 => x"00812423",
00000287 => x"40c000ef",
00000288 => x"34202473",
00000289 => x"00b00793",
00000290 => x"0087ee63",
00000291 => x"00001737",
00000292 => x"00241793",
00000293 => x"f0470713",
00000294 => x"00e787b3",
00000295 => x"0007a783",
00000296 => x"00078067",
00000297 => x"800007b7",
00000298 => x"00b78713",
00000299 => x"12e40663",
00000300 => x"02876663",
00000301 => x"00378713",
00000302 => x"10e40463",
00000303 => x"00778793",
00000304 => x"10f40663",
00000305 => x"00001537",
00000306 => x"ed850513",
00000307 => x"3bc000ef",
00000308 => x"00040513",
00000309 => x"f25ff0ef",
00000310 => x"03c0006f",
00000311 => x"ff07c793",
00000312 => x"00f407b3",
00000313 => x"00700713",
00000314 => x"fcf76ee3",
00000315 => x"00001537",
00000316 => x"ec850513",
00000317 => x"394000ef",
00000318 => x"00747513",
00000319 => x"03050513",
00000320 => x"378000ef",
00000321 => x"0100006f",
00000322 => x"00001537",
00000323 => x"d8050513",
00000324 => x"378000ef",
00000325 => x"00001537",
00000326 => x"ef050513",
00000327 => x"36c000ef",
00000328 => x"34002573",
00000329 => x"ed5ff0ef",
00000330 => x"00001537",
00000331 => x"ef850513",
00000332 => x"358000ef",
00000333 => x"34302573",
00000334 => x"ec1ff0ef",
00000335 => x"00812403",
00000336 => x"00c12083",
00000337 => x"00001537",
00000338 => x"f6050513",
00000339 => x"01010113",
00000340 => x"3380006f",
00000341 => x"00001537",
00000342 => x"da050513",
00000343 => x"fb5ff06f",
00000344 => x"00001537",
00000345 => x"dbc50513",
00000346 => x"fa9ff06f",
00000347 => x"00001537",
00000348 => x"dd050513",
00000349 => x"f9dff06f",
00000350 => x"00001537",
00000351 => x"ddc50513",
00000352 => x"f91ff06f",
00000353 => x"00001537",
00000354 => x"df450513",
00000355 => x"f85ff06f",
00000356 => x"00001537",
00000357 => x"e0850513",
00000358 => x"f79ff06f",
00000359 => x"00001537",
00000360 => x"e2450513",
00000361 => x"f6dff06f",
00000362 => x"00001537",
00000363 => x"e3850513",
00000364 => x"f61ff06f",
00000365 => x"00001537",
00000366 => x"e5850513",
00000367 => x"f55ff06f",
00000368 => x"00001537",
00000369 => x"e7850513",
00000370 => x"f49ff06f",
00000371 => x"00001537",
00000372 => x"e9450513",
00000373 => x"f3dff06f",
00000374 => x"00001537",
00000375 => x"eac50513",
00000376 => x"f31ff06f",
00000377 => x"ff010113",
00000378 => x"00812423",
00000379 => x"00112623",
00000380 => x"00050413",
00000381 => x"df9ff0ef",
00000382 => x"02051663",
00000383 => x"800007b7",
00000384 => x"00241413",
00000385 => x"00078793",
00000386 => x"008787b3",
00000387 => x"46800713",
00000388 => x"00e7a023",
00000389 => x"00c12083",
00000390 => x"00812403",
00000391 => x"01010113",
00000392 => x"00008067",
00000393 => x"00100513",
00000394 => x"fedff06f",
00000395 => x"ff010113",
00000396 => x"00112623",
00000397 => x"00812423",
00000398 => x"00912223",
00000399 => x"301027f3",
00000400 => x"00079863",
00000401 => x"00001537",
00000402 => x"f3450513",
00000403 => x"23c000ef",
00000404 => x"22000793",
00000405 => x"30579073",
00000406 => x"00000413",
00000407 => x"01500493",
00000408 => x"00040513",
00000409 => x"00140413",
00000410 => x"0ff47413",
00000411 => x"f79ff0ef",
00000412 => x"fe9418e3",
00000413 => x"00c12083",
00000414 => x"00812403",
00000415 => x"00412483",
00000416 => x"01010113",
00000417 => x"00008067",
00000418 => x"ff010113",
00000419 => x"00112623",
00000420 => x"00812423",
00000421 => x"30102673",
00000422 => x"400005b7",
00000423 => x"10058593",
00000424 => x"00b677b3",
00000425 => x"00000413",
00000426 => x"00b78c63",
00000427 => x"00100413",
00000428 => x"00051863",
00000429 => x"00001537",
00000430 => x"f6850513",
00000431 => x"224000ef",
00000432 => x"00c12083",
00000433 => x"00040513",
00000434 => x"00812403",
00000435 => x"01010113",
00000436 => x"00008067",
00000437 => x"fd010113",
00000438 => x"02812423",
00000439 => x"02912223",
00000440 => x"03212023",
00000441 => x"01312e23",
00000442 => x"01412c23",
00000443 => x"02112623",
00000444 => x"01512a23",
00000445 => x"00001a37",
00000446 => x"00050493",
00000447 => x"00058413",
00000448 => x"00058523",
00000449 => x"00000993",
00000450 => x"00410913",
00000451 => x"000a0a13",
00000452 => x"00a00593",
00000453 => x"00048513",
00000454 => x"534000ef",
00000455 => x"00aa0533",
00000456 => x"00054783",
00000457 => x"01390ab3",
00000458 => x"00048513",
00000459 => x"00fa8023",
00000460 => x"00a00593",
00000461 => x"4d0000ef",
00000462 => x"00198993",
00000463 => x"00a00793",
00000464 => x"00050493",
00000465 => x"fcf996e3",
00000466 => x"00090693",
00000467 => x"00900713",
00000468 => x"03000613",
00000469 => x"0096c583",
00000470 => x"00070793",
00000471 => x"fff70713",
00000472 => x"01071713",
00000473 => x"01075713",
00000474 => x"00c59a63",
00000475 => x"000684a3",
00000476 => x"fff68693",
00000477 => x"fe0710e3",
00000478 => x"00000793",
00000479 => x"00f907b3",
00000480 => x"00000593",
00000481 => x"0007c703",
00000482 => x"00070c63",
00000483 => x"00158693",
00000484 => x"00b405b3",
00000485 => x"00e58023",
00000486 => x"01069593",
00000487 => x"0105d593",
00000488 => x"fff78713",
00000489 => x"02f91863",
00000490 => x"00b40433",
00000491 => x"00040023",
00000492 => x"02c12083",
00000493 => x"02812403",
00000494 => x"02412483",
00000495 => x"02012903",
00000496 => x"01c12983",
00000497 => x"01812a03",
00000498 => x"01412a83",
00000499 => x"03010113",
00000500 => x"00008067",
00000501 => x"00070793",
00000502 => x"fadff06f",
00000503 => x"fa002023",
00000504 => x"fe002703",
00000505 => x"00151513",
00000506 => x"00000793",
00000507 => x"04a77a63",
00000508 => x"00001537",
00000509 => x"00000713",
00000510 => x"ffe50513",
00000511 => x"04f56c63",
00000512 => x"0016f693",
00000513 => x"00167613",
00000514 => x"fff78793",
00000515 => x"01e69693",
00000516 => x"0035f593",
00000517 => x"00d7e7b3",
00000518 => x"01d61613",
00000519 => x"00c7e7b3",
00000520 => x"01659593",
00000521 => x"01871713",
00000522 => x"00b7e7b3",
00000523 => x"00e7e7b3",
00000524 => x"10000737",
00000525 => x"00e7e7b3",
00000526 => x"faf02023",
00000527 => x"00008067",
00000528 => x"00178793",
00000529 => x"01079793",
00000530 => x"40a70733",
00000531 => x"0107d793",
00000532 => x"f9dff06f",
00000533 => x"ffe70813",
00000534 => x"0fd87813",
00000535 => x"00081a63",
00000536 => x"0037d793",
00000537 => x"00170713",
00000538 => x"0ff77713",
00000539 => x"f91ff06f",
00000540 => x"0017d793",
00000541 => x"ff1ff06f",
00000542 => x"fa002783",
00000543 => x"fe07cee3",
00000544 => x"faa02223",
00000545 => x"00008067",
00000546 => x"ff010113",
00000547 => x"00812423",
00000548 => x"01212023",
00000549 => x"00112623",
00000550 => x"00912223",
00000551 => x"00050413",
00000552 => x"00a00913",
00000553 => x"00044483",
00000554 => x"00140413",
00000555 => x"00049e63",
00000556 => x"00c12083",
00000557 => x"00812403",
00000558 => x"00412483",
00000559 => x"00012903",
00000560 => x"01010113",
00000561 => x"00008067",
00000562 => x"01249663",
00000563 => x"00d00513",
00000564 => x"fa9ff0ef",
00000565 => x"00048513",
00000566 => x"fa1ff0ef",
00000567 => x"fc9ff06f",
00000568 => x"fa010113",
00000569 => x"02912a23",
00000570 => x"04f12a23",
00000571 => x"000014b7",
00000572 => x"04410793",
00000573 => x"02812c23",
00000574 => x"03212823",
00000575 => x"03412423",
00000576 => x"03512223",
00000577 => x"03612023",
00000578 => x"01712e23",
00000579 => x"02112e23",
00000580 => x"03312623",
00000581 => x"01812c23",
00000582 => x"00050413",
00000583 => x"04b12223",
00000584 => x"04c12423",
00000585 => x"04d12623",
00000586 => x"04e12823",
00000587 => x"05012c23",
00000588 => x"05112e23",
00000589 => x"00f12023",
00000590 => x"02500a13",
00000591 => x"00a00a93",
00000592 => x"07300913",
00000593 => x"07500b13",
00000594 => x"07800b93",
00000595 => x"00c48493",
00000596 => x"00044c03",
00000597 => x"020c0463",
00000598 => x"134c1263",
00000599 => x"00144783",
00000600 => x"00240993",
00000601 => x"09278c63",
00000602 => x"04f96263",
00000603 => x"06300713",
00000604 => x"0ae78463",
00000605 => x"06900713",
00000606 => x"0ae78c63",
00000607 => x"03c12083",
00000608 => x"03812403",
00000609 => x"03412483",
00000610 => x"03012903",
00000611 => x"02c12983",
00000612 => x"02812a03",
00000613 => x"02412a83",
00000614 => x"02012b03",
00000615 => x"01c12b83",
00000616 => x"01812c03",
00000617 => x"06010113",
00000618 => x"00008067",
00000619 => x"0b678c63",
00000620 => x"fd7796e3",
00000621 => x"00012783",
00000622 => x"00410693",
00000623 => x"00068513",
00000624 => x"0007a583",
00000625 => x"00478713",
00000626 => x"00e12023",
00000627 => x"02000613",
00000628 => x"00000713",
00000629 => x"00e5d7b3",
00000630 => x"00f7f793",
00000631 => x"00f487b3",
00000632 => x"0007c783",
00000633 => x"00470713",
00000634 => x"fff68693",
00000635 => x"00f68423",
00000636 => x"fec712e3",
00000637 => x"00010623",
00000638 => x"0140006f",
00000639 => x"00012783",
00000640 => x"0007a503",
00000641 => x"00478713",
00000642 => x"00e12023",
00000643 => x"e7dff0ef",
00000644 => x"00098413",
00000645 => x"f3dff06f",
00000646 => x"00012783",
00000647 => x"0007c503",
00000648 => x"00478713",
00000649 => x"00e12023",
00000650 => x"e51ff0ef",
00000651 => x"fe5ff06f",
00000652 => x"00012783",
00000653 => x"0007a403",
00000654 => x"00478713",
00000655 => x"00e12023",
00000656 => x"00045863",
00000657 => x"02d00513",
00000658 => x"40800433",
00000659 => x"e2dff0ef",
00000660 => x"00410593",
00000661 => x"00040513",
00000662 => x"c7dff0ef",
00000663 => x"00410513",
00000664 => x"fadff06f",
00000665 => x"00012783",
00000666 => x"00410593",
00000667 => x"00478713",
00000668 => x"0007a503",
00000669 => x"00e12023",
00000670 => x"fe1ff06f",
00000671 => x"015c1663",
00000672 => x"00d00513",
00000673 => x"df5ff0ef",
00000674 => x"00140993",
00000675 => x"000c0513",
00000676 => x"f99ff06f",
00000677 => x"fe802503",
00000678 => x"01055513",
00000679 => x"00157513",
00000680 => x"00008067",
00000681 => x"f8a02223",
00000682 => x"00008067",
00000683 => x"ff010113",
00000684 => x"c80026f3",
00000685 => x"c0002773",
00000686 => x"c80027f3",
00000687 => x"fed79ae3",
00000688 => x"00e12023",
00000689 => x"00f12223",
00000690 => x"00012503",
00000691 => x"00412583",
00000692 => x"01010113",
00000693 => x"00008067",
00000694 => x"fe010113",
00000695 => x"00112e23",
00000696 => x"00812c23",
00000697 => x"00912a23",
00000698 => x"00a12623",
00000699 => x"fc1ff0ef",
00000700 => x"00050493",
00000701 => x"fe002503",
00000702 => x"00058413",
00000703 => x"3e800593",
00000704 => x"104000ef",
00000705 => x"00c12603",
00000706 => x"00000693",
00000707 => x"00000593",
00000708 => x"05c000ef",
00000709 => x"009504b3",
00000710 => x"00a4b533",
00000711 => x"00858433",
00000712 => x"00850433",
00000713 => x"f89ff0ef",
00000714 => x"fe85eee3",
00000715 => x"00b41463",
00000716 => x"fe956ae3",
00000717 => x"01c12083",
00000718 => x"01812403",
00000719 => x"01412483",
00000720 => x"02010113",
00000721 => x"00008067",
00000722 => x"00050613",
00000723 => x"00000513",
00000724 => x"0015f693",
00000725 => x"00068463",
00000726 => x"00c50533",
00000727 => x"0015d593",
00000728 => x"00161613",
00000729 => x"fe0596e3",
00000730 => x"00008067",
00000731 => x"00050313",
00000732 => x"ff010113",
00000733 => x"00060513",
00000734 => x"00068893",
00000735 => x"00112623",
00000736 => x"00030613",
00000737 => x"00050693",
00000738 => x"00000713",
00000739 => x"00000793",
00000740 => x"00000813",
00000741 => x"0016fe13",
00000742 => x"00171e93",
00000743 => x"000e0c63",
00000744 => x"01060e33",
00000745 => x"010e3833",
00000746 => x"00e787b3",
00000747 => x"00f807b3",
00000748 => x"000e0813",
00000749 => x"01f65713",
00000750 => x"0016d693",
00000751 => x"00eee733",
00000752 => x"00161613",
00000753 => x"fc0698e3",
00000754 => x"00058663",
00000755 => x"f7dff0ef",
00000756 => x"00a787b3",
00000757 => x"00088a63",
00000758 => x"00030513",
00000759 => x"00088593",
00000760 => x"f69ff0ef",
00000761 => x"00f507b3",
00000762 => x"00c12083",
00000763 => x"00080513",
00000764 => x"00078593",
00000765 => x"01010113",
00000766 => x"00008067",
00000767 => x"06054063",
00000768 => x"0605c663",
00000769 => x"00058613",
00000770 => x"00050593",
00000771 => x"fff00513",
00000772 => x"02060c63",
00000773 => x"00100693",
00000774 => x"00b67a63",
00000775 => x"00c05863",
00000776 => x"00161613",
00000777 => x"00169693",
00000778 => x"feb66ae3",
00000779 => x"00000513",
00000780 => x"00c5e663",
00000781 => x"40c585b3",
00000782 => x"00d56533",
00000783 => x"0016d693",
00000784 => x"00165613",
00000785 => x"fe0696e3",
00000786 => x"00008067",
00000787 => x"00008293",
00000788 => x"fb5ff0ef",
00000789 => x"00058513",
00000790 => x"00028067",
00000791 => x"40a00533",
00000792 => x"00b04863",
00000793 => x"40b005b3",
00000794 => x"f9dff06f",
00000795 => x"40b005b3",
00000796 => x"00008293",
00000797 => x"f91ff0ef",
00000798 => x"40a00533",
00000799 => x"00028067",
00000800 => x"00008293",
00000801 => x"0005ca63",
00000802 => x"00054c63",
00000803 => x"f79ff0ef",
00000804 => x"00058513",
00000805 => x"00028067",
00000806 => x"40b005b3",
00000807 => x"fe0558e3",
00000808 => x"40a00533",
00000809 => x"f61ff0ef",
00000810 => x"40b00533",
00000811 => x"00028067",
00000812 => x"6f727245",
00000813 => x"4e202172",
00000814 => x"5047206f",
00000815 => x"75204f49",
00000816 => x"2074696e",
00000817 => x"746e7973",
00000818 => x"69736568",
00000819 => x"2164657a",
00000820 => x"0000000a",
00000821 => x"6e696c42",
00000822 => x"676e696b",
00000823 => x"44454c20",
00000824 => x"6d656420",
00000825 => x"7270206f",
00000826 => x"6172676f",
00000827 => x"00000a6d",
00000828 => x"0000032c",
00000829 => x"00000338",
00000830 => x"00000344",
00000831 => x"00000350",
00000832 => x"0000035c",
00000833 => x"00000364",
00000834 => x"0000036c",
00000835 => x"00000374",
00000836 => x"0000037c",
00000837 => x"00000298",
00000838 => x"00000298",
00000839 => x"00000384",
00000840 => x"0000038c",
00000841 => x"00000298",
00000842 => x"00000298",
00000843 => x"00000298",
00000844 => x"00000394",
00000845 => x"00000298",
00000846 => x"00000298",
00000847 => x"00000298",
00000848 => x"0000039c",
00000849 => x"00000298",
00000850 => x"00000298",
00000851 => x"00000298",
00000852 => x"00000298",
00000853 => x"000003a4",
00000854 => x"000003ac",
00000855 => x"000003b4",
00000856 => x"000003bc",
00000857 => x"000003c4",
00000858 => x"000003cc",
00000859 => x"000003d4",
00000860 => x"000003dc",
00000861 => x"00007830",
00000862 => x"4554523c",
00000863 => x"0000203e",
00000864 => x"74736e49",
00000865 => x"74637572",
00000866 => x"206e6f69",
00000867 => x"72646461",
00000868 => x"20737365",
00000869 => x"6173696d",
00000870 => x"6e67696c",
00000871 => x"00006465",
00000872 => x"74736e49",
00000873 => x"74637572",
00000874 => x"206e6f69",
00000875 => x"65636361",
00000876 => x"66207373",
00000877 => x"746c7561",
00000878 => x"00000000",
00000879 => x"656c6c49",
00000880 => x"206c6167",
00000881 => x"74736e69",
00000882 => x"74637572",
00000883 => x"006e6f69",
00000884 => x"61657242",
00000885 => x"696f706b",
00000886 => x"0000746e",
00000887 => x"64616f4c",
00000888 => x"64646120",
00000889 => x"73736572",
00000890 => x"73696d20",
00000891 => x"67696c61",
00000892 => x"0064656e",
00000893 => x"64616f4c",
00000894 => x"63636120",
00000895 => x"20737365",
00000896 => x"6c756166",
00000897 => x"00000074",
00000898 => x"726f7453",
00000899 => x"64612065",
00000900 => x"73657264",
00000901 => x"696d2073",
00000902 => x"696c6173",
00000903 => x"64656e67",
00000904 => x"00000000",
00000905 => x"726f7453",
00000906 => x"63612065",
00000907 => x"73736563",
00000908 => x"75616620",
00000909 => x"0000746c",
00000910 => x"69766e45",
00000911 => x"6d6e6f72",
00000912 => x"20746e65",
00000913 => x"6c6c6163",
00000914 => x"6f726620",
00000915 => x"2d55206d",
00000916 => x"65646f6d",
00000917 => x"00000000",
00000918 => x"69766e45",
00000919 => x"6d6e6f72",
00000920 => x"20746e65",
00000921 => x"6c6c6163",
00000922 => x"6f726620",
00000923 => x"2d4d206d",
00000924 => x"65646f6d",
00000925 => x"00000000",
00000926 => x"6863614d",
00000927 => x"20656e69",
00000928 => x"74666f73",
00000929 => x"65726177",
00000930 => x"746e6920",
00000931 => x"75727265",
00000932 => x"00007470",
00000933 => x"6863614d",
00000934 => x"20656e69",
00000935 => x"656d6974",
00000936 => x"6e692072",
00000937 => x"72726574",
00000938 => x"00747075",
00000939 => x"6863614d",
00000940 => x"20656e69",
00000941 => x"65747865",
00000942 => x"6c616e72",
00000943 => x"746e6920",
00000944 => x"75727265",
00000945 => x"00007470",
00000946 => x"74736146",
00000947 => x"746e6920",
00000948 => x"75727265",
00000949 => x"00207470",
00000950 => x"6e6b6e55",
00000951 => x"206e776f",
00000952 => x"70617274",
00000953 => x"75616320",
00000954 => x"203a6573",
00000955 => x"00000000",
00000956 => x"50204020",
00000957 => x"00003d43",
00000958 => x"544d202c",
00000959 => x"3d4c4156",
00000960 => x"00000000",
00000961 => x"00000508",
00000962 => x"00000554",
00000963 => x"00000560",
00000964 => x"0000056c",
00000965 => x"00000578",
00000966 => x"00000584",
00000967 => x"00000590",
00000968 => x"0000059c",
00000969 => x"000005a8",
00000970 => x"000004c4",
00000971 => x"000004c4",
00000972 => x"000005b4",
00000973 => x"4554523c",
00000974 => x"4157203e",
00000975 => x"4e494e52",
00000976 => x"43202147",
00000977 => x"43205550",
00000978 => x"73205253",
00000979 => x"65747379",
00000980 => x"6f6e206d",
00000981 => x"76612074",
00000982 => x"616c6961",
00000983 => x"21656c62",
00000984 => x"522f3c20",
00000985 => x"003e4554",
00000986 => x"5241570a",
00000987 => x"474e494e",
00000988 => x"57532021",
00000989 => x"4153495f",
00000990 => x"65662820",
00000991 => x"72757461",
00000992 => x"72207365",
00000993 => x"69757165",
00000994 => x"29646572",
00000995 => x"20737620",
00000996 => x"495f5748",
00000997 => x"28204153",
00000998 => x"74616566",
00000999 => x"73657275",
00001000 => x"61766120",
00001001 => x"62616c69",
00001002 => x"2029656c",
00001003 => x"6d73696d",
00001004 => x"68637461",
00001005 => x"57530a21",
00001006 => x"4153495f",
00001007 => x"30203d20",
00001008 => x"20782578",
00001009 => x"6d6f6328",
00001010 => x"656c6970",
00001011 => x"6c662072",
00001012 => x"29736761",
00001013 => x"5f57480a",
00001014 => x"20415349",
00001015 => x"7830203d",
00001016 => x"28207825",
00001017 => x"6173696d",
00001018 => x"72736320",
00001019 => x"000a0a29",
00001020 => x"33323130",
00001021 => x"37363534",
00001022 => x"42413938",
00001023 => x"46454443",
00001024 => x"33323130",
00001025 => x"37363534",
00001026 => x"00003938",
00001027 => x"33323130",
00001028 => x"37363534",
00001029 => x"62613938",
00001030 => x"66656463",
00001031 => x"00000000",
others => x"00000000"
);
 
/rtl/core/neorv32_bootloader_image.vhd
6,7 → 6,7
 
package neorv32_bootloader_image is
 
type bootloader_init_image_t is array (0 to 988) of std_ulogic_vector(31 downto 0);
type bootloader_init_image_t is array (0 to 999) of std_ulogic_vector(31 downto 0);
constant bootloader_init_image : bootloader_init_image_t := (
00000000 => x"00000093",
00000001 => x"00000113",
32,19 → 32,19
00000021 => x"00000597",
00000022 => x"0a458593",
00000023 => x"30559073",
00000024 => x"f8000593",
00000024 => x"f0000593",
00000025 => x"0005a023",
00000026 => x"00458593",
00000027 => x"feb01ce3",
00000028 => x"80010597",
00000029 => x"f9058593",
00000030 => x"80418613",
00000030 => x"80818613",
00000031 => x"00c5d863",
00000032 => x"00058023",
00000033 => x"00158593",
00000034 => x"ff5ff06f",
00000035 => x"00001597",
00000036 => x"ee458593",
00000036 => x"f1058593",
00000037 => x"80010617",
00000038 => x"f6c60613",
00000039 => x"80010697",
90,912 → 90,923
00000079 => x"00810113",
00000080 => x"30200073",
00000081 => x"800007b7",
00000082 => x"fd010113",
00000083 => x"0007a023",
00000084 => x"ffff07b7",
00000085 => x"02112623",
00000086 => x"02812423",
00000087 => x"02912223",
00000088 => x"03212023",
00000089 => x"01312e23",
00000090 => x"01412c23",
00000091 => x"01512a23",
00000092 => x"01612823",
00000093 => x"01712623",
00000094 => x"01812423",
00000095 => x"4c478793",
00000096 => x"30579073",
00000097 => x"fe002403",
00000098 => x"026267b7",
00000099 => x"9ff78793",
00000100 => x"00000693",
00000101 => x"00000613",
00000102 => x"00000593",
00000103 => x"00200513",
00000104 => x"0087f463",
00000105 => x"00400513",
00000106 => x"305000ef",
00000107 => x"00100513",
00000108 => x"3b1000ef",
00000109 => x"00005537",
00000110 => x"00000693",
00000111 => x"00000613",
00000112 => x"00000593",
00000113 => x"b0050513",
00000114 => x"1c9000ef",
00000115 => x"181000ef",
00000116 => x"00245793",
00000117 => x"00a78533",
00000118 => x"00f537b3",
00000119 => x"00b785b3",
00000120 => x"199000ef",
00000121 => x"08000793",
00000122 => x"30479073",
00000123 => x"30046073",
00000124 => x"00000013",
00000082 => x"0007a023",
00000083 => x"fd010113",
00000084 => x"8001a223",
00000085 => x"02812423",
00000086 => x"fe002403",
00000087 => x"026267b7",
00000088 => x"02112623",
00000089 => x"02912223",
00000090 => x"03212023",
00000091 => x"01312e23",
00000092 => x"01412c23",
00000093 => x"01512a23",
00000094 => x"01612823",
00000095 => x"01712623",
00000096 => x"01812423",
00000097 => x"9ff78793",
00000098 => x"00000693",
00000099 => x"00000613",
00000100 => x"00000593",
00000101 => x"00200513",
00000102 => x"0087f463",
00000103 => x"00400513",
00000104 => x"339000ef",
00000105 => x"00100513",
00000106 => x"3e5000ef",
00000107 => x"00005537",
00000108 => x"00000693",
00000109 => x"00000613",
00000110 => x"00000593",
00000111 => x"b0050513",
00000112 => x"1f9000ef",
00000113 => x"1b1000ef",
00000114 => x"00245793",
00000115 => x"00a78533",
00000116 => x"00f537b3",
00000117 => x"00b785b3",
00000118 => x"1c9000ef",
00000119 => x"ffff07b7",
00000120 => x"4c878793",
00000121 => x"30579073",
00000122 => x"08000793",
00000123 => x"30479073",
00000124 => x"30046073",
00000125 => x"00000013",
00000126 => x"ffff1537",
00000127 => x"e8c50513",
00000128 => x"255000ef",
00000129 => x"f1302573",
00000130 => x"24c000ef",
00000131 => x"ffff1537",
00000132 => x"ec450513",
00000133 => x"241000ef",
00000134 => x"fe002503",
00000135 => x"238000ef",
00000136 => x"ffff1537",
00000137 => x"ecc50513",
00000138 => x"22d000ef",
00000139 => x"fe402503",
00000140 => x"224000ef",
00000141 => x"ffff1537",
00000142 => x"ed850513",
00000143 => x"219000ef",
00000144 => x"30102573",
00000145 => x"210000ef",
00000146 => x"ffff1537",
00000147 => x"ee050513",
00000148 => x"205000ef",
00000149 => x"fe802503",
00000150 => x"ffff14b7",
00000151 => x"00341413",
00000152 => x"1f4000ef",
00000153 => x"ffff1537",
00000154 => x"ee850513",
00000155 => x"1e9000ef",
00000156 => x"ff802503",
00000157 => x"1e0000ef",
00000158 => x"ef048513",
00000159 => x"1d9000ef",
00000160 => x"ff002503",
00000161 => x"1d0000ef",
00000162 => x"ffff1537",
00000163 => x"efc50513",
00000164 => x"1c5000ef",
00000165 => x"ffc02503",
00000166 => x"1bc000ef",
00000167 => x"ef048513",
00000168 => x"1b5000ef",
00000169 => x"ff402503",
00000170 => x"1ac000ef",
00000171 => x"ffff1537",
00000172 => x"f0450513",
00000173 => x"1a1000ef",
00000174 => x"095000ef",
00000175 => x"00a404b3",
00000176 => x"0084b433",
00000177 => x"00b40433",
00000178 => x"fa402783",
00000179 => x"0207d263",
00000180 => x"ffff1537",
00000181 => x"f2c50513",
00000182 => x"17d000ef",
00000183 => x"16d000ef",
00000184 => x"02300793",
00000185 => x"02f51263",
00000186 => x"00000513",
00000187 => x"0180006f",
00000188 => x"05d000ef",
00000189 => x"fc85eae3",
00000190 => x"00b41463",
00000191 => x"fc9566e3",
00000192 => x"00100513",
00000193 => x"5b8000ef",
00000194 => x"0b4000ef",
00000195 => x"ffff1937",
00000196 => x"ffff19b7",
00000197 => x"02300a13",
00000198 => x"07200a93",
00000199 => x"06800b13",
00000200 => x"07500b93",
00000201 => x"ffff14b7",
00000202 => x"ffff1c37",
00000203 => x"f3890513",
00000204 => x"125000ef",
00000205 => x"105000ef",
00000206 => x"00050413",
00000207 => x"0ed000ef",
00000208 => x"e4498513",
00000209 => x"111000ef",
00000210 => x"fb4400e3",
00000211 => x"01541863",
00000212 => x"ffff02b7",
00000213 => x"00028067",
00000214 => x"fd5ff06f",
00000215 => x"01641663",
00000216 => x"05c000ef",
00000217 => x"fc9ff06f",
00000218 => x"00000513",
00000219 => x"03740063",
00000220 => x"07300793",
00000221 => x"00f41663",
00000222 => x"658000ef",
00000223 => x"fb1ff06f",
00000224 => x"06c00793",
00000225 => x"00f41863",
00000226 => x"00100513",
00000227 => x"3f4000ef",
00000228 => x"f9dff06f",
00000229 => x"06500793",
00000230 => x"00f41663",
00000231 => x"02c000ef",
00000232 => x"f8dff06f",
00000233 => x"03f00793",
00000234 => x"f40c0513",
00000235 => x"00f40463",
00000236 => x"f5448513",
00000237 => x"0a1000ef",
00000238 => x"f75ff06f",
00000239 => x"ffff1537",
00000240 => x"d6850513",
00000241 => x"0910006f",
00000242 => x"800007b7",
00000243 => x"0007a783",
00000244 => x"00079863",
00000245 => x"ffff1537",
00000246 => x"dcc50513",
00000247 => x"0790006f",
00000248 => x"ff010113",
00000249 => x"00112623",
00000250 => x"30047073",
00000251 => x"00000013",
00000126 => x"00000013",
00000127 => x"ffff1537",
00000128 => x"eb850513",
00000129 => x"27d000ef",
00000130 => x"f1302573",
00000131 => x"24c000ef",
00000132 => x"ffff1537",
00000133 => x"ef050513",
00000134 => x"269000ef",
00000135 => x"fe002503",
00000136 => x"238000ef",
00000137 => x"ffff1537",
00000138 => x"ef850513",
00000139 => x"255000ef",
00000140 => x"fe402503",
00000141 => x"224000ef",
00000142 => x"ffff1537",
00000143 => x"f0450513",
00000144 => x"241000ef",
00000145 => x"30102573",
00000146 => x"210000ef",
00000147 => x"ffff1537",
00000148 => x"f0c50513",
00000149 => x"22d000ef",
00000150 => x"fe802503",
00000151 => x"ffff14b7",
00000152 => x"00341413",
00000153 => x"1f4000ef",
00000154 => x"ffff1537",
00000155 => x"f1450513",
00000156 => x"211000ef",
00000157 => x"ff802503",
00000158 => x"1e0000ef",
00000159 => x"f1c48513",
00000160 => x"201000ef",
00000161 => x"ff002503",
00000162 => x"1d0000ef",
00000163 => x"ffff1537",
00000164 => x"f2850513",
00000165 => x"1ed000ef",
00000166 => x"ffc02503",
00000167 => x"1bc000ef",
00000168 => x"f1c48513",
00000169 => x"1dd000ef",
00000170 => x"ff402503",
00000171 => x"1ac000ef",
00000172 => x"ffff1537",
00000173 => x"f3050513",
00000174 => x"1c9000ef",
00000175 => x"0b9000ef",
00000176 => x"00a404b3",
00000177 => x"0084b433",
00000178 => x"00b40433",
00000179 => x"fa402783",
00000180 => x"0207d263",
00000181 => x"ffff1537",
00000182 => x"f5850513",
00000183 => x"1a5000ef",
00000184 => x"195000ef",
00000185 => x"02300793",
00000186 => x"02f51263",
00000187 => x"00000513",
00000188 => x"0180006f",
00000189 => x"081000ef",
00000190 => x"fc85eae3",
00000191 => x"00b41463",
00000192 => x"fc9566e3",
00000193 => x"00100513",
00000194 => x"5dc000ef",
00000195 => x"0b4000ef",
00000196 => x"ffff1937",
00000197 => x"ffff19b7",
00000198 => x"02300a13",
00000199 => x"07200a93",
00000200 => x"06800b13",
00000201 => x"07500b93",
00000202 => x"ffff14b7",
00000203 => x"ffff1c37",
00000204 => x"f6490513",
00000205 => x"14d000ef",
00000206 => x"12d000ef",
00000207 => x"00050413",
00000208 => x"115000ef",
00000209 => x"e7098513",
00000210 => x"139000ef",
00000211 => x"fb4400e3",
00000212 => x"01541863",
00000213 => x"ffff02b7",
00000214 => x"00028067",
00000215 => x"fd5ff06f",
00000216 => x"01641663",
00000217 => x"05c000ef",
00000218 => x"fc9ff06f",
00000219 => x"00000513",
00000220 => x"03740063",
00000221 => x"07300793",
00000222 => x"00f41663",
00000223 => x"67c000ef",
00000224 => x"fb1ff06f",
00000225 => x"06c00793",
00000226 => x"00f41863",
00000227 => x"00100513",
00000228 => x"3fc000ef",
00000229 => x"f9dff06f",
00000230 => x"06500793",
00000231 => x"00f41663",
00000232 => x"02c000ef",
00000233 => x"f8dff06f",
00000234 => x"03f00793",
00000235 => x"f6cc0513",
00000236 => x"00f40463",
00000237 => x"f8048513",
00000238 => x"0c9000ef",
00000239 => x"f75ff06f",
00000240 => x"ffff1537",
00000241 => x"d9450513",
00000242 => x"0b90006f",
00000243 => x"800007b7",
00000244 => x"0007a783",
00000245 => x"00079863",
00000246 => x"ffff1537",
00000247 => x"df850513",
00000248 => x"0a10006f",
00000249 => x"ff010113",
00000250 => x"00112623",
00000251 => x"30047073",
00000252 => x"00000013",
00000253 => x"ffff1537",
00000254 => x"de850513",
00000255 => x"059000ef",
00000256 => x"fa002783",
00000257 => x"fe07cee3",
00000258 => x"ff002783",
00000259 => x"00078067",
00000260 => x"0000006f",
00000261 => x"ff010113",
00000262 => x"00812423",
00000263 => x"00050413",
00000264 => x"ffff1537",
00000265 => x"df850513",
00000266 => x"00112623",
00000267 => x"029000ef",
00000268 => x"03040513",
00000269 => x"0ff57513",
00000270 => x"7f0000ef",
00000271 => x"30047073",
00000272 => x"00000013",
00000253 => x"00000013",
00000254 => x"ffff1537",
00000255 => x"e1450513",
00000256 => x"081000ef",
00000257 => x"fa002783",
00000258 => x"fe07cee3",
00000259 => x"ff002783",
00000260 => x"00078067",
00000261 => x"0000006f",
00000262 => x"ff010113",
00000263 => x"00812423",
00000264 => x"00050413",
00000265 => x"ffff1537",
00000266 => x"e2450513",
00000267 => x"00112623",
00000268 => x"051000ef",
00000269 => x"03040513",
00000270 => x"0ff57513",
00000271 => x"019000ef",
00000272 => x"30047073",
00000273 => x"00000013",
00000274 => x"00100513",
00000275 => x"115000ef",
00000276 => x"0000006f",
00000277 => x"fe010113",
00000278 => x"01212823",
00000279 => x"00050913",
00000280 => x"ffff1537",
00000281 => x"00912a23",
00000282 => x"e1050513",
00000283 => x"ffff14b7",
00000284 => x"00812c23",
00000285 => x"01312623",
00000286 => x"00112e23",
00000287 => x"01c00413",
00000288 => x"7d4000ef",
00000289 => x"f6048493",
00000290 => x"ffc00993",
00000291 => x"008957b3",
00000292 => x"00f7f793",
00000293 => x"00f487b3",
00000294 => x"0007c503",
00000295 => x"ffc40413",
00000296 => x"788000ef",
00000297 => x"ff3414e3",
00000298 => x"01c12083",
00000299 => x"01812403",
00000300 => x"01412483",
00000301 => x"01012903",
00000302 => x"00c12983",
00000303 => x"02010113",
00000304 => x"00008067",
00000305 => x"fb010113",
00000306 => x"04112623",
00000307 => x"04512423",
00000308 => x"04612223",
00000309 => x"04712023",
00000310 => x"02812e23",
00000311 => x"02a12c23",
00000312 => x"02b12a23",
00000313 => x"02c12823",
00000314 => x"02d12623",
00000315 => x"02e12423",
00000316 => x"02f12223",
00000317 => x"03012023",
00000318 => x"01112e23",
00000319 => x"01c12c23",
00000320 => x"01d12a23",
00000321 => x"01e12823",
00000322 => x"01f12623",
00000323 => x"34202473",
00000324 => x"800007b7",
00000325 => x"00778793",
00000326 => x"06f41a63",
00000327 => x"00000513",
00000328 => x"025000ef",
00000329 => x"628000ef",
00000330 => x"fe002783",
00000331 => x"0027d793",
00000332 => x"00a78533",
00000333 => x"00f537b3",
00000334 => x"00b785b3",
00000335 => x"63c000ef",
00000336 => x"03c12403",
00000337 => x"04c12083",
00000338 => x"04812283",
00000339 => x"04412303",
00000340 => x"04012383",
00000341 => x"03812503",
00000342 => x"03412583",
00000343 => x"03012603",
00000344 => x"02c12683",
00000345 => x"02812703",
00000346 => x"02412783",
00000347 => x"02012803",
00000348 => x"01c12883",
00000349 => x"01812e03",
00000350 => x"01412e83",
00000351 => x"01012f03",
00000352 => x"00c12f83",
00000353 => x"05010113",
00000354 => x"30200073",
00000355 => x"00700793",
00000356 => x"00100513",
00000357 => x"02f40863",
00000358 => x"ffff1537",
00000359 => x"e0450513",
00000360 => x"6b4000ef",
00000361 => x"00040513",
00000362 => x"eadff0ef",
00000363 => x"ffff1537",
00000364 => x"e0c50513",
00000365 => x"6a0000ef",
00000366 => x"34102573",
00000367 => x"e99ff0ef",
00000368 => x"00500513",
00000369 => x"e51ff0ef",
00000370 => x"ff010113",
00000371 => x"00000513",
00000372 => x"00112623",
00000373 => x"00812423",
00000374 => x"714000ef",
00000375 => x"09e00513",
00000376 => x"750000ef",
00000377 => x"00000513",
00000378 => x"748000ef",
00000379 => x"00050413",
00000274 => x"00000013",
00000275 => x"00100513",
00000276 => x"13d000ef",
00000277 => x"0000006f",
00000278 => x"fe010113",
00000279 => x"01212823",
00000280 => x"00050913",
00000281 => x"ffff1537",
00000282 => x"00912a23",
00000283 => x"e3c50513",
00000284 => x"ffff14b7",
00000285 => x"00812c23",
00000286 => x"01312623",
00000287 => x"00112e23",
00000288 => x"01c00413",
00000289 => x"7fc000ef",
00000290 => x"f8c48493",
00000291 => x"ffc00993",
00000292 => x"008957b3",
00000293 => x"00f7f793",
00000294 => x"00f487b3",
00000295 => x"0007c503",
00000296 => x"ffc40413",
00000297 => x"7b0000ef",
00000298 => x"ff3414e3",
00000299 => x"01c12083",
00000300 => x"01812403",
00000301 => x"01412483",
00000302 => x"01012903",
00000303 => x"00c12983",
00000304 => x"02010113",
00000305 => x"00008067",
00000306 => x"fb010113",
00000307 => x"04112623",
00000308 => x"04512423",
00000309 => x"04612223",
00000310 => x"04712023",
00000311 => x"02812e23",
00000312 => x"02a12c23",
00000313 => x"02b12a23",
00000314 => x"02c12823",
00000315 => x"02d12623",
00000316 => x"02e12423",
00000317 => x"02f12223",
00000318 => x"03012023",
00000319 => x"01112e23",
00000320 => x"01c12c23",
00000321 => x"01d12a23",
00000322 => x"01e12823",
00000323 => x"01f12623",
00000324 => x"34202473",
00000325 => x"800007b7",
00000326 => x"00778793",
00000327 => x"06f41a63",
00000328 => x"00000513",
00000329 => x"04d000ef",
00000330 => x"64c000ef",
00000331 => x"fe002783",
00000332 => x"0027d793",
00000333 => x"00a78533",
00000334 => x"00f537b3",
00000335 => x"00b785b3",
00000336 => x"660000ef",
00000337 => x"03c12403",
00000338 => x"04c12083",
00000339 => x"04812283",
00000340 => x"04412303",
00000341 => x"04012383",
00000342 => x"03812503",
00000343 => x"03412583",
00000344 => x"03012603",
00000345 => x"02c12683",
00000346 => x"02812703",
00000347 => x"02412783",
00000348 => x"02012803",
00000349 => x"01c12883",
00000350 => x"01812e03",
00000351 => x"01412e83",
00000352 => x"01012f03",
00000353 => x"00c12f83",
00000354 => x"05010113",
00000355 => x"30200073",
00000356 => x"00700793",
00000357 => x"00f41863",
00000358 => x"8041a783",
00000359 => x"00100513",
00000360 => x"02079863",
00000361 => x"ffff1537",
00000362 => x"e3050513",
00000363 => x"6d4000ef",
00000364 => x"00040513",
00000365 => x"ea5ff0ef",
00000366 => x"ffff1537",
00000367 => x"e3850513",
00000368 => x"6c0000ef",
00000369 => x"34102573",
00000370 => x"e91ff0ef",
00000371 => x"00500513",
00000372 => x"e49ff0ef",
00000373 => x"ff010113",
00000374 => x"00000513",
00000375 => x"00112623",
00000376 => x"00812423",
00000377 => x"734000ef",
00000378 => x"09e00513",
00000379 => x"770000ef",
00000380 => x"00000513",
00000381 => x"718000ef",
00000382 => x"00c12083",
00000383 => x"0ff47513",
00000384 => x"00812403",
00000385 => x"01010113",
00000386 => x"00008067",
00000387 => x"ff010113",
00000388 => x"00112623",
00000389 => x"00812423",
00000390 => x"00000513",
00000391 => x"6d0000ef",
00000392 => x"00500513",
00000393 => x"70c000ef",
00000394 => x"00000513",
00000395 => x"704000ef",
00000396 => x"00050413",
00000397 => x"00147413",
00000398 => x"00000513",
00000399 => x"6d0000ef",
00000400 => x"fc041ce3",
00000401 => x"00c12083",
00000402 => x"00812403",
00000403 => x"01010113",
00000404 => x"00008067",
00000405 => x"ff010113",
00000406 => x"00000513",
00000407 => x"00112623",
00000408 => x"68c000ef",
00000409 => x"00600513",
00000410 => x"6c8000ef",
00000411 => x"00c12083",
00000412 => x"00000513",
00000413 => x"01010113",
00000414 => x"6940006f",
00000415 => x"ff010113",
00000416 => x"00812423",
00000417 => x"00050413",
00000418 => x"01055513",
00000419 => x"0ff57513",
00000420 => x"00112623",
00000421 => x"69c000ef",
00000422 => x"00845513",
00000423 => x"0ff57513",
00000424 => x"690000ef",
00000425 => x"0ff47513",
00000426 => x"00812403",
00000427 => x"00c12083",
00000428 => x"01010113",
00000429 => x"67c0006f",
00000430 => x"ff010113",
00000431 => x"00812423",
00000432 => x"00050413",
00000433 => x"00000513",
00000434 => x"00112623",
00000435 => x"620000ef",
00000436 => x"00300513",
00000437 => x"65c000ef",
00000438 => x"00040513",
00000439 => x"fa1ff0ef",
00000440 => x"00000513",
00000441 => x"64c000ef",
00000442 => x"00050413",
00000381 => x"768000ef",
00000382 => x"00050413",
00000383 => x"00000513",
00000384 => x"738000ef",
00000385 => x"00c12083",
00000386 => x"0ff47513",
00000387 => x"00812403",
00000388 => x"01010113",
00000389 => x"00008067",
00000390 => x"ff010113",
00000391 => x"00112623",
00000392 => x"00812423",
00000393 => x"00000513",
00000394 => x"6f0000ef",
00000395 => x"00500513",
00000396 => x"72c000ef",
00000397 => x"00000513",
00000398 => x"724000ef",
00000399 => x"00050413",
00000400 => x"00147413",
00000401 => x"00000513",
00000402 => x"6f0000ef",
00000403 => x"fc041ce3",
00000404 => x"00c12083",
00000405 => x"00812403",
00000406 => x"01010113",
00000407 => x"00008067",
00000408 => x"ff010113",
00000409 => x"00000513",
00000410 => x"00112623",
00000411 => x"6ac000ef",
00000412 => x"00600513",
00000413 => x"6e8000ef",
00000414 => x"00c12083",
00000415 => x"00000513",
00000416 => x"01010113",
00000417 => x"6b40006f",
00000418 => x"ff010113",
00000419 => x"00812423",
00000420 => x"00050413",
00000421 => x"01055513",
00000422 => x"0ff57513",
00000423 => x"00112623",
00000424 => x"6bc000ef",
00000425 => x"00845513",
00000426 => x"0ff57513",
00000427 => x"6b0000ef",
00000428 => x"0ff47513",
00000429 => x"00812403",
00000430 => x"00c12083",
00000431 => x"01010113",
00000432 => x"69c0006f",
00000433 => x"ff010113",
00000434 => x"00812423",
00000435 => x"00050413",
00000436 => x"00000513",
00000437 => x"00112623",
00000438 => x"640000ef",
00000439 => x"00300513",
00000440 => x"67c000ef",
00000441 => x"00040513",
00000442 => x"fa1ff0ef",
00000443 => x"00000513",
00000444 => x"61c000ef",
00000445 => x"00c12083",
00000446 => x"0ff47513",
00000447 => x"00812403",
00000448 => x"01010113",
00000449 => x"00008067",
00000450 => x"fd010113",
00000451 => x"02812423",
00000452 => x"02912223",
00000453 => x"03212023",
00000454 => x"01312e23",
00000455 => x"01412c23",
00000456 => x"02112623",
00000457 => x"00050913",
00000458 => x"00058993",
00000459 => x"00c10493",
00000460 => x"00000413",
00000461 => x"00400a13",
00000462 => x"02091e63",
00000463 => x"4fc000ef",
00000464 => x"00a481a3",
00000465 => x"00140413",
00000466 => x"fff48493",
00000467 => x"ff4416e3",
00000468 => x"02c12083",
00000469 => x"02812403",
00000470 => x"00c12503",
00000471 => x"02412483",
00000472 => x"02012903",
00000473 => x"01c12983",
00000474 => x"01812a03",
00000475 => x"03010113",
00000476 => x"00008067",
00000477 => x"00898533",
00000478 => x"f41ff0ef",
00000479 => x"fc5ff06f",
00000480 => x"fe802783",
00000481 => x"fd010113",
00000482 => x"02812423",
00000483 => x"02112623",
00000484 => x"02912223",
00000485 => x"03212023",
00000486 => x"01312e23",
00000487 => x"01412c23",
00000488 => x"01512a23",
00000489 => x"01612823",
00000490 => x"01712623",
00000491 => x"0087f793",
00000492 => x"00050413",
00000493 => x"00078a63",
00000494 => x"fe802783",
00000495 => x"00400513",
00000496 => x"0047f793",
00000497 => x"04079663",
00000498 => x"02041863",
00000499 => x"ffff1537",
00000500 => x"e1450513",
00000501 => x"480000ef",
00000502 => x"008005b7",
00000503 => x"00040513",
00000504 => x"f29ff0ef",
00000505 => x"4788d7b7",
00000506 => x"afe78793",
00000507 => x"02f50463",
00000508 => x"00000513",
00000509 => x"01c0006f",
00000510 => x"ffff1537",
00000511 => x"e3450513",
00000512 => x"454000ef",
00000513 => x"dc5ff0ef",
00000514 => x"fc0518e3",
00000515 => x"00300513",
00000516 => x"c05ff0ef",
00000517 => x"008009b7",
00000518 => x"00498593",
00000519 => x"00040513",
00000520 => x"ee9ff0ef",
00000521 => x"00050a13",
00000522 => x"00898593",
00000523 => x"00040513",
00000524 => x"ed9ff0ef",
00000525 => x"ff002b83",
00000526 => x"00050a93",
00000527 => x"ffca7b13",
00000528 => x"00000913",
00000529 => x"00000493",
00000530 => x"00c98993",
00000531 => x"013905b3",
00000532 => x"052b1863",
00000533 => x"015484b3",
00000534 => x"00200513",
00000535 => x"fa049ae3",
00000536 => x"ffff1537",
00000537 => x"e4050513",
00000538 => x"3ec000ef",
00000539 => x"02c12083",
00000540 => x"02812403",
00000541 => x"800007b7",
00000542 => x"0147a023",
00000543 => x"02412483",
00000544 => x"02012903",
00000545 => x"01c12983",
00000546 => x"01812a03",
00000547 => x"01412a83",
00000548 => x"01012b03",
00000549 => x"00c12b83",
00000550 => x"03010113",
00000551 => x"00008067",
00000552 => x"00040513",
00000553 => x"e65ff0ef",
00000554 => x"012b87b3",
00000555 => x"00a484b3",
00000556 => x"00a7a023",
00000557 => x"00490913",
00000558 => x"f95ff06f",
00000559 => x"ff010113",
00000560 => x"00112623",
00000561 => x"ebdff0ef",
00000562 => x"ffff1537",
00000563 => x"e4450513",
00000564 => x"384000ef",
00000565 => x"af5ff0ef",
00000566 => x"0000006f",
00000567 => x"ff010113",
00000568 => x"00112623",
00000569 => x"00812423",
00000570 => x"00912223",
00000571 => x"00058413",
00000572 => x"00050493",
00000573 => x"d61ff0ef",
00000574 => x"00000513",
00000575 => x"3f0000ef",
00000576 => x"00200513",
00000577 => x"42c000ef",
00000578 => x"00048513",
00000579 => x"d71ff0ef",
00000580 => x"00040513",
00000581 => x"41c000ef",
00000582 => x"00000513",
00000583 => x"3f0000ef",
00000584 => x"00812403",
00000585 => x"00c12083",
00000586 => x"00412483",
00000587 => x"01010113",
00000588 => x"cddff06f",
00000589 => x"fe010113",
00000590 => x"00812c23",
00000591 => x"00912a23",
00000592 => x"01212823",
00000593 => x"00112e23",
00000594 => x"00b12623",
00000595 => x"00300413",
00000596 => x"00350493",
00000597 => x"fff00913",
00000598 => x"00c10793",
00000599 => x"008787b3",
00000600 => x"0007c583",
00000601 => x"40848533",
00000602 => x"fff40413",
00000603 => x"f71ff0ef",
00000604 => x"ff2414e3",
00000605 => x"01c12083",
00000606 => x"01812403",
00000607 => x"01412483",
00000608 => x"01012903",
00000609 => x"02010113",
00000610 => x"00008067",
00000611 => x"ff010113",
00000612 => x"00112623",
00000613 => x"00812423",
00000614 => x"00050413",
00000615 => x"cb9ff0ef",
00000616 => x"00000513",
00000617 => x"348000ef",
00000618 => x"0d800513",
00000619 => x"384000ef",
00000620 => x"00040513",
00000621 => x"cc9ff0ef",
00000622 => x"00000513",
00000623 => x"350000ef",
00000624 => x"00812403",
00000625 => x"00c12083",
00000626 => x"01010113",
00000627 => x"c41ff06f",
00000628 => x"fe010113",
00000629 => x"800007b7",
00000630 => x"00812c23",
00000631 => x"0007a403",
00000632 => x"00112e23",
00000633 => x"00912a23",
00000634 => x"01212823",
00000635 => x"01312623",
00000636 => x"01412423",
00000637 => x"01512223",
00000638 => x"02041863",
00000639 => x"ffff1537",
00000640 => x"dcc50513",
00000641 => x"01812403",
00000642 => x"01c12083",
00000643 => x"01412483",
00000644 => x"01012903",
00000645 => x"00c12983",
00000646 => x"00812a03",
00000647 => x"00412a83",
00000648 => x"02010113",
00000649 => x"2300006f",
00000650 => x"ffff1537",
00000651 => x"e4850513",
00000652 => x"224000ef",
00000653 => x"00040513",
00000654 => x"a1dff0ef",
00000655 => x"ffff1537",
00000656 => x"e5450513",
00000657 => x"210000ef",
00000658 => x"00800537",
00000659 => x"a09ff0ef",
00000444 => x"66c000ef",
00000445 => x"00050413",
00000446 => x"00000513",
00000447 => x"63c000ef",
00000448 => x"00c12083",
00000449 => x"0ff47513",
00000450 => x"00812403",
00000451 => x"01010113",
00000452 => x"00008067",
00000453 => x"fd010113",
00000454 => x"02812423",
00000455 => x"02912223",
00000456 => x"03212023",
00000457 => x"01312e23",
00000458 => x"01412c23",
00000459 => x"02112623",
00000460 => x"00050913",
00000461 => x"00058993",
00000462 => x"00c10493",
00000463 => x"00000413",
00000464 => x"00400a13",
00000465 => x"02091e63",
00000466 => x"51c000ef",
00000467 => x"00a481a3",
00000468 => x"00140413",
00000469 => x"fff48493",
00000470 => x"ff4416e3",
00000471 => x"02c12083",
00000472 => x"02812403",
00000473 => x"00c12503",
00000474 => x"02412483",
00000475 => x"02012903",
00000476 => x"01c12983",
00000477 => x"01812a03",
00000478 => x"03010113",
00000479 => x"00008067",
00000480 => x"00898533",
00000481 => x"f41ff0ef",
00000482 => x"fc5ff06f",
00000483 => x"fd010113",
00000484 => x"01412c23",
00000485 => x"80418793",
00000486 => x"02812423",
00000487 => x"02112623",
00000488 => x"02912223",
00000489 => x"03212023",
00000490 => x"01312e23",
00000491 => x"01512a23",
00000492 => x"01612823",
00000493 => x"01712623",
00000494 => x"01812423",
00000495 => x"00100713",
00000496 => x"00e7a023",
00000497 => x"fe802783",
00000498 => x"00050413",
00000499 => x"80418a13",
00000500 => x"0087f793",
00000501 => x"00078a63",
00000502 => x"fe802783",
00000503 => x"00400513",
00000504 => x"0047f793",
00000505 => x"04079663",
00000506 => x"02041863",
00000507 => x"ffff1537",
00000508 => x"e4050513",
00000509 => x"48c000ef",
00000510 => x"008005b7",
00000511 => x"00040513",
00000512 => x"f15ff0ef",
00000513 => x"4788d7b7",
00000514 => x"afe78793",
00000515 => x"02f50463",
00000516 => x"00000513",
00000517 => x"01c0006f",
00000518 => x"ffff1537",
00000519 => x"e6050513",
00000520 => x"460000ef",
00000521 => x"db1ff0ef",
00000522 => x"fc0518e3",
00000523 => x"00300513",
00000524 => x"be9ff0ef",
00000525 => x"008009b7",
00000526 => x"00498593",
00000527 => x"00040513",
00000528 => x"ed5ff0ef",
00000529 => x"00050a93",
00000530 => x"00898593",
00000531 => x"00040513",
00000532 => x"ec5ff0ef",
00000533 => x"ff002c03",
00000534 => x"00050b13",
00000535 => x"ffcafb93",
00000536 => x"00000913",
00000537 => x"00000493",
00000538 => x"00c98993",
00000539 => x"013905b3",
00000540 => x"052b9c63",
00000541 => x"016484b3",
00000542 => x"00200513",
00000543 => x"fa049ae3",
00000544 => x"ffff1537",
00000545 => x"e6c50513",
00000546 => x"3f8000ef",
00000547 => x"02c12083",
00000548 => x"02812403",
00000549 => x"800007b7",
00000550 => x"0157a023",
00000551 => x"000a2023",
00000552 => x"02412483",
00000553 => x"02012903",
00000554 => x"01c12983",
00000555 => x"01812a03",
00000556 => x"01412a83",
00000557 => x"01012b03",
00000558 => x"00c12b83",
00000559 => x"00812c03",
00000560 => x"03010113",
00000561 => x"00008067",
00000562 => x"00040513",
00000563 => x"e49ff0ef",
00000564 => x"012c07b3",
00000565 => x"00a484b3",
00000566 => x"00a7a023",
00000567 => x"00490913",
00000568 => x"f8dff06f",
00000569 => x"ff010113",
00000570 => x"00112623",
00000571 => x"ea1ff0ef",
00000572 => x"ffff1537",
00000573 => x"e7050513",
00000574 => x"388000ef",
00000575 => x"ad1ff0ef",
00000576 => x"0000006f",
00000577 => x"ff010113",
00000578 => x"00112623",
00000579 => x"00812423",
00000580 => x"00912223",
00000581 => x"00058413",
00000582 => x"00050493",
00000583 => x"d45ff0ef",
00000584 => x"00000513",
00000585 => x"3f4000ef",
00000586 => x"00200513",
00000587 => x"430000ef",
00000588 => x"00048513",
00000589 => x"d55ff0ef",
00000590 => x"00040513",
00000591 => x"420000ef",
00000592 => x"00000513",
00000593 => x"3f4000ef",
00000594 => x"00812403",
00000595 => x"00c12083",
00000596 => x"00412483",
00000597 => x"01010113",
00000598 => x"cc1ff06f",
00000599 => x"fe010113",
00000600 => x"00812c23",
00000601 => x"00912a23",
00000602 => x"01212823",
00000603 => x"00112e23",
00000604 => x"00b12623",
00000605 => x"00300413",
00000606 => x"00350493",
00000607 => x"fff00913",
00000608 => x"00c10793",
00000609 => x"008787b3",
00000610 => x"0007c583",
00000611 => x"40848533",
00000612 => x"fff40413",
00000613 => x"f71ff0ef",
00000614 => x"ff2414e3",
00000615 => x"01c12083",
00000616 => x"01812403",
00000617 => x"01412483",
00000618 => x"01012903",
00000619 => x"02010113",
00000620 => x"00008067",
00000621 => x"ff010113",
00000622 => x"00112623",
00000623 => x"00812423",
00000624 => x"00050413",
00000625 => x"c9dff0ef",
00000626 => x"00000513",
00000627 => x"34c000ef",
00000628 => x"0d800513",
00000629 => x"388000ef",
00000630 => x"00040513",
00000631 => x"cadff0ef",
00000632 => x"00000513",
00000633 => x"354000ef",
00000634 => x"00812403",
00000635 => x"00c12083",
00000636 => x"01010113",
00000637 => x"c25ff06f",
00000638 => x"fe010113",
00000639 => x"800007b7",
00000640 => x"00812c23",
00000641 => x"0007a403",
00000642 => x"00112e23",
00000643 => x"00912a23",
00000644 => x"01212823",
00000645 => x"01312623",
00000646 => x"01412423",
00000647 => x"01512223",
00000648 => x"02041863",
00000649 => x"ffff1537",
00000650 => x"df850513",
00000651 => x"01812403",
00000652 => x"01c12083",
00000653 => x"01412483",
00000654 => x"01012903",
00000655 => x"00c12983",
00000656 => x"00812a03",
00000657 => x"00412a83",
00000658 => x"02010113",
00000659 => x"2340006f",
00000660 => x"ffff1537",
00000661 => x"e7050513",
00000662 => x"1fc000ef",
00000663 => x"1dc000ef",
00000664 => x"00050493",
00000665 => x"1c4000ef",
00000666 => x"07900793",
00000667 => x"0af49e63",
00000668 => x"b59ff0ef",
00000669 => x"00051663",
00000670 => x"00300513",
00000671 => x"999ff0ef",
00000672 => x"ffff1537",
00000673 => x"e7c50513",
00000674 => x"01045493",
00000661 => x"e7450513",
00000662 => x"228000ef",
00000663 => x"00040513",
00000664 => x"9f9ff0ef",
00000665 => x"ffff1537",
00000666 => x"e8050513",
00000667 => x"214000ef",
00000668 => x"00800537",
00000669 => x"9e5ff0ef",
00000670 => x"ffff1537",
00000671 => x"e9c50513",
00000672 => x"200000ef",
00000673 => x"1e0000ef",
00000674 => x"00050493",
00000675 => x"1c8000ef",
00000676 => x"00148493",
00000677 => x"00800937",
00000678 => x"fff00993",
00000679 => x"00010a37",
00000680 => x"fff48493",
00000681 => x"07349063",
00000682 => x"4788d5b7",
00000683 => x"afe58593",
00000684 => x"00800537",
00000685 => x"e81ff0ef",
00000686 => x"00800537",
00000687 => x"00040593",
00000688 => x"00450513",
00000689 => x"e71ff0ef",
00000690 => x"ff002a03",
00000691 => x"008009b7",
00000692 => x"ffc47413",
00000693 => x"00000493",
00000694 => x"00000913",
00000695 => x"00c98a93",
00000696 => x"01548533",
00000697 => x"009a07b3",
00000698 => x"02849663",
00000699 => x"00898513",
00000700 => x"412005b3",
00000701 => x"e41ff0ef",
00000702 => x"ffff1537",
00000703 => x"e4050513",
00000704 => x"f05ff06f",
00000705 => x"00090513",
00000706 => x"e85ff0ef",
00000707 => x"01490933",
00000708 => x"f91ff06f",
00000709 => x"0007a583",
00000710 => x"00448493",
00000711 => x"00b90933",
00000712 => x"e15ff0ef",
00000713 => x"fbdff06f",
00000714 => x"01c12083",
00000715 => x"01812403",
00000716 => x"01412483",
00000717 => x"01012903",
00000718 => x"00c12983",
00000719 => x"00812a03",
00000720 => x"00412a83",
00000721 => x"02010113",
00000722 => x"00008067",
00000723 => x"ff010113",
00000724 => x"f9402783",
00000725 => x"f9002703",
00000726 => x"f9402683",
00000727 => x"fed79ae3",
00000728 => x"00e12023",
00000729 => x"00f12223",
00000730 => x"00012503",
00000731 => x"00412583",
00000732 => x"01010113",
00000733 => x"00008067",
00000734 => x"f9800693",
00000735 => x"fff00613",
00000736 => x"00c6a023",
00000737 => x"00a6a023",
00000738 => x"00b6a223",
00000739 => x"00008067",
00000740 => x"fa002023",
00000741 => x"fe002803",
00000742 => x"00151513",
00000743 => x"00000713",
00000744 => x"04a87863",
00000745 => x"00001537",
00000746 => x"00000793",
00000747 => x"ffe50513",
00000748 => x"04e56a63",
00000749 => x"0016f693",
00000750 => x"00167613",
00000751 => x"01879793",
00000752 => x"01e69693",
00000753 => x"0035f593",
00000754 => x"00d7e7b3",
00000755 => x"01d61613",
00000756 => x"00c7e7b3",
00000757 => x"01659593",
00000758 => x"00b7e7b3",
00000759 => x"00e7e7b3",
00000760 => x"10000737",
00000761 => x"00e7e7b3",
00000762 => x"faf02023",
00000763 => x"00008067",
00000764 => x"00170793",
00000765 => x"01079713",
00000766 => x"40a80833",
00000767 => x"01075713",
00000768 => x"fa1ff06f",
00000769 => x"ffe78813",
00000770 => x"0fd87813",
00000771 => x"00081a63",
00000772 => x"00375713",
00000773 => x"00178793",
00000774 => x"0ff7f793",
00000775 => x"f95ff06f",
00000776 => x"00175713",
00000777 => x"ff1ff06f",
00000778 => x"fa002783",
00000779 => x"fe07cee3",
00000780 => x"faa02223",
00000781 => x"00008067",
00000782 => x"fa402503",
00000783 => x"fe055ee3",
00000784 => x"0ff57513",
00000785 => x"00008067",
00000786 => x"fa402503",
00000787 => x"0ff57513",
00000788 => x"00008067",
00000789 => x"ff010113",
00000790 => x"00812423",
00000791 => x"01212023",
00000792 => x"00112623",
00000793 => x"00912223",
00000794 => x"00050413",
00000795 => x"00a00913",
00000796 => x"00044483",
00000797 => x"00140413",
00000798 => x"00049e63",
00000799 => x"00c12083",
00000800 => x"00812403",
00000801 => x"00412483",
00000802 => x"00012903",
00000803 => x"01010113",
00000804 => x"00008067",
00000805 => x"01249663",
00000806 => x"00d00513",
00000807 => x"f8dff0ef",
00000808 => x"00048513",
00000809 => x"f85ff0ef",
00000810 => x"fc9ff06f",
00000811 => x"00757513",
00000812 => x"0016f793",
00000813 => x"00367613",
00000814 => x"00a51513",
00000815 => x"00f79793",
00000816 => x"0015f593",
00000817 => x"00f567b3",
00000818 => x"00d61613",
00000819 => x"00c7e7b3",
00000820 => x"00959593",
00000821 => x"fa800713",
00000822 => x"00b7e7b3",
00000823 => x"00072023",
00000824 => x"1007e793",
00000825 => x"00f72023",
00000826 => x"00008067",
00000827 => x"fa800713",
00000828 => x"00072683",
00000829 => x"00757793",
00000830 => x"00100513",
00000831 => x"00f51533",
00000832 => x"00d56533",
00000833 => x"00a72023",
00000834 => x"00008067",
00000835 => x"fa800713",
00000836 => x"00072683",
00000837 => x"00757513",
00000838 => x"00100793",
00000839 => x"00a797b3",
00000840 => x"fff7c793",
00000841 => x"00d7f7b3",
00000842 => x"00f72023",
00000843 => x"00008067",
00000844 => x"faa02623",
00000845 => x"fa802783",
00000846 => x"fe07cee3",
00000847 => x"fac02503",
00000848 => x"00008067",
00000849 => x"f8400713",
00000850 => x"00072683",
00000851 => x"00100793",
00000852 => x"00a797b3",
00000853 => x"00d7c7b3",
00000854 => x"00f72023",
00000855 => x"00008067",
00000856 => x"f8a02223",
00000857 => x"00008067",
00000858 => x"69617641",
00000859 => x"6c62616c",
00000860 => x"4d432065",
00000861 => x"0a3a7344",
00000862 => x"203a6820",
00000863 => x"706c6548",
00000864 => x"3a72200a",
00000865 => x"73655220",
00000866 => x"74726174",
00000867 => x"3a75200a",
00000868 => x"6c705520",
00000869 => x"0a64616f",
00000870 => x"203a7320",
00000871 => x"726f7453",
00000872 => x"6f742065",
00000873 => x"616c6620",
00000874 => x"200a6873",
00000875 => x"4c203a6c",
00000876 => x"2064616f",
00000877 => x"6d6f7266",
00000878 => x"616c6620",
00000879 => x"200a6873",
00000880 => x"45203a65",
00000881 => x"75636578",
00000882 => x"00006574",
00000883 => x"65206f4e",
00000884 => x"75636578",
00000885 => x"6c626174",
00000886 => x"76612065",
00000887 => x"616c6961",
00000888 => x"2e656c62",
00000889 => x"00000000",
00000890 => x"746f6f42",
00000891 => x"2e676e69",
00000892 => x"0a0a2e2e",
00000893 => x"00000000",
00000894 => x"52450a07",
00000895 => x"5f524f52",
00000896 => x"00000000",
00000897 => x"58450a0a",
00000898 => x"00282043",
00000899 => x"20402029",
00000900 => x"00007830",
00000901 => x"69617741",
00000902 => x"676e6974",
00000903 => x"6f656e20",
00000904 => x"32337672",
00000905 => x"6578655f",
00000906 => x"6e69622e",
00000907 => x"202e2e2e",
00000908 => x"00000000",
00000909 => x"64616f4c",
00000910 => x"2e676e69",
00000911 => x"00202e2e",
00000912 => x"00004b4f",
00000913 => x"0000000a",
00000914 => x"74697257",
00000915 => x"78302065",
00000916 => x"00000000",
00000917 => x"74796220",
00000918 => x"74207365",
00000919 => x"5053206f",
00000920 => x"6c662049",
00000921 => x"20687361",
00000922 => x"78302040",
00000923 => x"00000000",
00000924 => x"7928203f",
00000925 => x"20296e2f",
00000926 => x"00000000",
00000927 => x"616c460a",
00000928 => x"6e696873",
00000929 => x"2e2e2e67",
00000930 => x"00000020",
00000931 => x"0a0a0a0a",
00000932 => x"4e203c3c",
00000933 => x"56524f45",
00000934 => x"42203233",
00000935 => x"6c746f6f",
00000936 => x"6564616f",
00000937 => x"3e3e2072",
00000938 => x"4c420a0a",
00000939 => x"203a5644",
00000940 => x"206e614a",
00000941 => x"32203131",
00000942 => x"0a313230",
00000943 => x"3a565748",
00000944 => x"00002020",
00000945 => x"4b4c430a",
00000946 => x"0020203a",
00000947 => x"0a7a4820",
00000948 => x"52455355",
00000949 => x"0000203a",
00000950 => x"53494d0a",
00000951 => x"00203a41",
00000952 => x"4f52500a",
00000953 => x"00203a43",
00000954 => x"454d490a",
00000955 => x"00203a4d",
00000956 => x"74796220",
00000957 => x"40207365",
00000958 => x"00000020",
00000959 => x"454d440a",
00000960 => x"00203a4d",
00000961 => x"75410a0a",
00000962 => x"6f626f74",
00000963 => x"6920746f",
00000964 => x"7338206e",
00000965 => x"7250202e",
00000966 => x"20737365",
00000967 => x"2079656b",
00000968 => x"61206f74",
00000969 => x"74726f62",
00000970 => x"00000a2e",
00000971 => x"726f6241",
00000972 => x"2e646574",
00000973 => x"00000a0a",
00000974 => x"444d430a",
00000975 => x"00203e3a",
00000976 => x"53207962",
00000977 => x"68706574",
00000978 => x"4e206e61",
00000979 => x"69746c6f",
00000980 => x"0000676e",
00000981 => x"61766e49",
00000982 => x"2064696c",
00000983 => x"00444d43",
00000984 => x"33323130",
00000985 => x"37363534",
00000986 => x"42413938",
00000987 => x"46454443",
00000676 => x"07900793",
00000677 => x"0af49e63",
00000678 => x"b3dff0ef",
00000679 => x"00051663",
00000680 => x"00300513",
00000681 => x"975ff0ef",
00000682 => x"ffff1537",
00000683 => x"ea850513",
00000684 => x"01045493",
00000685 => x"1cc000ef",
00000686 => x"00148493",
00000687 => x"00800937",
00000688 => x"fff00993",
00000689 => x"00010a37",
00000690 => x"fff48493",
00000691 => x"07349063",
00000692 => x"4788d5b7",
00000693 => x"afe58593",
00000694 => x"00800537",
00000695 => x"e81ff0ef",
00000696 => x"00800537",
00000697 => x"00040593",
00000698 => x"00450513",
00000699 => x"e71ff0ef",
00000700 => x"ff002a03",
00000701 => x"008009b7",
00000702 => x"ffc47413",
00000703 => x"00000493",
00000704 => x"00000913",
00000705 => x"00c98a93",
00000706 => x"01548533",
00000707 => x"009a07b3",
00000708 => x"02849663",
00000709 => x"00898513",
00000710 => x"412005b3",
00000711 => x"e41ff0ef",
00000712 => x"ffff1537",
00000713 => x"e6c50513",
00000714 => x"f05ff06f",
00000715 => x"00090513",
00000716 => x"e85ff0ef",
00000717 => x"01490933",
00000718 => x"f91ff06f",
00000719 => x"0007a583",
00000720 => x"00448493",
00000721 => x"00b90933",
00000722 => x"e15ff0ef",
00000723 => x"fbdff06f",
00000724 => x"01c12083",
00000725 => x"01812403",
00000726 => x"01412483",
00000727 => x"01012903",
00000728 => x"00c12983",
00000729 => x"00812a03",
00000730 => x"00412a83",
00000731 => x"02010113",
00000732 => x"00008067",
00000733 => x"ff010113",
00000734 => x"f9402783",
00000735 => x"f9002703",
00000736 => x"f9402683",
00000737 => x"fed79ae3",
00000738 => x"00e12023",
00000739 => x"00f12223",
00000740 => x"00012503",
00000741 => x"00412583",
00000742 => x"01010113",
00000743 => x"00008067",
00000744 => x"f9800693",
00000745 => x"fff00613",
00000746 => x"00c6a023",
00000747 => x"00a6a023",
00000748 => x"00b6a223",
00000749 => x"00008067",
00000750 => x"fa002023",
00000751 => x"fe002703",
00000752 => x"00151513",
00000753 => x"00000793",
00000754 => x"04a77a63",
00000755 => x"00001537",
00000756 => x"00000713",
00000757 => x"ffe50513",
00000758 => x"04f56c63",
00000759 => x"0016f693",
00000760 => x"00167613",
00000761 => x"fff78793",
00000762 => x"01e69693",
00000763 => x"0035f593",
00000764 => x"00d7e7b3",
00000765 => x"01d61613",
00000766 => x"00c7e7b3",
00000767 => x"01659593",
00000768 => x"01871713",
00000769 => x"00b7e7b3",
00000770 => x"00e7e7b3",
00000771 => x"10000737",
00000772 => x"00e7e7b3",
00000773 => x"faf02023",
00000774 => x"00008067",
00000775 => x"00178793",
00000776 => x"01079793",
00000777 => x"40a70733",
00000778 => x"0107d793",
00000779 => x"f9dff06f",
00000780 => x"ffe70813",
00000781 => x"0fd87813",
00000782 => x"00081a63",
00000783 => x"0037d793",
00000784 => x"00170713",
00000785 => x"0ff77713",
00000786 => x"f91ff06f",
00000787 => x"0017d793",
00000788 => x"ff1ff06f",
00000789 => x"fa002783",
00000790 => x"fe07cee3",
00000791 => x"faa02223",
00000792 => x"00008067",
00000793 => x"fa402503",
00000794 => x"fe055ee3",
00000795 => x"0ff57513",
00000796 => x"00008067",
00000797 => x"fa402503",
00000798 => x"0ff57513",
00000799 => x"00008067",
00000800 => x"ff010113",
00000801 => x"00812423",
00000802 => x"01212023",
00000803 => x"00112623",
00000804 => x"00912223",
00000805 => x"00050413",
00000806 => x"00a00913",
00000807 => x"00044483",
00000808 => x"00140413",
00000809 => x"00049e63",
00000810 => x"00c12083",
00000811 => x"00812403",
00000812 => x"00412483",
00000813 => x"00012903",
00000814 => x"01010113",
00000815 => x"00008067",
00000816 => x"01249663",
00000817 => x"00d00513",
00000818 => x"f8dff0ef",
00000819 => x"00048513",
00000820 => x"f85ff0ef",
00000821 => x"fc9ff06f",
00000822 => x"00757513",
00000823 => x"0016f793",
00000824 => x"00367613",
00000825 => x"00a51513",
00000826 => x"00f79793",
00000827 => x"0015f593",
00000828 => x"00f567b3",
00000829 => x"00d61613",
00000830 => x"00c7e7b3",
00000831 => x"00959593",
00000832 => x"fa800713",
00000833 => x"00b7e7b3",
00000834 => x"00072023",
00000835 => x"1007e793",
00000836 => x"00f72023",
00000837 => x"00008067",
00000838 => x"fa800713",
00000839 => x"00072683",
00000840 => x"00757793",
00000841 => x"00100513",
00000842 => x"00f51533",
00000843 => x"00d56533",
00000844 => x"00a72023",
00000845 => x"00008067",
00000846 => x"fa800713",
00000847 => x"00072683",
00000848 => x"00757513",
00000849 => x"00100793",
00000850 => x"00a797b3",
00000851 => x"fff7c793",
00000852 => x"00d7f7b3",
00000853 => x"00f72023",
00000854 => x"00008067",
00000855 => x"faa02623",
00000856 => x"fa802783",
00000857 => x"fe07cee3",
00000858 => x"fac02503",
00000859 => x"00008067",
00000860 => x"f8400713",
00000861 => x"00072683",
00000862 => x"00100793",
00000863 => x"00a797b3",
00000864 => x"00d7c7b3",
00000865 => x"00f72023",
00000866 => x"00008067",
00000867 => x"f8a02223",
00000868 => x"00008067",
00000869 => x"69617641",
00000870 => x"6c62616c",
00000871 => x"4d432065",
00000872 => x"0a3a7344",
00000873 => x"203a6820",
00000874 => x"706c6548",
00000875 => x"3a72200a",
00000876 => x"73655220",
00000877 => x"74726174",
00000878 => x"3a75200a",
00000879 => x"6c705520",
00000880 => x"0a64616f",
00000881 => x"203a7320",
00000882 => x"726f7453",
00000883 => x"6f742065",
00000884 => x"616c6620",
00000885 => x"200a6873",
00000886 => x"4c203a6c",
00000887 => x"2064616f",
00000888 => x"6d6f7266",
00000889 => x"616c6620",
00000890 => x"200a6873",
00000891 => x"45203a65",
00000892 => x"75636578",
00000893 => x"00006574",
00000894 => x"65206f4e",
00000895 => x"75636578",
00000896 => x"6c626174",
00000897 => x"76612065",
00000898 => x"616c6961",
00000899 => x"2e656c62",
00000900 => x"00000000",
00000901 => x"746f6f42",
00000902 => x"2e676e69",
00000903 => x"0a0a2e2e",
00000904 => x"00000000",
00000905 => x"52450a07",
00000906 => x"5f524f52",
00000907 => x"00000000",
00000908 => x"58450a0a",
00000909 => x"00282043",
00000910 => x"20402029",
00000911 => x"00007830",
00000912 => x"69617741",
00000913 => x"676e6974",
00000914 => x"6f656e20",
00000915 => x"32337672",
00000916 => x"6578655f",
00000917 => x"6e69622e",
00000918 => x"202e2e2e",
00000919 => x"00000000",
00000920 => x"64616f4c",
00000921 => x"2e676e69",
00000922 => x"00202e2e",
00000923 => x"00004b4f",
00000924 => x"0000000a",
00000925 => x"74697257",
00000926 => x"78302065",
00000927 => x"00000000",
00000928 => x"74796220",
00000929 => x"74207365",
00000930 => x"5053206f",
00000931 => x"6c662049",
00000932 => x"20687361",
00000933 => x"78302040",
00000934 => x"00000000",
00000935 => x"7928203f",
00000936 => x"20296e2f",
00000937 => x"00000000",
00000938 => x"616c460a",
00000939 => x"6e696873",
00000940 => x"2e2e2e67",
00000941 => x"00000020",
00000942 => x"0a0a0a0a",
00000943 => x"4e203c3c",
00000944 => x"56524f45",
00000945 => x"42203233",
00000946 => x"6c746f6f",
00000947 => x"6564616f",
00000948 => x"3e3e2072",
00000949 => x"4c420a0a",
00000950 => x"203a5644",
00000951 => x"206e614a",
00000952 => x"32203932",
00000953 => x"0a313230",
00000954 => x"3a565748",
00000955 => x"00002020",
00000956 => x"4b4c430a",
00000957 => x"0020203a",
00000958 => x"0a7a4820",
00000959 => x"52455355",
00000960 => x"0000203a",
00000961 => x"53494d0a",
00000962 => x"00203a41",
00000963 => x"4f52500a",
00000964 => x"00203a43",
00000965 => x"454d490a",
00000966 => x"00203a4d",
00000967 => x"74796220",
00000968 => x"40207365",
00000969 => x"00000020",
00000970 => x"454d440a",
00000971 => x"00203a4d",
00000972 => x"75410a0a",
00000973 => x"6f626f74",
00000974 => x"6920746f",
00000975 => x"7338206e",
00000976 => x"7250202e",
00000977 => x"20737365",
00000978 => x"2079656b",
00000979 => x"61206f74",
00000980 => x"74726f62",
00000981 => x"00000a2e",
00000982 => x"726f6241",
00000983 => x"2e646574",
00000984 => x"00000a0a",
00000985 => x"444d430a",
00000986 => x"00203e3a",
00000987 => x"53207962",
00000988 => x"68706574",
00000989 => x"4e206e61",
00000990 => x"69746c6f",
00000991 => x"0000676e",
00000992 => x"61766e49",
00000993 => x"2064696c",
00000994 => x"00444d43",
00000995 => x"33323130",
00000996 => x"37363534",
00000997 => x"42413938",
00000998 => x"46454443",
others => x"00000000"
);
 
/rtl/core/neorv32_cfs.vhd
0,0 → 1,253
-- #################################################################################################
-- # << NEORV32 - Custom Functions Subsystem (CFS) >> #
-- # ********************************************************************************************* #
-- # For tightly-coupled custom co-processors. Provides 32x32-bit memory-mapped registers. #
-- # This is just an "example/illustrating template". Modify this file to implement your custom #
-- # design logic. #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
-- # #
-- # Redistribution and use in source and binary forms, with or without modification, are #
-- # permitted provided that the following conditions are met: #
-- # #
-- # 1. Redistributions of source code must retain the above copyright notice, this list of #
-- # conditions and the following disclaimer. #
-- # #
-- # 2. Redistributions in binary form must reproduce the above copyright notice, this list of #
-- # conditions and the following disclaimer in the documentation and/or other materials #
-- # provided with the distribution. #
-- # #
-- # 3. Neither the name of the copyright holder nor the names of its contributors may be used to #
-- # endorse or promote products derived from this software without specific prior written #
-- # permission. #
-- # #
-- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS #
-- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF #
-- # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE #
-- # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
-- # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE #
-- # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED #
-- # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING #
-- # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED #
-- # OF THE POSSIBILITY OF SUCH DAMAGE. #
-- # ********************************************************************************************* #
-- # The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting #
-- #################################################################################################
 
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
 
library neorv32;
use neorv32.neorv32_package.all;
 
entity neorv32_cfs is
generic (
CFS_CONFIG : std_ulogic_vector(31 downto 0) := (others => '0') -- custom CFS configuration conduit generic
);
port (
-- host access --
clk_i : in std_ulogic; -- global clock line
rstn_i : in std_ulogic; -- global reset line, low-active, use as async
addr_i : in std_ulogic_vector(31 downto 0); -- address
rden_i : in std_ulogic; -- read enable
wren_i : in std_ulogic; -- word write enable
data_i : in std_ulogic_vector(31 downto 0); -- data in
data_o : out std_ulogic_vector(31 downto 0); -- data out
ack_o : out std_ulogic; -- transfer acknowledge
err_o : out std_ulogic; -- transfer error
-- clock generator --
clkgen_en_o : out std_ulogic; -- enable clock generator
clkgen_i : in std_ulogic_vector(07 downto 0); -- "clock" inputs
-- CPU state --
sleep_i : in std_ulogic; -- set if cpu is in sleep mode
-- interrupt --
irq_o : out std_ulogic; -- interrupt request
irq_ack_i : in std_ulogic; -- interrupt acknowledge
-- custom io (conduits) --
cfs_in_i : in std_ulogic_vector(31 downto 0); -- custom inputs
cfs_out_o : out std_ulogic_vector(31 downto 0) -- custom outputs
);
end neorv32_cfs;
 
architecture neorv32_cfs_rtl of neorv32_cfs is
 
-- IO space: module base address (DO NOT MODIFY!) --
constant hi_abb_c : natural := index_size_f(io_size_c)-1; -- high address boundary bit
constant lo_abb_c : natural := index_size_f(cfs_size_c); -- low address boundary bit
 
-- access control --
signal acc_en : std_ulogic; -- module access enable
signal addr : std_ulogic_vector(31 downto 0); -- access address
signal wren : std_ulogic; -- word write enable
signal rden : std_ulogic; -- read enable
 
-- default CFS interface registers --
type cfs_regs_t is array (0 to 3) of std_ulogic_vector(31 downto 0); -- just implement 4 registers for this example
signal cfs_reg_wr : cfs_regs_t; -- interface registers for WRITE accesses
signal cfs_reg_rd : cfs_regs_t; -- interface registers for READ accesses
 
begin
 
-- Access Control -------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- These assignments are required to check if the CFS is accessed at all.
-- DO NOT MODIFY this unless you really know what you are doing.
acc_en <= '1' when (addr_i(hi_abb_c downto lo_abb_c) = cfs_base_c(hi_abb_c downto lo_abb_c)) else '0';
addr <= cfs_base_c(31 downto lo_abb_c) & addr_i(lo_abb_c-1 downto 2) & "00"; -- word aligned
wren <= acc_en and wren_i; -- full 32-bit word write enable
rden <= acc_en and rden_i; -- the read access is always a full 32-bit word wide; if required, the byte/half-word select/masking is done in the CPU
 
 
-- CFS Generic ----------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- In its default version, the CFS provides a single generic: CFS_CONFIG. This generic can be set using the processor top's IO_CFS_CONFIG generic.
-- It is intended as a "conduit" to propagate custom implementation option from the top down to this entiy.
 
 
-- CFS IOs --------------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- By default, the CFS provides two IO signals (cfs_in_i and cfs_out_o) that are available at the processor top entity.
-- These are intended as "conduits" to propagate custom signals this entity <=> processor top entity.
 
cfs_out_o <= (others => '0'); -- not used for this minimal example
 
 
-- Reset System ---------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- The CFS can be reset using the global rstn_i signal. This signal should be used as asynchronous reset and is active-low.
-- Note that rstn_i can be asserted by an external reset and also by a watchdog-cause reset.
--
-- Most default peripheral devices of the NEORV32 do NOT use a dedicated reset at all. Instead, these units are reset by writing ZERO
-- to a specific "control register" located right at the beginning of the devices's address space (so this register is cleared at first).
-- The crt0 start-up code write ZERO to every single address in the processor's IO space - including the CFS.
-- Make sure that this clearing does not cause any unintended actions in the CFS.
 
 
-- Clock System ---------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- The processor top unit implements a clock generator providing 8 "derived clocks"
-- Actually, these signals should not be used as direct clock signals, but as *clock enable* signals.
-- clkgen_i is always synchronous to the main system clock (clk_i).
--
-- The following clock divider rates are available:
-- clkgen_i(clk_div2_c) -> MAIN_CLK/2
-- clkgen_i(clk_div4_c) -> MAIN_CLK/4
-- clkgen_i(clk_div8_c) -> MAIN_CLK/8
-- clkgen_i(clk_div64_c) -> MAIN_CLK/64
-- clkgen_i(clk_div128_c) -> MAIN_CLK/128
-- clkgen_i(clk_div1024_c) -> MAIN_CLK/1024
-- clkgen_i(clk_div2048_c) -> MAIN_CLK/2048
-- clkgen_i(clk_div4096_c) -> MAIN_CLK/4096
--
-- For instance, if you want to drive a clock process at MAIN_CLK/8 clock speed you can use the following construct:
--
-- if (rstn_i = '0') then -- async and low-active reset (if required at all)
-- ...
-- elsif rising_edge(clk_i) then -- always use the main clock for all clock processes!
-- if (clkgen_i(clk_div8_c) = '1') then -- the div8 "clock" is actually a clock enable
-- ...
-- end if;
-- end if;
--
-- The clkgen_i input clocks are available when at least one IO/peripheral device (for example the UART) requires the clocks generated by the
-- clock generator. The CFS can enable the clock generator by itself by setting the clkgen_en_o signal high.
-- The CFS cannot ensure to deactive the clock generator by setting the clkgen_en_o signal low as other peripherals might still keep the generator activated.
-- Make sure to deactivate the CFS's clkgen_en_o if no clocks are required in here to reduce dynamic power consumption.
 
clkgen_en_o <= '0'; -- not used for this minimal example
 
 
-- Further Power Optimization -------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- The CFS can decide to go into low-power mode (by disabling all switching activity) when the CPU enters sleep mode.
-- The sleep_i signal is high when the CPU is in sleep mode. Any interrupt including the CFS's irq_o interrupt request signal
-- will wake up the CPU again.
 
 
-- Interrupt ------------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- The CFS features a single interrupt signal. This interrupt is connected to the CPU's "fast interrupt" channel 1.
-- Note that this fast interrupt channel is shared with the GPIO pin-change interrupt. Make sure to disable the GPIO's pin-change interrupt
-- via the according control register if you want to use this interrupt exclusively for the CFS.
--
-- The interrupt is single-shot. Setting the irq_o signal high for one cycle will generate an interrupt request.
-- The interrupt is acknowledged by the CPU via the one-shot irq_ack_i signal indicating that the according interrupt handler is starting.
 
irq_o <= '0'; -- not used for this minimal example
 
 
-- Read/Write Access ----------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- Here we are reading/writing from/to the interface registers of the module. Please note that the peripheral/IO
-- modules of the NEORV32 can only be written in full word mode (32-bit). Any other write access (half-word or byte)
-- will trigger a store bus access fault exception.
--
-- The CFS provides up to 32 memory-mapped 32-bit interface register. For instance, these could be used to provide
-- a <control register> for global control of the unit, a <data register> for reading/writing from/to a data FIFO, a <command register>
-- for issueing commands and a <status register> for status information.
--
-- Following the interface protocol, each read or write access has to be acknowledged in the following cycle using the ack_o signal.
-- If no ACK is generated, the bus access will time out and cause a store bus access fault exception. This exception can also be immediatly
-- triggered by setting err_o high for one cycle (only during a valid bus access).
 
err_o <= '0'; -- not used for this minimal example
 
-- Host access: Read and write access to the interface registers + bus transfer acknowledge.
-- This example only implements four physical r/w register (the four lowest CF register). The remaining addresses of the CFS are not
-- associated with any writable or readable register - an access to those is simply ignored but still acknowledged.
 
host_access: process(clk_i)
begin
if rising_edge(clk_i) then -- synchronous interface for reads and writes
-- transfer/access acknowledge --
ack_o <= rden or wren; -- default: required for the CPU to check the CFS is answering a bus read OR write request; all r/w accesses (to any cfs_reg) will succeed
-- ack_o <= rden; -- use this construct if your CFS is read-only
-- ack_o <= wren; -- use this construct if your CFS is write-only
-- ack_o <= ... -- or define the ACK by yourself (example: some registers are read-only, some others can only be written, ...)
 
-- write access --
for i in 0 to 3 loop -- iterate over all 4 bytes in a word
if (wren = '1') then -- word-wide write-access only!
case addr is -- make sure to use the internal 'addr' signal for the read/write interface
when cfs_reg0_addr_c => cfs_reg_wr(0) <= data_i; -- for example: control register
when cfs_reg1_addr_c => cfs_reg_wr(1) <= data_i; -- for example: data in/out fifo
when cfs_reg2_addr_c => cfs_reg_wr(2) <= data_i; -- for example: command fifo
when cfs_reg3_addr_c => cfs_reg_wr(3) <= data_i; -- for example: status register
when others => NULL;
end case;
end if;
end loop; -- i
 
-- read access --
data_o <= (others => '0'); -- the output has to be zero if there is no actual read access
if (rden = '1') then -- the read access is always a full 32-bit word wide; if required, the byte/half-word select/masking is done in the CPU
case addr is -- make sure to use the internal 'addr' signal for the read/write interface
when cfs_reg0_addr_c => data_o <= cfs_reg_rd(0);
when cfs_reg1_addr_c => data_o <= cfs_reg_rd(1);
when cfs_reg2_addr_c => data_o <= cfs_reg_rd(2);
when cfs_reg3_addr_c => data_o <= cfs_reg_rd(3);
when others => data_o <= (others => '0'); -- the remaining registers are not implemented and will read as zero
end case;
end if;
end if;
end process host_access;
 
 
-- CFS Function Core ----------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- This is where the actual functionality can be implemented.
-- In this example we are just implementing four r/w registers that invert any value written to them.
 
cfs_core: process(cfs_reg_wr)
begin
cfs_reg_rd(0) <= not cfs_reg_wr(0); -- just invert the written value
cfs_reg_rd(1) <= not cfs_reg_wr(1);
cfs_reg_rd(2) <= not cfs_reg_wr(2);
cfs_reg_rd(3) <= not cfs_reg_wr(3);
end process cfs_core;
 
 
end neorv32_cfs_rtl;
/rtl/core/neorv32_cpu.vhd
2,14 → 2,14
-- # << NEORV32 - CPU Top Entity >> #
-- # ********************************************************************************************* #
-- # NEORV32 CPU: #
-- # * neorv32_cpu.vhd - CPU top entity #
-- # * neorv32_cpu_alu.vhd - Arithmetic/logic unit #
-- # * neorv32_cpu_bus.vhd - Instruction and data bus interface unit #
-- # * neorv32_cpu_cp_muldiv.vhd - MULDIV co-processor #
-- # * neorv32_cpu_ctrl.vhd - CPU control and CSR system #
-- # * neorv32_cpu_decompressor.vhd - Compressed instructions decoder #
-- # * neorv32_cpu_regfile.vhd - Data register file #
-- # * neorv32_package.vhd - Main CPU/processor package file #
-- # * neorv32_cpu.vhd - CPU top entity #
-- # * neorv32_cpu_alu.vhd - Arithmetic/logic unit #
-- # * neorv32_cpu_bus.vhd - Instruction and data bus interface unit #
-- # * neorv32_cpu_cp_muldiv.vhd - MULDIV co-processor #
-- # * neorv32_cpu_ctrl.vhd - CPU control and CSR system #
-- # * neorv32_cpu_decompressor.vhd - Compressed instructions decoder #
-- # * neorv32_cpu_regfile.vhd - Data register file #
-- # * neorv32_package.vhd - Main CPU/processor package file #
-- # #
-- # Check out the processor's data sheet for more information: docs/NEORV32.pdf #
-- # ********************************************************************************************* #
73,12 → 73,13
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0 -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0 -- number of implemented HPM counters (0..29)
);
port (
-- global control --
clk_i : in std_ulogic := '0'; -- global clock, rising edge
rstn_i : in std_ulogic := '0'; -- global reset, low-active, async
sleep_o : out std_ulogic; -- cpu is in sleep mode when set
-- instruction bus interface --
i_bus_addr_o : out std_ulogic_vector(data_width_c-1 downto 0); -- bus access address
i_bus_rdata_i : in std_ulogic_vector(data_width_c-1 downto 0) := (others => '0'); -- bus read data
112,7 → 113,8
mext_irq_i : in std_ulogic := '0'; -- machine external interrupt
mtime_irq_i : in std_ulogic := '0'; -- machine timer interrupt
-- fast interrupts (custom) --
firq_i : in std_ulogic_vector(3 downto 0) := (others => '0')
firq_i : in std_ulogic_vector(7 downto 0) := (others => '0');
firq_ack_o : out std_ulogic_vector(7 downto 0)
);
end neorv32_cpu;
 
120,7 → 122,7
 
-- local signals --
signal ctrl : std_ulogic_vector(ctrl_width_c-1 downto 0); -- main control bus
signal alu_cmp : std_ulogic_vector(1 downto 0); -- alu comparator result
signal comparator : std_ulogic_vector(1 downto 0); -- comparator result
signal imm : std_ulogic_vector(data_width_c-1 downto 0); -- immediate
signal instr : std_ulogic_vector(data_width_c-1 downto 0); -- new instruction
signal rs1, rs2 : std_ulogic_vector(data_width_c-1 downto 0); -- source registers
150,6 → 152,9
signal pmp_addr : pmp_addr_if_t;
signal pmp_ctrl : pmp_ctrl_if_t;
 
-- atomic memory access - success? --
signal atomic_sc_res: std_ulogic;
 
begin
 
-- Sanity Checks --------------------------------------------------------------------------
208,7 → 213,7
PMP_NUM_REGIONS => PMP_NUM_REGIONS, -- number of regions (0..64)
PMP_MIN_GRANULARITY => PMP_MIN_GRANULARITY, -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS => HPM_NUM_CNTS -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS => HPM_NUM_CNTS -- number of implemented HPM counters (0..29)
)
port map (
-- global control --
221,7 → 226,7
bus_d_wait_i => bus_d_wait, -- wait for bus
-- data input --
instr_i => instr, -- instruction
cmp_i => alu_cmp, -- comparator status
cmp_i => comparator, -- comparator status
alu_add_i => alu_add, -- ALU address result
rs1_i => rs1, -- rf source 1
-- data output --
234,7 → 239,8
mext_irq_i => mext_irq_i, -- machine external interrupt
mtime_irq_i => mtime_irq_i, -- machine timer interrupt
-- fast interrupts (custom) --
firq_i => firq_i,
firq_i => firq_i, -- fast interrupt trigger
firq_ack_o => firq_ack_o, -- fast interrupt acknowledge mask
-- system time input from MTIME --
time_i => time_i, -- current system time
-- physical memory protection --
250,7 → 256,10
be_store_i => be_store -- bus error on store data access
);
 
-- CPU is sleeping? --
sleep_o <= ctrl(ctrl_sleep_c); -- set when CPU is sleeping (after WFI)
 
 
-- Register File --------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_cpu_regfile_inst: neorv32_cpu_regfile
267,7 → 276,8
csr_i => csr_rdata, -- CSR read data
-- data output --
rs1_o => rs1, -- operand 1
rs2_o => rs2 -- operand 2
rs2_o => rs2, -- operand 2
cmp_o => comparator -- comparator status
);
 
 
289,7 → 299,6
pc2_i => curr_pc, -- delayed PC
imm_i => imm, -- immediate
-- data output --
cmp_o => alu_cmp, -- comparator status
res_o => alu_res, -- ALU result
add_o => alu_add, -- address computation result
-- co-processor interface --
310,7 → 319,7
);
 
 
-- Co-Processor 0: MULDIV Unit ------------------------------------------------------------
-- Co-Processor 0: Integer Multiplication/Division ('M' Extension) ------------------------
-- -------------------------------------------------------------------------------------------
neorv32_cpu_cp_muldiv_inst_true:
if (CPU_EXTENSION_RISCV_M = true) generate
340,29 → 349,28
end generate;
 
 
-- Co-Processor 1: Atomic Memory Access, SC - store-conditional ('M' extension) -----------
-- Co-Processor 1: Atomic Memory Access ('A' Extension) -----------------------------------
-- -------------------------------------------------------------------------------------------
atomic_op_cp: process(cp1_start, ctrl)
-- "pseudo" co-processor for atomic operations
-- used to get the result of a store-conditional operation into the data path
atomic_op_cp: process(clk_i)
begin
-- "fake" co-processor for atomic operations
-- used to get the result of a store-conditional operation into the data path
if (CPU_EXTENSION_RISCV_A = true) then
if rising_edge(clk_i) then
if (cp1_start = '1') then
cp1_data <= (others => '0');
cp1_data(0) <= not ctrl(ctrl_bus_lock_c);
cp1_valid <= '1';
atomic_sc_res <= not ctrl(ctrl_bus_lock_c);
else
cp1_data <= (others => '0');
cp1_valid <= '0';
atomic_sc_res <= '0';
end if;
else
cp1_data <= (others => '0');
cp1_valid <= cp1_start; -- to make sure CPU does not get stalled if there is an accidental access
end if;
end process atomic_op_cp;
 
-- CP result --
cp1_data(data_width_c-1 downto 1) <= (others => '0');
cp1_data(0) <= atomic_sc_res when (CPU_EXTENSION_RISCV_A = true) else '0';
cp1_valid <= cp1_start; -- always assigned even if A is disabled to make sure CPU does not get stalled if there is an accidental access
 
-- Co-Processor 2: Not implemented (yet) --------------------------------------------------
 
-- Co-Processor 2: Bit Manipulation ('B' Extension) ---------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_cpu_cp_bitmanip_inst_true:
if (CPU_EXTENSION_RISCV_B = true) generate
374,7 → 382,7
ctrl_i => ctrl, -- main control bus
start_i => cp2_start, -- trigger operation
-- data input --
cmp_i => alu_cmp, -- comparator status
cmp_i => comparator, -- comparator status
rs1_i => rs1, -- rf source 1
rs2_i => rs2, -- rf source 2
-- result and status --
390,10 → 398,8
end generate;
 
 
-- Co-Processor 3: Not implemented (yet) --------------------------------------------------
-- Co-Processor 3: Not implemented --------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- control: ctrl cp3_start
-- inputs: rs1 rs2 alu_cmp
cp3_data <= (others => '0');
cp3_valid <= cp3_start; -- to make sure CPU does not get stalled if there is an accidental access
 
/rtl/core/neorv32_cpu_alu.vhd
1,7 → 1,7
-- #################################################################################################
-- # << NEORV32 - Arithmetical/Logical Unit >> #
-- # ********************************************************************************************* #
-- # Main data and address ALU. Includes comparator unit and co-processor interface/arbiter. #
-- # Main data and address ALU and co-processor interface/arbiter. #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
57,7 → 57,6
pc2_i : in std_ulogic_vector(data_width_c-1 downto 0); -- delayed PC
imm_i : in std_ulogic_vector(data_width_c-1 downto 0); -- immediate
-- data output --
cmp_o : out std_ulogic_vector(1 downto 0); -- comparator status
res_o : out std_ulogic_vector(data_width_c-1 downto 0); -- ALU result
add_o : out std_ulogic_vector(data_width_c-1 downto 0); -- address computation result
-- co-processor interface --
90,11 → 89,6
signal arith_res : std_ulogic_vector(data_width_c-1 downto 0);
signal logic_res : std_ulogic_vector(data_width_c-1 downto 0);
 
-- comparator --
signal cmp_opx : std_ulogic_vector(data_width_c downto 0);
signal cmp_opy : std_ulogic_vector(data_width_c downto 0);
signal cmp_sub : std_ulogic_vector(data_width_c downto 0);
 
-- shifter --
type shifter_t is record
cmd : std_ulogic;
128,16 → 122,6
opb <= imm_i when (ctrl_i(ctrl_alu_opb_mux_c) = '1') else rs2_i; -- operand b (second ALU input operand)
 
 
-- Comparator Unit ------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
cmp_opx <= (rs1_i(rs1_i'left) and (not ctrl_i(ctrl_alu_unsigned_c))) & rs1_i;
cmp_opy <= (rs2_i(rs2_i'left) and (not ctrl_i(ctrl_alu_unsigned_c))) & rs2_i;
cmp_sub <= std_ulogic_vector(signed(cmp_opx) - signed(cmp_opy)); -- less than (x < y)
 
cmp_o(alu_cmp_equal_c) <= '1' when (rs1_i = rs2_i) else '0';
cmp_o(alu_cmp_less_c) <= cmp_sub(cmp_sub'left); -- less = carry (borrow)
 
 
-- Binary Adder/Subtractor ----------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
binary_arithmetic_core: process(ctrl_i, opa, opb)
150,7 → 134,6
-- operand sign-extension --
op_a_v := (opa(opa'left) and (not ctrl_i(ctrl_alu_unsigned_c))) & opa;
op_b_v := (opb(opb'left) and (not ctrl_i(ctrl_alu_unsigned_c))) & opb;
 
-- add/sub(slt) select --
if (ctrl_i(ctrl_alu_addsub_c) = '1') then -- subtraction
op_y_v := not op_b_v;
159,7 → 142,6
op_y_v := op_b_v;
cin_v(0) := '0';
end if;
 
-- adder core (result + carry/borrow) --
addsub_res <= std_ulogic_vector(unsigned(op_a_v) + unsigned(op_y_v) + unsigned(cin_v(0 downto 0)));
end process binary_arithmetic_core;
227,7 → 209,6
-- Barrel shifter (huge but fast)
-- --------------------------------------------------------------------------------
else
 
-- operands and cycle control --
if (shifter.start = '1') then -- trigger new shift
shifter.bs_d_in <= rs1_i; -- shift operand (can only be rs1; opa would also contain pc)
295,8 → 276,11
shifter.halt <= '1' when (or_all_f(shifter.cnt(shifter.cnt'left downto 1)) = '1') or (shifter.start = '1') else '0';
 
 
-- Coprocessor Arbiter --------------------------------------------------------------------
-- Co-Processor Arbiter -------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- Interface:
-- Co-processor "valid" signal has to be asserted (for one cycle) one cycle before asserting output data
-- Co-processor "output data" has to be always zero unless co-processor was explicitly triggered
cp_arbiter: process(rstn_i, clk_i)
begin
if (rstn_i = '0') then
326,12 → 310,7
cp_ctrl.halt <= (cp_ctrl.busy and (not (cp0_valid_i or cp1_valid_i or cp2_valid_i or cp3_valid_i))) or cp_ctrl.start;
 
-- co-processor result --
cp_read_back: process(clk_i)
begin
if rising_edge(clk_i) then
cp_res <= cp0_data_i or cp1_data_i or cp2_data_i or cp3_data_i; -- only the *actually selected* co-processor may output data != 0
end if;
end process cp_read_back;
cp_res <= cp0_data_i or cp1_data_i or cp2_data_i or cp3_data_i; -- only the *actually selected* co-processor may output data != 0
 
 
-- ALU Logic Core -------------------------------------------------------------------------
/rtl/core/neorv32_cpu_bus.vhd
158,7 → 158,12
end record;
signal pmp : pmp_t;
 
-- pmp faults anybody? --
-- memory control signal buffer (when using PMP) --
signal d_bus_we, d_bus_we_buf : std_ulogic;
signal d_bus_re, d_bus_re_buf : std_ulogic;
signal i_bus_re, i_bus_re_buf : std_ulogic;
 
-- pmp faults anyone? --
signal if_pmp_fault : std_ulogic; -- pmp instruction access fault
signal ld_pmp_fault : std_ulogic; -- pmp load access fault
signal st_pmp_fault : std_ulogic; -- pmp store access fault
165,6 → 170,11
 
begin
 
-- Sanity Checks --------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
assert not (PMP_NUM_REGIONS > pmp_num_regions_critical_c) report "NEORV32 CPU CONFIG WARNING! Number of implemented PMP regions (PMP_NUM_REGIONS = " & integer'image(PMP_NUM_REGIONS) & ") beyond critical limit (pmp_num_regions_critical_c = " & integer'image(pmp_num_regions_critical_c) & "). Inserting another register stage (that will increase memory latency by +1 cycle)." severity warning;
 
 
-- Data Interface: Access Address ---------------------------------------------------------
-- -------------------------------------------------------------------------------------------
mem_adr_reg: process(clk_i)
324,13 → 334,27
d_bus_addr_o <= mar;
d_bus_wdata_o <= d_bus_wdata;
d_bus_ben_o <= d_bus_ben;
d_bus_we_o <= ctrl_i(ctrl_bus_wr_c) and (not d_misaligned) and (not st_pmp_fault); -- no actual write when misaligned or PMP fault
d_bus_re_o <= ctrl_i(ctrl_bus_rd_c) and (not d_misaligned) and (not ld_pmp_fault); -- no actual read when misaligned or PMP fault
d_bus_we <= ctrl_i(ctrl_bus_wr_c) and (not d_misaligned) and (not st_pmp_fault); -- no actual write when misaligned or PMP fault
d_bus_re <= ctrl_i(ctrl_bus_rd_c) and (not d_misaligned) and (not ld_pmp_fault); -- no actual read when misaligned or PMP fault
d_bus_we_o <= d_bus_we_buf when (PMP_NUM_REGIONS > pmp_num_regions_critical_c) else d_bus_we;
d_bus_re_o <= d_bus_re_buf when (PMP_NUM_REGIONS > pmp_num_regions_critical_c) else d_bus_re;
d_bus_fence_o <= ctrl_i(ctrl_bus_fence_c);
d_bus_rdata <= d_bus_rdata_i;
d_bus_lock_o <= ctrl_i(ctrl_bus_lock_c);
 
-- additional register stage for control signals if using PMP_NUM_REGIONS > pmp_num_regions_critical_c --
pmp_dbus_buffer: process(rstn_i, clk_i)
begin
if (rstn_i = '0') then
d_bus_we_buf <= '0';
d_bus_re_buf <= '0';
elsif rising_edge(clk_i) then
d_bus_we_buf <= d_bus_we;
d_bus_re_buf <= d_bus_re;
end if;
end process pmp_dbus_buffer;
 
 
-- Instruction Fetch Arbiter --------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
ifetch_arbiter: process(rstn_i, clk_i)
375,17 → 399,27
i_bus_wdata_o <= (others => '0'); -- instruction fetch is read-only
i_bus_ben_o <= (others => '0');
i_bus_we_o <= '0';
i_bus_re_o <= ctrl_i(ctrl_bus_if_c) and (not i_misaligned) and (not if_pmp_fault); -- no actual read when misaligned or PMP fault
i_bus_re <= ctrl_i(ctrl_bus_if_c) and (not i_misaligned) and (not if_pmp_fault); -- no actual read when misaligned or PMP fault
i_bus_re_o <= i_bus_re_buf when (PMP_NUM_REGIONS > pmp_num_regions_critical_c) else i_bus_re;
i_bus_fence_o <= ctrl_i(ctrl_bus_fencei_c);
instr_o <= i_bus_rdata_i;
i_bus_lock_o <= '0'; -- instruction fetch cannot be atomic
 
 
-- check instruction access --
i_misaligned <= '0' when (CPU_EXTENSION_RISCV_C = true) else -- no alignment exceptions possible when using C-extension
'1' when (fetch_pc_i(1) = '1') else '0'; -- 32-bit accesses only
 
-- additional register stage for control signals if using PMP_NUM_REGIONS > pmp_num_regions_critical_c --
pmp_ibus_buffer: process(rstn_i, clk_i)
begin
if (rstn_i = '0') then
i_bus_re_buf <= '0';
elsif rising_edge(clk_i) then
i_bus_re_buf <= i_bus_re;
end if;
end process pmp_ibus_buffer;
 
 
-- Physical Memory Protection (PMP) -------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- compute address masks (ITERATIVE!!!) --
/rtl/core/neorv32_cpu_control.vhd
63,7 → 63,7
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0 -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0 -- number of implemented HPM counters (0..29)
);
port (
-- global control --
89,7 → 89,8
mext_irq_i : in std_ulogic; -- machine external interrupt
mtime_irq_i : in std_ulogic; -- machine timer interrupt
-- fast interrupts (custom) --
firq_i : in std_ulogic_vector(3 downto 0);
firq_i : in std_ulogic_vector(7 downto 0);
firq_ack_o : out std_ulogic_vector(7 downto 0);
-- system time input from MTIME --
time_i : in std_ulogic_vector(63 downto 0); -- current system time
-- physical memory protection --
213,6 → 214,7
exc_buf : std_ulogic_vector(exception_width_c-1 downto 0);
exc_fire : std_ulogic; -- set if there is a valid source in the exception buffer
irq_buf : std_ulogic_vector(interrupt_width_c-1 downto 0);
firq_sync : std_ulogic_vector(7 downto 0);
irq_fire : std_ulogic; -- set if there is a valid source in the interrupt buffer
exc_ack : std_ulogic; -- acknowledge all exceptions
irq_ack : std_ulogic_vector(interrupt_width_c-1 downto 0); -- acknowledge specific interrupt
275,7 → 277,7
mie_msie : std_ulogic; -- mie.MSIE: machine software interrupt enable (R/W)
mie_meie : std_ulogic; -- mie.MEIE: machine external interrupt enable (R/W)
mie_mtie : std_ulogic; -- mie.MEIE: machine timer interrupt enable (R/W)
mie_firqe : std_ulogic_vector(3 downto 0); -- mie.firq*e: fast interrupt enabled (R/W)
mie_firqe : std_ulogic_vector(7 downto 0); -- mie.firq*e: fast interrupt enabled (R/W)
--
mcounteren_cy : std_ulogic; -- mcounteren.cy: allow cycle[h] access from user-mode
mcounteren_tm : std_ulogic; -- mcounteren.tm: allow time[h] access from user-mode
642,13 → 644,13
begin
case execute_engine.i_reg(instr_funct3_msb_c downto instr_funct3_lsb_c) is
when funct3_beq_c => -- branch if equal
execute_engine.branch_taken <= cmp_i(alu_cmp_equal_c);
execute_engine.branch_taken <= cmp_i(cmp_equal_c);
when funct3_bne_c => -- branch if not equal
execute_engine.branch_taken <= not cmp_i(alu_cmp_equal_c);
execute_engine.branch_taken <= not cmp_i(cmp_equal_c);
when funct3_blt_c | funct3_bltu_c => -- branch if less (signed/unsigned)
execute_engine.branch_taken <= cmp_i(alu_cmp_less_c);
execute_engine.branch_taken <= cmp_i(cmp_less_c);
when funct3_bge_c | funct3_bgeu_c => -- branch if greater or equal (signed/unsigned)
execute_engine.branch_taken <= not cmp_i(alu_cmp_less_c);
execute_engine.branch_taken <= not cmp_i(cmp_less_c);
when others => -- undefined
execute_engine.branch_taken <= '0';
end case;
731,14 → 733,22
-- fast bus access requests --
ctrl_o(ctrl_bus_if_c) <= bus_fast_ir;
-- bus error control --
ctrl_o(ctrl_bus_ierr_ack_c) <= fetch_engine.bus_err_ack;
ctrl_o(ctrl_bus_derr_ack_c) <= trap_ctrl.env_start_ack;
ctrl_o(ctrl_bus_ierr_ack_c) <= fetch_engine.bus_err_ack; -- instruction fetch bus access error ACK
ctrl_o(ctrl_bus_derr_ack_c) <= trap_ctrl.env_start_ack; -- data access bus error access ACK
-- memory access size / sign --
ctrl_o(ctrl_bus_unsigned_c) <= execute_engine.i_reg(instr_funct3_msb_c); -- unsigned LOAD (LBU, LHU)
ctrl_o(ctrl_bus_size_msb_c downto ctrl_bus_size_lsb_c) <= execute_engine.i_reg(instr_funct3_lsb_c+1 downto instr_funct3_lsb_c); -- mem transfer size
-- alu.shifter --
ctrl_o(ctrl_alu_shift_dir_c) <= execute_engine.i_reg(instr_funct3_msb_c); -- shift direction (left/right)
ctrl_o(ctrl_alu_shift_ar_c) <= execute_engine.i_reg(30); -- is arithmetic shift
-- instruction's function blocks (for co-processors) --
ctrl_o(ctrl_ir_opcode7_6_c downto ctrl_ir_opcode7_0_c) <= execute_engine.i_reg(instr_opcode_msb_c downto instr_opcode_lsb_c);
ctrl_o(ctrl_ir_funct12_11_c downto ctrl_ir_funct12_0_c) <= execute_engine.i_reg(instr_funct12_msb_c downto instr_funct12_lsb_c);
ctrl_o(ctrl_ir_funct3_2_c downto ctrl_ir_funct3_0_c) <= execute_engine.i_reg(instr_funct3_msb_c downto instr_funct3_lsb_c);
-- locked bus operation (for atomica memory operations) --
-- locked bus operation (for atomic memory operations) --
ctrl_o(ctrl_bus_lock_c) <= atomic_ctrl.lock; -- (bus) lock status
-- cpu status --
ctrl_o(ctrl_sleep_c) <= execute_engine.sleep; -- cpu is in sleep mode
end process ctrl_output;
 
 
841,21 → 851,16
 
-- CONTROL DEFAULTS --
ctrl_nxt <= (others => '0'); -- default: all off
-- ALU main control --
ctrl_nxt(ctrl_alu_addsub_c) <= '0'; -- ADD(I)
ctrl_nxt(ctrl_alu_func1_c downto ctrl_alu_func0_c) <= alu_func_cmd_arith_c; -- default ALU function select: arithmetic
ctrl_nxt(ctrl_alu_arith_c) <= alu_arith_cmd_addsub_c; -- default ALU arithmetic operation: ADDSUB
-- ALU sign control --
if (execute_engine.i_reg(instr_opcode_lsb_c+4) = '1') then -- ALU ops
ctrl_nxt(ctrl_alu_unsigned_c) <= execute_engine.i_reg(instr_funct3_lsb_c+0); -- unsigned ALU operation? (SLTIU, SLTU)
else -- branches
ctrl_nxt(ctrl_alu_unsigned_c) <= execute_engine.i_reg(instr_funct3_lsb_c+1); -- unsigned branches? (BLTU, BGEU)
end if;
-- memory access --
ctrl_nxt(ctrl_bus_unsigned_c) <= execute_engine.i_reg(instr_funct3_msb_c); -- unsigned LOAD (LBU, LHU)
ctrl_nxt(ctrl_bus_size_msb_c downto ctrl_bus_size_lsb_c) <= execute_engine.i_reg(instr_funct3_lsb_c+1 downto instr_funct3_lsb_c); -- mem transfer size
-- alu.shifter --
ctrl_nxt(ctrl_alu_shift_dir_c) <= execute_engine.i_reg(instr_funct3_msb_c); -- shift direction (left/right)
ctrl_nxt(ctrl_alu_shift_ar_c) <= execute_engine.i_reg(30); -- is arithmetic shift
-- ALU main control --
ctrl_nxt(ctrl_alu_addsub_c) <= '0'; -- ADD(I)
ctrl_nxt(ctrl_alu_func1_c downto ctrl_alu_func0_c) <= alu_func_cmd_arith_c; -- default ALU function select: arithmetic
ctrl_nxt(ctrl_alu_arith_c) <= alu_arith_cmd_addsub_c; -- default ALU arithmetic operation: ADDSUB
 
 
-- state machine --
1126,14 → 1131,16
 
when FENCE_OP => -- fence operations - execution
-- ------------------------------------------------------------
execute_engine.state_nxt <= SYS_WAIT;
execute_engine.pc_mux_sel <= "01"; -- linear next PC = "refetch" next instruction (only relevant for fence.i)
execute_engine.state_nxt <= SYS_WAIT;
-- FENCE.I --
if (CPU_EXTENSION_RISCV_Zifencei = true) and (execute_engine.i_reg(instr_funct3_lsb_c) = funct3_fencei_c(0)) then
execute_engine.pc_we <= '1';
execute_engine.if_rst_nxt <= '1'; -- this is a non-linear PC modification
fetch_engine.reset <= '1';
ctrl_nxt(ctrl_bus_fencei_c) <= '1';
if (CPU_EXTENSION_RISCV_Zifencei = true) then
execute_engine.pc_mux_sel <= "01"; -- linear next PC = start *new* instruction fetch with next instruction (only relevant for fence.i)
if (execute_engine.i_reg(instr_funct3_lsb_c) = funct3_fencei_c(0)) then
execute_engine.pc_we <= '1';
execute_engine.if_rst_nxt <= '1'; -- this is a non-linear PC modification
fetch_engine.reset <= '1';
ctrl_nxt(ctrl_bus_fencei_c) <= '1';
end if;
end if;
-- FENCE --
if (execute_engine.i_reg(instr_funct3_lsb_c) = funct3_fence_c(0)) then
1574,8 → 1581,9
trap_ctrl.irq_buf <= (others => '0');
trap_ctrl.exc_ack <= '0';
trap_ctrl.irq_ack <= (others => '0');
trap_ctrl.env_start <= '0';
trap_ctrl.cause <= trap_reset_c;
trap_ctrl.env_start <= '0';
trap_ctrl.firq_sync <= (others => '0');
elsif rising_edge(clk_i) then
if (CPU_EXTENSION_RISCV_Zicsr = true) then
-- exception buffer: misaligned load/store/instruction address
1596,10 → 1604,16
trap_ctrl.irq_buf(interrupt_mext_irq_c) <= csr.mie_meie and (trap_ctrl.irq_buf(interrupt_mext_irq_c) or mext_irq_i) and (not (trap_ctrl.irq_ack(interrupt_mext_irq_c) or csr.mip_clear(interrupt_mext_irq_c)));
trap_ctrl.irq_buf(interrupt_mtime_irq_c) <= csr.mie_mtie and (trap_ctrl.irq_buf(interrupt_mtime_irq_c) or mtime_irq_i) and (not (trap_ctrl.irq_ack(interrupt_mtime_irq_c) or csr.mip_clear(interrupt_mtime_irq_c)));
-- interrupt buffer: custom fast interrupts
trap_ctrl.irq_buf(interrupt_firq_0_c) <= csr.mie_firqe(0) and (trap_ctrl.irq_buf(interrupt_firq_0_c) or firq_i(0)) and (not (trap_ctrl.irq_ack(interrupt_firq_0_c) or csr.mip_clear(interrupt_firq_0_c)));
trap_ctrl.irq_buf(interrupt_firq_1_c) <= csr.mie_firqe(1) and (trap_ctrl.irq_buf(interrupt_firq_1_c) or firq_i(1)) and (not (trap_ctrl.irq_ack(interrupt_firq_1_c) or csr.mip_clear(interrupt_firq_1_c)));
trap_ctrl.irq_buf(interrupt_firq_2_c) <= csr.mie_firqe(2) and (trap_ctrl.irq_buf(interrupt_firq_2_c) or firq_i(2)) and (not (trap_ctrl.irq_ack(interrupt_firq_2_c) or csr.mip_clear(interrupt_firq_2_c)));
trap_ctrl.irq_buf(interrupt_firq_3_c) <= csr.mie_firqe(3) and (trap_ctrl.irq_buf(interrupt_firq_3_c) or firq_i(3)) and (not (trap_ctrl.irq_ack(interrupt_firq_3_c) or csr.mip_clear(interrupt_firq_3_c)));
trap_ctrl.firq_sync <= firq_i;
--
trap_ctrl.irq_buf(interrupt_firq_0_c) <= csr.mie_firqe(0) and (trap_ctrl.irq_buf(interrupt_firq_0_c) or trap_ctrl.firq_sync(0)) and (not (trap_ctrl.irq_ack(interrupt_firq_0_c) or csr.mip_clear(interrupt_firq_0_c)));
trap_ctrl.irq_buf(interrupt_firq_1_c) <= csr.mie_firqe(1) and (trap_ctrl.irq_buf(interrupt_firq_1_c) or trap_ctrl.firq_sync(1)) and (not (trap_ctrl.irq_ack(interrupt_firq_1_c) or csr.mip_clear(interrupt_firq_1_c)));
trap_ctrl.irq_buf(interrupt_firq_2_c) <= csr.mie_firqe(2) and (trap_ctrl.irq_buf(interrupt_firq_2_c) or trap_ctrl.firq_sync(2)) and (not (trap_ctrl.irq_ack(interrupt_firq_2_c) or csr.mip_clear(interrupt_firq_2_c)));
trap_ctrl.irq_buf(interrupt_firq_3_c) <= csr.mie_firqe(3) and (trap_ctrl.irq_buf(interrupt_firq_3_c) or trap_ctrl.firq_sync(3)) and (not (trap_ctrl.irq_ack(interrupt_firq_3_c) or csr.mip_clear(interrupt_firq_3_c)));
trap_ctrl.irq_buf(interrupt_firq_4_c) <= csr.mie_firqe(4) and (trap_ctrl.irq_buf(interrupt_firq_4_c) or trap_ctrl.firq_sync(4)) and (not (trap_ctrl.irq_ack(interrupt_firq_4_c) or csr.mip_clear(interrupt_firq_4_c)));
trap_ctrl.irq_buf(interrupt_firq_5_c) <= csr.mie_firqe(5) and (trap_ctrl.irq_buf(interrupt_firq_5_c) or trap_ctrl.firq_sync(5)) and (not (trap_ctrl.irq_ack(interrupt_firq_5_c) or csr.mip_clear(interrupt_firq_5_c)));
trap_ctrl.irq_buf(interrupt_firq_6_c) <= csr.mie_firqe(6) and (trap_ctrl.irq_buf(interrupt_firq_6_c) or trap_ctrl.firq_sync(6)) and (not (trap_ctrl.irq_ack(interrupt_firq_6_c) or csr.mip_clear(interrupt_firq_6_c)));
trap_ctrl.irq_buf(interrupt_firq_7_c) <= csr.mie_firqe(7) and (trap_ctrl.irq_buf(interrupt_firq_7_c) or trap_ctrl.firq_sync(7)) and (not (trap_ctrl.irq_ack(interrupt_firq_7_c) or csr.mip_clear(interrupt_firq_7_c)));
-- trap control --
if (trap_ctrl.env_start = '0') then -- no started trap handler
if (trap_ctrl.exc_fire = '1') or ((trap_ctrl.irq_fire = '1') and -- exception/IRQ detected!
1627,7 → 1641,10
-- current pending interrupts (for CSR.MIP register) --
csr.mip_status <= trap_ctrl.irq_buf;
 
-- acknowledge mask output --
firq_ack_o <= trap_ctrl.irq_ack(interrupt_firq_7_c downto interrupt_firq_0_c);
 
 
-- Trap Priority Encoder ------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
trap_priority: process(trap_ctrl)
1675,7 → 1692,27
trap_ctrl.cause_nxt <= trap_firq3_c;
trap_ctrl.irq_ack_nxt(interrupt_firq_3_c) <= '1';
 
-- interrupt: 1.20 fast interrupt channel 4 --
elsif (trap_ctrl.irq_buf(interrupt_firq_4_c) = '1') then
trap_ctrl.cause_nxt <= trap_firq4_c;
trap_ctrl.irq_ack_nxt(interrupt_firq_4_c) <= '1';
 
-- interrupt: 1.21 fast interrupt channel 5 --
elsif (trap_ctrl.irq_buf(interrupt_firq_5_c) = '1') then
trap_ctrl.cause_nxt <= trap_firq5_c;
trap_ctrl.irq_ack_nxt(interrupt_firq_5_c) <= '1';
 
-- interrupt: 1.22 fast interrupt channel 6 --
elsif (trap_ctrl.irq_buf(interrupt_firq_6_c) = '1') then
trap_ctrl.cause_nxt <= trap_firq6_c;
trap_ctrl.irq_ack_nxt(interrupt_firq_6_c) <= '1';
 
-- interrupt: 1.23 fast interrupt channel 7 --
elsif (trap_ctrl.irq_buf(interrupt_firq_7_c) = '1') then
trap_ctrl.cause_nxt <= trap_firq7_c;
trap_ctrl.irq_ack_nxt(interrupt_firq_7_c) <= '1';
 
 
-- the following traps are caused by *synchronous* exceptions (= 'classic' exceptions)
-- here we do not need a specific acknowledge mask since only one exception (the one
-- with highest priority) is evaluated at once
1854,6 → 1891,10
csr.mie_firqe(1) <= csr.wdata(17); -- fast interrupt channel 1
csr.mie_firqe(2) <= csr.wdata(18); -- fast interrupt channel 2
csr.mie_firqe(3) <= csr.wdata(19); -- fast interrupt channel 3
csr.mie_firqe(4) <= csr.wdata(20); -- fast interrupt channel 4
csr.mie_firqe(5) <= csr.wdata(21); -- fast interrupt channel 5
csr.mie_firqe(6) <= csr.wdata(22); -- fast interrupt channel 6
csr.mie_firqe(7) <= csr.wdata(22); -- fast interrupt channel 7
when csr_mtvec_c => -- R/W: mtvec - machine trap-handler base address (for ALL exceptions)
csr.mtvec <= csr.wdata(data_width_c-1 downto 2) & "00"; -- mtvec.MODE=0
when csr_mcounteren_c => -- R/W: machine counter enable register
1883,6 → 1924,10
csr.mip_clear(interrupt_firq_1_c) <= not csr.wdata(17);
csr.mip_clear(interrupt_firq_2_c) <= not csr.wdata(18);
csr.mip_clear(interrupt_firq_3_c) <= not csr.wdata(19);
csr.mip_clear(interrupt_firq_4_c) <= not csr.wdata(20);
csr.mip_clear(interrupt_firq_5_c) <= not csr.wdata(21);
csr.mip_clear(interrupt_firq_6_c) <= not csr.wdata(22);
csr.mip_clear(interrupt_firq_7_c) <= not csr.wdata(23);
 
-- physical memory protection: R/W: pmpcfg* - PMP configuration registers --
-- --------------------------------------------------------------------
1938,6 → 1983,7
for i in 0 to HPM_NUM_CNTS-1 loop
if (csr.addr(4 downto 0) = std_ulogic_vector(to_unsigned(i+3, 5))) then
csr.mhpmevent(i) <= csr.wdata(csr.mhpmevent(i)'left downto 0);
csr.mhpmevent(i)(1) <= '0'; -- would be used for "TIME"
end if;
end loop; -- i (CSRs)
 
1976,7 → 2022,7
csr.mtval <= mar_i; -- faulting data access address
when trap_iil_c => -- illegal instruction
csr.mtval <= execute_engine.i_reg_last; -- faulting instruction itself
when others => -- everything else including interrupts
when others => -- everything else including all interrupts
csr.mtval <= (others => '0');
end case;
end if;
2121,13 → 2167,13
hpmcnt_ctrl: process(clk_i)
begin
if rising_edge(clk_i) then
cnt_event <= cnt_event_nxt;
-- buffer event sources --
cnt_event <= cnt_event_nxt;
-- enable selected triggers by ANDing actual events and according CSR configuration bits --
-- OR everything to see if counter should increment --
hpmcnt_trigger <= (others => '0'); -- default
for i in 0 to HPM_NUM_CNTS-1 loop
-- enable selected triggers by ANDing events and configuration bits --
-- OR everything to see if counter should increment --
-- AND with inverted sleep flag to increment only when CPU is awake --
hpmcnt_trigger(i) <= (or_all_f(cnt_event and csr.mhpmevent(i)(cnt_event'left downto 0))) and (not execute_engine.sleep);
hpmcnt_trigger(i) <= or_all_f(cnt_event and csr.mhpmevent(i)(cnt_event'left downto 0));
end loop; -- i
end if;
end process hpmcnt_ctrl;
2138,10 → 2184,10
cnt_event_nxt(hpmcnt_event_ir_c) <= '1' when (execute_engine.state = EXECUTE) else '0'; -- retired instruction
 
-- counter event trigger - custom / NEORV32-specific --
cnt_event_nxt(hpmcnt_event_cir_c) <= '1' when (execute_engine.state = EXECUTE) and (execute_engine.is_ci = '1') else '0'; -- retired compressed instruction
cnt_event_nxt(hpmcnt_event_wait_if_c) <= '1' when (fetch_engine.state = IFETCH_ISSUE) and (fetch_engine.state_prev = IFETCH_ISSUE) else '0'; -- instruction fetch memory wait cycle
cnt_event_nxt(hpmcnt_event_wait_ii_c) <= '1' when (execute_engine.state = DISPATCH) and (execute_engine.state_prev = DISPATCH) else '0'; -- instruction issue wait cycle
cnt_event_nxt(hpmcnt_event_wait_mc_c) <= '1' when (execute_engine.state = ALU_WAIT) and (execute_engine.state_prev = ALU_WAIT) else '0'; -- multi-cycle alu-operation wait cycle
cnt_event_nxt(hpmcnt_event_cir_c) <= '1' when (execute_engine.state = EXECUTE) and (execute_engine.is_ci = '1') else '0'; -- retired compressed instruction
cnt_event_nxt(hpmcnt_event_wait_if_c) <= '1' when (fetch_engine.state = IFETCH_ISSUE) and (fetch_engine.state_prev = IFETCH_ISSUE) else '0'; -- instruction fetch memory wait cycle
cnt_event_nxt(hpmcnt_event_wait_ii_c) <= '1' when (execute_engine.state = DISPATCH) and (execute_engine.state_prev = DISPATCH) else '0'; -- instruction issue wait cycle
cnt_event_nxt(hpmcnt_event_wait_mc_c) <= '1' when (execute_engine.state = ALU_WAIT) and (execute_engine.state_prev = ALU_WAIT) else '0'; -- multi-cycle alu-operation wait cycle
 
cnt_event_nxt(hpmcnt_event_load_c) <= '1' when (execute_engine.state = LOADSTORE_1) and (ctrl(ctrl_bus_rd_c) = '1') else '0'; -- load operation
cnt_event_nxt(hpmcnt_event_store_c) <= '1' when (execute_engine.state = LOADSTORE_1) and (ctrl(ctrl_bus_wr_c) = '1') else '0'; -- store operation
2194,6 → 2240,10
csr.rdata(17) <= csr.mie_firqe(1); -- fast interrupt channel 1
csr.rdata(18) <= csr.mie_firqe(2); -- fast interrupt channel 2
csr.rdata(19) <= csr.mie_firqe(3); -- fast interrupt channel 3
csr.rdata(20) <= csr.mie_firqe(4); -- fast interrupt channel 4
csr.rdata(21) <= csr.mie_firqe(5); -- fast interrupt channel 5
csr.rdata(22) <= csr.mie_firqe(6); -- fast interrupt channel 6
csr.rdata(23) <= csr.mie_firqe(7); -- fast interrupt channel 7
when csr_mtvec_c => -- R/W: mtvec - machine trap-handler base address (for ALL exceptions)
csr.rdata <= csr.mtvec(data_width_c-1 downto 2) & "00"; -- mtvec.MODE=0
when csr_mcounteren_c => -- R/W: machine counter enable register
2220,6 → 2270,10
csr.rdata(17) <= csr.mip_status(interrupt_firq_1_c);
csr.rdata(18) <= csr.mip_status(interrupt_firq_2_c);
csr.rdata(19) <= csr.mip_status(interrupt_firq_3_c);
csr.rdata(20) <= csr.mip_status(interrupt_firq_4_c);
csr.rdata(21) <= csr.mip_status(interrupt_firq_5_c);
csr.rdata(22) <= csr.mip_status(interrupt_firq_6_c);
csr.rdata(23) <= csr.mip_status(interrupt_firq_7_c);
 
-- physical memory protection - configuration --
when csr_pmpcfg0_c => csr.rdata <= csr.pmpcfg_rd(03) & csr.pmpcfg_rd(02) & csr.pmpcfg_rd(01) & csr.pmpcfg_rd(00); -- R/W: pmpcfg0
/rtl/core/neorv32_cpu_cp_bitmanip.vhd
4,6 → 4,9
-- # The bit manipulation unit is implemted as co-processor that has a processing latency of 1 #
-- # cycle for logic/arithmetic operations and 3+shamt (=shift amount) cycles for shift(-related) #
-- # operations. #
-- # #
-- # Supported sub-extensions (Zb*): #
-- # - Zbb: Base instructions (mandatory) #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
164,7 → 167,7
when S_IDLE => -- wait for operation trigger
-- ------------------------------------------------------------
if (start_i = '1') then
less_ff <= cmp_i(alu_cmp_less_c);
less_ff <= cmp_i(cmp_less_c);
cmd_buf <= cmd;
rs1_reg <= rs1_i;
rs2_reg <= rs2_i;
257,8 → 260,7
-- count leading/trailing zeros --
res_int(op_clz_c)(data_width_c-1 downto shifter.cnt'left+1) <= (others => '0');
res_int(op_clz_c)(shifter.cnt'left downto 0) <= shifter.cnt;
res_int(op_ctz_c)(data_width_c-1 downto shifter.cnt'left+1) <= (others => '0');
res_int(op_ctz_c)(shifter.cnt'left downto 0) <= shifter.cnt;
res_int(op_ctz_c) <= (others => '0'); -- unused/redundant
 
-- count set bits --
res_int(op_cpop_c)(data_width_c-1 downto shifter.bcnt'left+1) <= (others => '0');
265,8 → 267,8
res_int(op_cpop_c)(shifter.bcnt'left downto 0) <= shifter.bcnt;
 
-- min/max select --
res_int(op_min_c) <= rs1_reg when (less_ff = '1') else rs2_reg;
res_int(op_max_c) <= rs2_reg when (less_ff = '1') else rs1_reg;
res_int(op_min_c) <= rs1_reg when ((less_ff xor cmd_buf(op_max_c)) = '1') else rs2_reg;
res_int(op_max_c) <= (others => '0'); -- unused/redundant
 
-- sign-extension --
res_int(op_sextb_c)(data_width_c-1 downto 8) <= (others => rs1_reg(7));
298,11 → 300,11
 
-- Output Selector ------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
res_out(op_clz_c) <= res_int(op_clz_c) when (cmd_buf(op_clz_c) = '1') else (others => '0');
res_out(op_ctz_c) <= res_int(op_ctz_c) when (cmd_buf(op_ctz_c) = '1') else (others => '0');
res_out(op_clz_c) <= res_int(op_clz_c) when ((cmd_buf(op_clz_c) or cmd_buf(op_ctz_c)) = '1') else (others => '0');
res_out(op_ctz_c) <= (others => '0'); -- unused/redundant
res_out(op_cpop_c) <= res_int(op_cpop_c) when (cmd_buf(op_cpop_c) = '1') else (others => '0');
res_out(op_min_c) <= res_int(op_min_c) when (cmd_buf(op_min_c) = '1') else (others => '0');
res_out(op_max_c) <= res_int(op_max_c) when (cmd_buf(op_max_c) = '1') else (others => '0');
res_out(op_min_c) <= res_int(op_min_c) when ((cmd_buf(op_min_c) or cmd_buf(op_max_c)) = '1') else (others => '0');
res_out(op_max_c) <= (others => '0'); -- unused/redundant
res_out(op_sextb_c) <= res_int(op_sextb_c) when (cmd_buf(op_sextb_c) = '1') else (others => '0');
res_out(op_sexth_c) <= res_int(op_sexth_c) when (cmd_buf(op_sexth_c) = '1') else (others => '0');
res_out(op_andn_c) <= res_int(op_andn_c) when (cmd_buf(op_andn_c) = '1') else (others => '0');
317,19 → 319,20
 
-- Output Gate ----------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
output_gate: process(valid, res_out)
output_gate: process(clk_i)
begin
if (valid = '1') then
res_o <= res_out(op_clz_c) or res_out(op_ctz_c) or res_out(op_cpop_c) or
res_out(op_min_c) or res_out(op_max_c) or
res_out(op_sextb_c) or res_out(op_sexth_c) or
res_out(op_andn_c) or res_out(op_orn_c) or res_out(op_xnor_c) or
res_out(op_pack_c) or
res_out(op_ror_c) or res_out(op_rol_c) or
res_out(op_rev8_c) or
res_out(op_orcb_c);
else
if rising_edge(clk_i) then
res_o <= (others => '0');
if (valid = '1') then
res_o <= res_out(op_clz_c) or res_out(op_cpop_c) or -- res_out(op_ctz_c) is unused here
res_out(op_min_c) or -- res_out(op_max_c) is unused here
res_out(op_sextb_c) or res_out(op_sexth_c) or
res_out(op_andn_c) or res_out(op_orn_c) or res_out(op_xnor_c) or
res_out(op_pack_c) or
res_out(op_ror_c) or res_out(op_rol_c) or
res_out(op_rev8_c) or
res_out(op_orcb_c);
end if;
end if;
end process output_gate;
 
/rtl/core/neorv32_cpu_cp_muldiv.vhd
302,29 → 302,30
 
-- Data Output ----------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
operation_result: process(valid, cp_op_ff, mul_product, div_res, quotient, opy_is_zero, rs1, remainder)
operation_result: process(clk_i)
begin
if (valid = '1') then
case cp_op_ff is
when cp_op_mul_c =>
res_o <= mul_product(31 downto 00);
when cp_op_mulh_c | cp_op_mulhsu_c | cp_op_mulhu_c =>
res_o <= mul_product(63 downto 32);
when cp_op_div_c =>
res_o <= div_res;
when cp_op_divu_c =>
res_o <= quotient;
when cp_op_rem_c =>
if (opy_is_zero = '0') then
if rising_edge(clk_i) then
res_o <= (others => '0');
if (valid = '1') then
case cp_op_ff is
when cp_op_mul_c =>
res_o <= mul_product(31 downto 00);
when cp_op_mulh_c | cp_op_mulhsu_c | cp_op_mulhu_c =>
res_o <= mul_product(63 downto 32);
when cp_op_div_c =>
res_o <= div_res;
else
res_o <= rs1;
end if;
when others => -- cp_op_remu_c
res_o <= remainder;
end case;
else
res_o <= (others => '0');
when cp_op_divu_c =>
res_o <= quotient;
when cp_op_rem_c =>
if (opy_is_zero = '0') then
res_o <= div_res;
else
res_o <= rs1;
end if;
when others => -- cp_op_remu_c
res_o <= remainder;
end case;
end if;
end if;
end process operation_result;
 
/rtl/core/neorv32_cpu_regfile.vhd
63,7 → 63,8
csr_i : in std_ulogic_vector(data_width_c-1 downto 0); -- CSR read data
-- data output --
rs1_o : out std_ulogic_vector(data_width_c-1 downto 0); -- operand 1
rs2_o : out std_ulogic_vector(data_width_c-1 downto 0) -- operand 2
rs2_o : out std_ulogic_vector(data_width_c-1 downto 0); -- operand 2
cmp_o : out std_ulogic_vector(1 downto 0) -- comparator status
);
end neorv32_cpu_regfile;
 
81,7 → 82,12
signal dst_addr : std_ulogic_vector(4 downto 0); -- destination address
signal opa_addr : std_ulogic_vector(4 downto 0); -- rs1/dst address
signal opb_addr : std_ulogic_vector(4 downto 0); -- rs2 address
signal rs1, rs2 : std_ulogic_vector(data_width_c-1 downto 0);
 
-- comparator --
signal cmp_opx : std_ulogic_vector(data_width_c downto 0);
signal cmp_opy : std_ulogic_vector(data_width_c downto 0);
 
begin
 
-- Data Input Mux -------------------------------------------------------------------------
99,14 → 105,14
if (rf_we = '1') then
reg_file(to_integer(unsigned(opa_addr(4 downto 0)))) <= rf_write_data;
end if;
rs1_o <= reg_file(to_integer(unsigned(opa_addr(4 downto 0))));
rs2_o <= reg_file(to_integer(unsigned(opb_addr(4 downto 0))));
rs1 <= reg_file(to_integer(unsigned(opa_addr(4 downto 0))));
rs2 <= reg_file(to_integer(unsigned(opb_addr(4 downto 0))));
else -- embedded register file with 16 entries
if (rf_we = '1') then
reg_file_emb(to_integer(unsigned(opa_addr(3 downto 0)))) <= rf_write_data;
end if;
rs1_o <= reg_file_emb(to_integer(unsigned(opa_addr(3 downto 0))));
rs2_o <= reg_file_emb(to_integer(unsigned(opb_addr(3 downto 0))));
rs1 <= reg_file_emb(to_integer(unsigned(opa_addr(3 downto 0))));
rs2 <= reg_file_emb(to_integer(unsigned(opb_addr(3 downto 0))));
end if;
end if;
end process rf_access;
125,5 → 131,18
opa_addr <= dst_addr when (rf_we = '1') else ctrl_i(ctrl_rf_rs1_adr4_c downto ctrl_rf_rs1_adr0_c); -- rd/rs1
opb_addr <= ctrl_i(ctrl_rf_rs2_adr4_c downto ctrl_rf_rs2_adr0_c); -- rs2
 
-- data output --
rs1_o <= rs1;
rs2_o <= rs2;
 
 
-- Comparator Unit (for conditional branches) ---------------------------------------------
-- -------------------------------------------------------------------------------------------
cmp_opx <= (rs1(rs1'left) and (not ctrl_i(ctrl_alu_unsigned_c))) & rs1;
cmp_opy <= (rs2(rs2'left) and (not ctrl_i(ctrl_alu_unsigned_c))) & rs2;
 
cmp_o(cmp_equal_c) <= '1' when (rs1 = rs2) else '0';
cmp_o(cmp_less_c) <= '1' when (signed(cmp_opx) < signed(cmp_opy)) else '0';
 
 
end neorv32_cpu_regfile_rtl;
/rtl/core/neorv32_gpio.vhd
1,11 → 1,12
-- #################################################################################################
-- # << NEORV32 - General Purpose Parallel Input/Output Port (GPIO) >> #
-- # ********************************************************************************************* #
-- # 32-bit parallel input & output unit. Any pin change (HI->LO or LO->HI) triggers an IRQ. #
-- # 32-bit parallel input & output unit. Any pin change (HI->LO or LO->HI) of an enabled input #
-- # pin (via irq_en register) triggers an IRQ. #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
-- # Copyright (c) 2020, Stephan Nolting. All rights reserved. #
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
-- # #
-- # Redistribution and use in source and binary forms, with or without modification, are #
-- # permitted provided that the following conditions are met: #
/rtl/core/neorv32_icache.vhd
1,8 → 1,8
-- #################################################################################################
-- # << NEORV32 - Processor-Internal Instruction Cache >> #
-- # ********************************************************************************************* #
-- # Direct mapped (CACHE_NUM_SETS = 1) or 2-way set-associative (CACHE_NUM_SETS = 2). #
-- # Least recently used replacement policy (if CACHE_NUM_SETS > 1). #
-- # Direct mapped (ICACHE_NUM_SETS = 1) or 2-way set-associative (ICACHE_NUM_SETS = 2). #
-- # Least recently used replacement policy (if ICACHE_NUM_SETS > 1). #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
44,9 → 44,9
 
entity neorv32_icache is
generic (
CACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
CACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
CACHE_NUM_SETS : natural := 1 -- associativity / number of sets (1=direct_mapped), has to be a power of 2
ICACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
ICACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
ICACHE_NUM_SETS : natural := 1 -- associativity / number of sets (1=direct_mapped), has to be a power of 2
);
port (
-- global control --
81,16 → 81,16
architecture neorv32_icache_rtl of neorv32_icache is
 
-- cache layout --
constant cache_offset_size_c : natural := index_size_f(CACHE_BLOCK_SIZE/4); -- offset addresses full 32-bit words
constant cache_index_size_c : natural := index_size_f(CACHE_NUM_BLOCKS);
constant cache_offset_size_c : natural := index_size_f(ICACHE_BLOCK_SIZE/4); -- offset addresses full 32-bit words
constant cache_index_size_c : natural := index_size_f(ICACHE_NUM_BLOCKS);
constant cache_tag_size_c : natural := 32 - (cache_offset_size_c + cache_index_size_c + 2); -- 2 additonal bits for byte offset
 
-- cache memory --
component neorv32_icache_memory
generic (
CACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
CACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
CACHE_NUM_SETS : natural := 1 -- associativity; 0=direct-mapped, 1=2-way set-associative
ICACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
ICACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
ICACHE_NUM_SETS : natural := 1 -- associativity; 0=direct-mapped, 1=2-way set-associative
);
port (
-- global control --
153,12 → 153,12
-- Sanity Checks --------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- configuration --
assert not (is_power_of_two_f(CACHE_NUM_BLOCKS) = false) report "NEORV32 PROCESSOR CONFIG ERROR! Cache number of blocks <NUM_BLOCKS> has to be a power of 2." severity error;
assert not (is_power_of_two_f(CACHE_BLOCK_SIZE) = false) report "NEORV32 PROCESSOR CONFIG ERROR! Cache block size <BLOCK_SIZE> has to be a power of 2." severity error;
assert not ((is_power_of_two_f(CACHE_NUM_SETS) = false)) report "NEORV32 PROCESSOR CONFIG ERROR! Cache associativity <CACHE_NUM_SETS> has to be a power of 2." severity error;
assert not (CACHE_NUM_BLOCKS < 1) report "NEORV32 PROCESSOR CONFIG ERROR! Cache number of blocks <NUM_BLOCKS> has to be >= 1." severity error;
assert not (CACHE_BLOCK_SIZE < 4) report "NEORV32 PROCESSOR CONFIG ERROR! Cache block size <BLOCK_SIZE> has to be >= 4." severity error;
assert not ((CACHE_NUM_SETS = 0) or (CACHE_NUM_SETS > 2)) report "NEORV32 PROCESSOR CONFIG ERROR! Cache associativity <CACHE_NUM_SETS> has to be 1 (direct-mapped) or 2 (2-way set-associative)." severity error;
assert not (is_power_of_two_f(ICACHE_NUM_BLOCKS) = false) report "NEORV32 PROCESSOR CONFIG ERROR! i-cache number of blocks <ICACHE_NUM_BLOCKS> has to be a power of 2." severity error;
assert not (is_power_of_two_f(ICACHE_BLOCK_SIZE) = false) report "NEORV32 PROCESSOR CONFIG ERROR! i-cache block size <ICACHE_BLOCK_SIZE> has to be a power of 2." severity error;
assert not ((is_power_of_two_f(ICACHE_NUM_SETS) = false)) report "NEORV32 PROCESSOR CONFIG ERROR! i-cache associativity <ICACHE_NUM_SETS> has to be a power of 2." severity error;
assert not (ICACHE_NUM_BLOCKS < 1) report "NEORV32 PROCESSOR CONFIG ERROR! i-cache number of blocks <ICACHE_NUM_BLOCKS> has to be >= 1." severity error;
assert not (ICACHE_BLOCK_SIZE < 4) report "NEORV32 PROCESSOR CONFIG ERROR! i-cache block size <ICACHE_BLOCK_SIZE> has to be >= 4." severity error;
assert not ((ICACHE_NUM_SETS = 0) or (ICACHE_NUM_SETS > 2)) report "NEORV32 PROCESSOR CONFIG ERROR! i-cache associativity <ICACHE_NUM_SETS> has to be 1 (direct-mapped) or 2 (2-way set-associative)." severity error;
 
 
-- Control Engine FSM Sync ----------------------------------------------------------------
326,9 → 326,9
-- -------------------------------------------------------------------------------------------
neorv32_icache_memory_inst: neorv32_icache_memory
generic map (
CACHE_NUM_BLOCKS => CACHE_NUM_BLOCKS, -- number of blocks (min 1), has to be a power of 2
CACHE_BLOCK_SIZE => CACHE_BLOCK_SIZE, -- block size in bytes (min 4), has to be a power of 2
CACHE_NUM_SETS => CACHE_NUM_SETS -- associativity; 0=direct-mapped, 1=2-way set-associative
ICACHE_NUM_BLOCKS => ICACHE_NUM_BLOCKS, -- number of blocks (min 1), has to be a power of 2
ICACHE_BLOCK_SIZE => ICACHE_BLOCK_SIZE, -- block size in bytes (min 4), has to be a power of 2
ICACHE_NUM_SETS => ICACHE_NUM_SETS -- associativity; 0=direct-mapped, 1=2-way set-associative
)
port map (
-- global control --
360,8 → 360,8
-- #################################################################################################
-- # << NEORV32 - Cache Memory >> #
-- # ********************************************************************************************* #
-- # Direct mapped (CACHE_NUM_SETS = 1) or 2-way set-associative (CACHE_NUM_SETS = 2). #
-- # Least recently used replacement policy (if CACHE_NUM_SETS > 1). #
-- # Direct mapped (ICACHE_NUM_SETS = 1) or 2-way set-associative (ICACHE_NUM_SETS = 2). #
-- # Least recently used replacement policy (if ICACHE_NUM_SETS > 1). #
-- # Read-only for host, write-only for control. All output signals have one cycle latency. #
-- # #
-- # Cache sets are mapped to individual memory components - no multi-dimensional memory arrays #
407,9 → 407,9
 
entity neorv32_icache_memory is
generic (
CACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
CACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
CACHE_NUM_SETS : natural := 1 -- associativity; 1=direct-mapped, 2=2-way set-associative
ICACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
ICACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
ICACHE_NUM_SETS : natural := 1 -- associativity; 1=direct-mapped, 2=2-way set-associative
);
port (
-- global control --
435,18 → 435,18
architecture neorv32_icache_memory_rtl of neorv32_icache_memory is
 
-- cache layout --
constant cache_offset_size_c : natural := index_size_f(CACHE_BLOCK_SIZE/4); -- offset addresses full 32-bit words
constant cache_index_size_c : natural := index_size_f(CACHE_NUM_BLOCKS);
constant cache_offset_size_c : natural := index_size_f(ICACHE_BLOCK_SIZE/4); -- offset addresses full 32-bit words
constant cache_index_size_c : natural := index_size_f(ICACHE_NUM_BLOCKS);
constant cache_tag_size_c : natural := 32 - (cache_offset_size_c + cache_index_size_c + 2); -- 2 additonal bits for byte offset
constant cache_entries_c : natural := CACHE_NUM_BLOCKS * (CACHE_BLOCK_SIZE/4); -- number of 32-bit entries (per set)
constant cache_entries_c : natural := ICACHE_NUM_BLOCKS * (ICACHE_BLOCK_SIZE/4); -- number of 32-bit entries (per set)
 
-- status flag memory --
signal valid_flag_s0 : std_ulogic_vector(CACHE_NUM_BLOCKS-1 downto 0);
signal valid_flag_s1 : std_ulogic_vector(CACHE_NUM_BLOCKS-1 downto 0);
signal valid_flag_s0 : std_ulogic_vector(ICACHE_NUM_BLOCKS-1 downto 0);
signal valid_flag_s1 : std_ulogic_vector(ICACHE_NUM_BLOCKS-1 downto 0);
signal valid : std_ulogic_vector(1 downto 0); -- valid flag read data
 
-- tag memory --
type tag_mem_t is array (0 to CACHE_NUM_BLOCKS-1) of std_ulogic_vector(cache_tag_size_c-1 downto 0);
type tag_mem_t is array (0 to ICACHE_NUM_BLOCKS-1) of std_ulogic_vector(cache_tag_size_c-1 downto 0);
signal tag_mem_s0 : tag_mem_t;
signal tag_mem_s1 : tag_mem_t;
type tag_rd_t is array (0 to 1) of std_ulogic_vector(cache_tag_size_c-1 downto 0);
480,7 → 480,7
-- access history --
type history_t is record
re_ff : std_ulogic;
last_used_set : std_ulogic_vector(CACHE_NUM_BLOCKS-1 downto 0);
last_used_set : std_ulogic_vector(ICACHE_NUM_BLOCKS-1 downto 0);
to_be_replaced : std_ulogic;
end record;
signal history : history_t;
514,7 → 514,7
end process access_history;
 
-- which set is going to be replaced? -> opposite of last used set = least recently used set --
set_select <= '0' when (CACHE_NUM_SETS = 1) else (not history.to_be_replaced);
set_select <= '0' when (ICACHE_NUM_SETS = 1) else (not history.to_be_replaced);
 
 
-- Status flag memory ---------------------------------------------------------------------
570,7 → 570,7
comparator: process(host_acc_addr, tag, valid)
begin
hit <= (others => '0');
for i in 0 to CACHE_NUM_SETS-1 loop
for i in 0 to ICACHE_NUM_SETS-1 loop
if (host_acc_addr.tag = tag(i)) and (valid(i) = '1') then
hit(i) <= '1';
end if;
600,7 → 600,7
end process cache_mem_access;
 
-- data output --
host_rdata_o <= cache_rdata(0) when (hit(0) = '1') or (CACHE_NUM_SETS = 1) else cache_rdata(1);
host_rdata_o <= cache_rdata(0) when (hit(0) = '1') or (ICACHE_NUM_SETS = 1) else cache_rdata(1);
 
-- cache block ram access address --
cache_addr <= cache_index & cache_offset;
/rtl/core/neorv32_package.vhd
52,10 → 52,15
-- CPU core --
constant ipb_entries_c : natural := 2; -- entries in CPU instruction prefetch buffer, has to be a power of 2, default=2
 
-- "critical" number of PMP regions --
-- if more PMP regions (> pmp_num_regions_critical_c) are defined, another register stage is automatically
-- inserted into the memory interfaces increasing instruction fetch & data access latency by +1 cycle!
constant pmp_num_regions_critical_c : natural := 8;
 
-- Architecture Constants (do not modify!)= -----------------------------------------------
-- -------------------------------------------------------------------------------------------
constant data_width_c : natural := 32; -- data width - do not change!
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01050003"; -- no touchy!
constant data_width_c : natural := 32; -- native data path width - do not change!
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01050009"; -- no touchy!
constant pmp_max_r_c : natural := 8; -- max PMP regions - FIXED!
constant archid_c : natural := 19; -- official NEORV32 architecture ID - hands off!
constant rf_r0_is_reg_c : boolean := true; -- reg_file.r0 is a *physical register* that has to be initialized to zero by the CPU HW
90,33 → 95,69
 
-- Internal Bootloader ROM --
constant boot_rom_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFF0000"; -- bootloader base address, fixed!
constant boot_rom_size_c : natural := 4*1024; -- bytes
constant boot_rom_max_size_c : natural := 32*1024; -- bytes, fixed!
constant boot_rom_size_c : natural := 4*1024; -- module's address space in bytes
constant boot_rom_max_size_c : natural := 32*1024; -- max module's address space in bytes, fixed!
 
-- IO: Peripheral Devices ("IO") Area --
-- Control register(s) (including the device-enable) should be located at the base address of each device
constant io_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF80";
constant io_size_c : natural := 32*4; -- bytes, fixed!
constant io_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF00";
constant io_size_c : natural := 64*4; -- module's address space in bytes, fixed!
 
-- Custom Functions Subsystem (CFS) --
constant cfs_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF00"; -- base address
constant cfs_size_c : natural := 32*4; -- module's address space in bytes
constant cfs_reg0_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF00";
constant cfs_reg1_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF04";
constant cfs_reg2_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF08";
constant cfs_reg3_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF0C";
constant cfs_reg4_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF10";
constant cfs_reg5_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF14";
constant cfs_reg6_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF18";
constant cfs_reg7_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF1C";
constant cfs_reg8_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF20";
constant cfs_reg9_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF24";
constant cfs_reg10_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF28";
constant cfs_reg11_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF2C";
constant cfs_reg12_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF30";
constant cfs_reg13_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF34";
constant cfs_reg14_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF38";
constant cfs_reg15_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF3C";
constant cfs_reg16_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF40";
constant cfs_reg17_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF44";
constant cfs_reg18_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF48";
constant cfs_reg19_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF4C";
constant cfs_reg20_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF50";
constant cfs_reg21_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF54";
constant cfs_reg22_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF58";
constant cfs_reg23_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF5C";
constant cfs_reg24_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF60";
constant cfs_reg25_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF64";
constant cfs_reg26_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF68";
constant cfs_reg27_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF6C";
constant cfs_reg28_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF70";
constant cfs_reg29_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF74";
constant cfs_reg30_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF78";
constant cfs_reg31_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF7C";
 
-- General Purpose Input/Output Unit (GPIO) --
constant gpio_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF80"; -- base address, fixed!
constant gpio_size_c : natural := 2*4; -- bytes
constant gpio_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF80"; -- base address
constant gpio_size_c : natural := 2*4; -- module's address space in bytes
constant gpio_in_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF80";
constant gpio_out_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF84";
 
-- True Random Number Generator (TRNG) --
constant trng_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF88"; -- base address, fixed!
constant trng_size_c : natural := 1*4; -- bytes
constant trng_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF88"; -- base address
constant trng_size_c : natural := 1*4; -- module's address space in bytes
constant trng_ctrl_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF88";
 
-- Watch Dog Timer (WDT) --
constant wdt_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF8C"; -- base address, fixed!
constant wdt_size_c : natural := 1*4; -- bytes
constant wdt_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF8C"; -- base address
constant wdt_size_c : natural := 1*4; -- module's address space in bytes
constant wdt_ctrl_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF8C";
 
-- Machine System Timer (MTIME) --
constant mtime_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF90"; -- base address, fixed!
constant mtime_size_c : natural := 4*4; -- bytes
constant mtime_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF90"; -- base address
constant mtime_size_c : natural := 4*4; -- module's address space in bytes
constant mtime_time_lo_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF90";
constant mtime_time_hi_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF94";
constant mtime_cmp_lo_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF98";
123,48 → 164,36
constant mtime_cmp_hi_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFF9C";
 
-- Universal Asynchronous Receiver/Transmitter (UART) --
constant uart_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFA0"; -- base address, fixed!
constant uart_size_c : natural := 2*4; -- bytes
constant uart_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFA0"; -- base address
constant uart_size_c : natural := 2*4; -- module's address space in bytes
constant uart_ctrl_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFA0";
constant uart_rtx_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFA4";
 
-- Serial Peripheral Interface (SPI) --
constant spi_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFA8"; -- base address, fixed!
constant spi_size_c : natural := 2*4; -- bytes
constant spi_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFA8"; -- base address
constant spi_size_c : natural := 2*4; -- module's address space in bytes
constant spi_ctrl_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFA8";
constant spi_rtx_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFAC";
 
-- Two Wire Interface (TWI) --
constant twi_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFB0"; -- base address, fixed!
constant twi_size_c : natural := 2*4; -- bytes
constant twi_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFB0"; -- base address
constant twi_size_c : natural := 2*4; -- module's address space in bytes
constant twi_ctrl_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFB0";
constant twi_rtx_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFB4";
 
-- Pulse-Width Modulation Controller (PWM) --
constant pwm_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFB8"; -- base address, fixed!
constant pwm_size_c : natural := 2*4; -- bytes
constant pwm_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFB8"; -- base address
constant pwm_size_c : natural := 2*4; -- module's address space in bytes
constant pwm_ctrl_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFB8";
constant pwm_duty_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFBC";
 
-- Custom Functions Unit 0 (CFU0) --
constant cfu0_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFC0"; -- base address, fixed!
constant cfu0_size_c : natural := 4*4; -- bytes
constant cfu0_reg0_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFC0";
constant cfu0_reg1_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFC4";
constant cfu0_reg2_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFC8";
constant cfu0_reg3_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFCC";
-- reserved --
--constant reserved_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFC0"; -- base address
--constant reserved_size_c : natural := 8*4; -- module's address space in bytes
 
-- Custom Functions Unit 1 (CFU1) --
constant cfu1_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFD0"; -- base address, fixed!
constant cfu1_size_c : natural := 4*4; -- bytes
constant cfu1_reg0_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFD0";
constant cfu1_reg1_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFD4";
constant cfu1_reg2_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFD8";
constant cfu1_reg3_addr_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFDC";
 
-- System Information Memory (SYSINFO) --
constant sysinfo_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFE0"; -- base address, fixed!
constant sysinfo_size_c : natural := 8*4; -- bytes
constant sysinfo_base_c : std_ulogic_vector(data_width_c-1 downto 0) := x"FFFFFFE0"; -- base address
constant sysinfo_size_c : natural := 8*4; -- module's address space in bytes
 
-- Main Control Bus -----------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
243,13 → 272,15
constant ctrl_ir_opcode7_4_c : natural := 66; -- opcode7 bit 4
constant ctrl_ir_opcode7_5_c : natural := 67; -- opcode7 bit 5
constant ctrl_ir_opcode7_6_c : natural := 68; -- opcode7 bit 6
-- CPU status --
constant ctrl_sleep_c : natural := 69; -- set when CPU is in sleep mode
-- control bus size --
constant ctrl_width_c : natural := 69; -- control bus size
constant ctrl_width_c : natural := 70; -- control bus size
 
-- ALU Comparator Bus ---------------------------------------------------------------------
-- Comparator Bus -------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
constant alu_cmp_equal_c : natural := 0;
constant alu_cmp_less_c : natural := 1; -- for signed and unsigned comparisons
constant cmp_equal_c : natural := 0;
constant cmp_less_c : natural := 1; -- for signed and unsigned comparisons
 
-- RISC-V Opcode Layout -------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
668,32 → 699,40
constant trap_firq1_c : std_ulogic_vector(5 downto 0) := "1" & "10001"; -- 1.17: fast interrupt 1
constant trap_firq2_c : std_ulogic_vector(5 downto 0) := "1" & "10010"; -- 1.18: fast interrupt 2
constant trap_firq3_c : std_ulogic_vector(5 downto 0) := "1" & "10011"; -- 1.19: fast interrupt 3
constant trap_firq4_c : std_ulogic_vector(5 downto 0) := "1" & "10100"; -- 1.20: fast interrupt 4
constant trap_firq5_c : std_ulogic_vector(5 downto 0) := "1" & "10101"; -- 1.21: fast interrupt 5
constant trap_firq6_c : std_ulogic_vector(5 downto 0) := "1" & "10110"; -- 1.22: fast interrupt 6
constant trap_firq7_c : std_ulogic_vector(5 downto 0) := "1" & "10111"; -- 1.23: fast interrupt 7
 
-- CPU Control Exception System -----------------------------------------------------------
-- -------------------------------------------------------------------------------------------
-- exception source bits --
constant exception_iaccess_c : natural := 0; -- instrution access fault
constant exception_iillegal_c : natural := 1; -- illegal instrution
constant exception_ialign_c : natural := 2; -- instrution address misaligned
constant exception_m_envcall_c : natural := 3; -- ENV call from m-mode
constant exception_u_envcall_c : natural := 4; -- ENV call from u-mode
constant exception_break_c : natural := 5; -- breakpoint
constant exception_salign_c : natural := 6; -- store address misaligned
constant exception_lalign_c : natural := 7; -- load address misaligned
constant exception_saccess_c : natural := 8; -- store access fault
constant exception_laccess_c : natural := 9; -- load access fault
constant exception_iaccess_c : natural := 0; -- instrution access fault
constant exception_iillegal_c : natural := 1; -- illegal instrution
constant exception_ialign_c : natural := 2; -- instrution address misaligned
constant exception_m_envcall_c : natural := 3; -- ENV call from m-mode
constant exception_u_envcall_c : natural := 4; -- ENV call from u-mode
constant exception_break_c : natural := 5; -- breakpoint
constant exception_salign_c : natural := 6; -- store address misaligned
constant exception_lalign_c : natural := 7; -- load address misaligned
constant exception_saccess_c : natural := 8; -- store access fault
constant exception_laccess_c : natural := 9; -- load access fault
--
constant exception_width_c : natural := 10; -- length of this list in bits
-- interrupt source bits --
constant interrupt_msw_irq_c : natural := 0; -- machine software interrupt
constant interrupt_mtime_irq_c : natural := 1; -- machine timer interrupt
constant interrupt_mext_irq_c : natural := 2; -- machine external interrupt
constant interrupt_firq_0_c : natural := 3; -- fast interrupt channel 0
constant interrupt_firq_1_c : natural := 4; -- fast interrupt channel 1
constant interrupt_firq_2_c : natural := 5; -- fast interrupt channel 2
constant interrupt_firq_3_c : natural := 6; -- fast interrupt channel 3
constant interrupt_msw_irq_c : natural := 0; -- machine software interrupt
constant interrupt_mtime_irq_c : natural := 1; -- machine timer interrupt
constant interrupt_mext_irq_c : natural := 2; -- machine external interrupt
constant interrupt_firq_0_c : natural := 3; -- fast interrupt channel 0
constant interrupt_firq_1_c : natural := 4; -- fast interrupt channel 1
constant interrupt_firq_2_c : natural := 5; -- fast interrupt channel 2
constant interrupt_firq_3_c : natural := 6; -- fast interrupt channel 3
constant interrupt_firq_4_c : natural := 7; -- fast interrupt channel 4
constant interrupt_firq_5_c : natural := 8; -- fast interrupt channel 5
constant interrupt_firq_6_c : natural := 9; -- fast interrupt channel 6
constant interrupt_firq_7_c : natural := 10; -- fast interrupt channel 7
--
constant interrupt_width_c : natural := 7; -- length of this list in bits
constant interrupt_width_c : natural := 11; -- length of this list in bits
 
-- CPU Privilege Modes --------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
756,7 → 795,7
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0; -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0; -- number of implemented HPM counters (0..29)
-- Internal Instruction memory --
MEM_INT_IMEM_EN : boolean := true; -- implement processor-internal instruction memory
MEM_INT_IMEM_SIZE : natural := 16*1024; -- size of processor-internal instruction memory in bytes
780,8 → 819,8
IO_PWM_EN : boolean := true; -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN : boolean := true; -- implement watch dog timer (WDT)?
IO_TRNG_EN : boolean := false; -- implement true random number generator (TRNG)?
IO_CFU0_EN : boolean := false; -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN : boolean := false -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN : boolean := false; -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG : std_ulogic_vector(31 downto 0) := (others => '0') -- custom CFS configuration generic
);
port (
-- Global control --
818,9 → 857,13
twi_scl_io : inout std_logic; -- twi serial clock line
-- PWM --
pwm_o : out std_ulogic_vector(03 downto 0); -- pwm channels
-- Custom Functions Subsystem IO --
cfs_in_i : in std_ulogic_vector(31 downto 0) := (others => '0'); -- custom CSF inputs
cfs_out_o : out std_ulogic_vector(31 downto 0); -- custom CSF outputs
-- system time input from external MTIME (available if IO_MTIME_EN = false) --
mtime_i : in std_ulogic_vector(63 downto 0) := (others => '0'); -- current system time
-- Interrupts --
soc_firq_i : in std_ulogic_vector(3 downto 0) := (others => '0'); -- fast interrupt channels
mtime_irq_i : in std_ulogic := '0'; -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i : in std_ulogic := '0'; -- machine software interrupt
mext_irq_i : in std_ulogic := '0' -- machine external interrupt
851,12 → 894,13
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0 -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0 -- number of implemented HPM counters (0..29)
);
port (
-- global control --
clk_i : in std_ulogic := '0'; -- global clock, rising edge
rstn_i : in std_ulogic := '0'; -- global reset, low-active, async
sleep_o : out std_ulogic; -- cpu is in sleep mode when set
-- instruction bus interface --
i_bus_addr_o : out std_ulogic_vector(data_width_c-1 downto 0); -- bus access address
i_bus_rdata_i : in std_ulogic_vector(data_width_c-1 downto 0) := (others => '0'); -- bus read data
890,7 → 934,8
mext_irq_i : in std_ulogic := '0'; -- machine external interrupt
mtime_irq_i : in std_ulogic := '0'; -- machine timer interrupt
-- fast interrupts (custom) --
firq_i : in std_ulogic_vector(3 downto 0) := (others => '0')
firq_i : in std_ulogic_vector(7 downto 0) := (others => '0');
firq_ack_o : out std_ulogic_vector(7 downto 0)
);
end component;
 
914,7 → 959,7
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0 -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0 -- number of implemented HPM counters (0..29)
);
port (
-- global control --
940,7 → 985,8
mext_irq_i : in std_ulogic; -- machine external interrupt
mtime_irq_i : in std_ulogic; -- machine timer interrupt
-- fast interrupts (custom) --
firq_i : in std_ulogic_vector(3 downto 0);
firq_i : in std_ulogic_vector(7 downto 0);
firq_ack_o : out std_ulogic_vector(7 downto 0);
-- system time input from MTIME --
time_i : in std_ulogic_vector(63 downto 0); -- current system time
-- physical memory protection --
973,7 → 1019,8
csr_i : in std_ulogic_vector(data_width_c-1 downto 0); -- CSR read data
-- data output --
rs1_o : out std_ulogic_vector(data_width_c-1 downto 0); -- operand 1
rs2_o : out std_ulogic_vector(data_width_c-1 downto 0) -- operand 2
rs2_o : out std_ulogic_vector(data_width_c-1 downto 0); -- operand 2
cmp_o : out std_ulogic_vector(1 downto 0) -- comparator status
);
end component;
 
995,7 → 1042,6
pc2_i : in std_ulogic_vector(data_width_c-1 downto 0); -- delayed PC
imm_i : in std_ulogic_vector(data_width_c-1 downto 0); -- immediate
-- data output --
cmp_o : out std_ulogic_vector(1 downto 0); -- comparator status
res_o : out std_ulogic_vector(data_width_c-1 downto 0); -- ALU result
add_o : out std_ulogic_vector(data_width_c-1 downto 0); -- address computation result
-- co-processor interface --
1124,9 → 1170,9
-- -------------------------------------------------------------------------------------------
component neorv32_icache
generic (
CACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
CACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
CACHE_NUM_SETS : natural := 1 -- associativity / number of sets (1=direct_mapped), has to be a power of 2
ICACHE_NUM_BLOCKS : natural := 4; -- number of blocks (min 1), has to be a power of 2
ICACHE_BLOCK_SIZE : natural := 16; -- block size in bytes (min 4), has to be a power of 2
ICACHE_NUM_SETS : natural := 1 -- associativity / number of sets (1=direct_mapped), has to be a power of 2
);
port (
-- global control --
1486,30 → 1532,12
);
end component;
 
-- Component: Custom Functions Unit 0 (CFU0) ----------------------------------------------
-- Component: Custom Functions Subsystem (CFS) --------------------------------------------
-- -------------------------------------------------------------------------------------------
component neorv32_cfu0
port (
-- host access --
clk_i : in std_ulogic; -- global clock line
rstn_i : in std_ulogic; -- global reset line, low-active, use as async
addr_i : in std_ulogic_vector(31 downto 0); -- address
rden_i : in std_ulogic; -- read enable
wren_i : in std_ulogic; -- write enable
data_i : in std_ulogic_vector(31 downto 0); -- data in
data_o : out std_ulogic_vector(31 downto 0); -- data out
ack_o : out std_ulogic; -- transfer acknowledge
-- clock generator --
clkgen_en_o : out std_ulogic; -- enable clock generator
clkgen_i : in std_ulogic_vector(07 downto 0) -- "clock" inputs
-- custom io --
-- ...
component neorv32_cfs
generic (
CFS_CONFIG : std_ulogic_vector(31 downto 0) := (others => '0') -- custom CFS configuration generic
);
end component;
 
-- Component: Custom Functions Unit 1 (CFU1) ----------------------------------------------
-- -------------------------------------------------------------------------------------------
component neorv32_cfu1
port (
-- host access --
clk_i : in std_ulogic; -- global clock line
1516,15 → 1544,22
rstn_i : in std_ulogic; -- global reset line, low-active, use as async
addr_i : in std_ulogic_vector(31 downto 0); -- address
rden_i : in std_ulogic; -- read enable
wren_i : in std_ulogic; -- write enable
wren_i : in std_ulogic; -- word write enable
data_i : in std_ulogic_vector(31 downto 0); -- data in
data_o : out std_ulogic_vector(31 downto 0); -- data out
ack_o : out std_ulogic; -- transfer acknowledge
err_o : out std_ulogic; -- transfer error
-- clock generator --
clkgen_en_o : out std_ulogic; -- enable clock generator
clkgen_i : in std_ulogic_vector(07 downto 0) -- "clock" inputs
-- custom io --
-- ...
clkgen_i : in std_ulogic_vector(07 downto 0); -- "clock" inputs
-- CPU state --
sleep_i : in std_ulogic; -- set if cpu is in sleep mode
-- interrupt --
irq_o : out std_ulogic; -- interrupt request
irq_ack_i : in std_ulogic; -- interrupt acknowledge
-- custom io (conduit) --
cfs_in_i : in std_ulogic_vector(31 downto 0); -- custom inputs
cfs_out_o : out std_ulogic_vector(31 downto 0) -- custom outputs
);
end component;
 
1559,8 → 1594,7
IO_PWM_EN : boolean := true; -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN : boolean := true; -- implement watch dog timer (WDT)?
IO_TRNG_EN : boolean := true; -- implement true random number generator (TRNG)?
IO_CFU0_EN : boolean := true; -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN : boolean := true -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN : boolean := true -- implement custom functions subsystem (CFS)?
);
port (
-- host access --
/rtl/core/neorv32_sysinfo.vhd
1,7 → 1,7
-- #################################################################################################
-- # << NEORV32 - System/Processor Configuration Information Memory (SYSINFO) >> #
-- # ********************************************************************************************* #
-- # This unit provides information regarding the 'processor system' configuration - #
-- # This unit provides information regarding the NEORV32 processor system configuration - #
-- # mostly derived from the top's configuration generics. #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
71,8 → 71,7
IO_PWM_EN : boolean := true; -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN : boolean := true; -- implement watch dog timer (WDT)?
IO_TRNG_EN : boolean := true; -- implement true random number generator (TRNG)?
IO_CFU0_EN : boolean := true; -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN : boolean := true -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN : boolean := true -- implement custom functions subsystem (CFS)?
);
port (
-- host access --
138,11 → 137,10
sysinfo_mem(2)(20) <= bool_to_ulogic_f(IO_TWI_EN); -- two-wire interface (TWI) implemented?
sysinfo_mem(2)(21) <= bool_to_ulogic_f(IO_PWM_EN); -- pulse-width modulation unit (PWM) implemented?
sysinfo_mem(2)(22) <= bool_to_ulogic_f(IO_WDT_EN); -- watch dog timer (WDT) implemented?
sysinfo_mem(2)(23) <= bool_to_ulogic_f(IO_CFU0_EN); -- custom functions unit 0 (CFU0) implemented?
sysinfo_mem(2)(23) <= bool_to_ulogic_f(IO_CFS_EN); -- custom functions subsystem (CFS) implemented?
sysinfo_mem(2)(24) <= bool_to_ulogic_f(IO_TRNG_EN); -- true random number generator (TRNG) implemented?
sysinfo_mem(2)(25) <= bool_to_ulogic_f(IO_CFU1_EN); -- custom functions unit 1 (CFU1) implemented?
--
sysinfo_mem(2)(31 downto 26) <= (others => '0'); -- reserved
sysinfo_mem(2)(31 downto 25) <= (others => '0'); -- reserved
 
-- SYSINFO(3): Cache configuration --
sysinfo_mem(3)(03 downto 00) <= std_ulogic_vector(to_unsigned(index_size_f(ICACHE_BLOCK_SIZE), 4)) when (ICACHE_EN = true) else (others => '0'); -- i-cache: log2(block_size_in_bytes)
/rtl/core/neorv32_top.vhd
68,7 → 68,7
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0; -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0; -- number of implemented HPM counters (0..29)
-- Internal Instruction memory --
MEM_INT_IMEM_EN : boolean := true; -- implement processor-internal instruction memory
MEM_INT_IMEM_SIZE : natural := 16*1024; -- size of processor-internal instruction memory in bytes
92,8 → 92,8
IO_PWM_EN : boolean := true; -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN : boolean := true; -- implement watch dog timer (WDT)?
IO_TRNG_EN : boolean := false; -- implement true random number generator (TRNG)?
IO_CFU0_EN : boolean := false; -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN : boolean := false -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN : boolean := false; -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG : std_ulogic_vector(31 downto 0) := (others => '0') -- custom CFS configuration generic
);
port (
-- Global control --
130,9 → 130,13
twi_scl_io : inout std_logic; -- twi serial clock line
-- PWM (available if IO_PWM_EN = true) --
pwm_o : out std_ulogic_vector(03 downto 0); -- pwm channels
-- Custom Functions Subsystem IO (available if IO_CFS_EN = true) --
cfs_in_i : in std_ulogic_vector(31 downto 0) := (others => '0'); -- custom CFS inputs conduit
cfs_out_o : out std_ulogic_vector(31 downto 0); -- custom CFS outputs conduit
-- system time input from external MTIME (available if IO_MTIME_EN = false) --
mtime_i : in std_ulogic_vector(63 downto 0) := (others => '0'); -- current system time
-- Interrupts --
soc_firq_i : in std_ulogic_vector(3 downto 0) := (others => '0'); -- fast interrupt channels
mtime_irq_i : in std_ulogic := '0'; -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i : in std_ulogic := '0'; -- machine software interrupt
mext_irq_i : in std_ulogic := '0' -- machine external interrupt
165,13 → 169,13
signal clk_div : std_ulogic_vector(11 downto 0);
signal clk_div_ff : std_ulogic_vector(11 downto 0);
signal clk_gen : std_ulogic_vector(07 downto 0);
--
signal wdt_cg_en : std_ulogic;
signal uart_cg_en : std_ulogic;
signal spi_cg_en : std_ulogic;
signal twi_cg_en : std_ulogic;
signal pwm_cg_en : std_ulogic;
signal cfu0_cg_en : std_ulogic;
signal cfu1_cg_en : std_ulogic;
signal cfs_cg_en : std_ulogic;
 
-- bus interface --
type bus_interface_t is record
222,24 → 226,27
signal wdt_ack : std_ulogic;
signal trng_rdata : std_ulogic_vector(data_width_c-1 downto 0);
signal trng_ack : std_ulogic;
signal cfu0_rdata : std_ulogic_vector(data_width_c-1 downto 0);
signal cfu0_ack : std_ulogic;
signal cfu1_rdata : std_ulogic_vector(data_width_c-1 downto 0);
signal cfu1_ack : std_ulogic;
signal cfs_rdata : std_ulogic_vector(data_width_c-1 downto 0);
signal cfs_err : std_ulogic;
signal cfs_ack : std_ulogic;
signal sysinfo_rdata : std_ulogic_vector(data_width_c-1 downto 0);
signal sysinfo_ack : std_ulogic;
 
-- IRQs --
signal mtime_irq : std_ulogic;
signal fast_irq : std_ulogic_vector(3 downto 0);
signal gpio_irq : std_ulogic;
signal wdt_irq : std_ulogic;
signal uart_irq : std_ulogic;
signal spi_irq : std_ulogic;
signal twi_irq : std_ulogic;
--
signal fast_irq : std_ulogic_vector(7 downto 0);
signal fast_irq_ack : std_ulogic_vector(7 downto 0);
signal gpio_irq : std_ulogic;
signal wdt_irq : std_ulogic;
signal uart_irq : std_ulogic;
signal spi_irq : std_ulogic;
signal twi_irq : std_ulogic;
signal cfs_irq : std_ulogic;
 
-- misc --
signal mtime_time : std_ulogic_vector(63 downto 0); -- current system time from MTIME
signal cpu_sleep : std_ulogic; -- CPU is in sleep mode when set
 
begin
 
305,7 → 312,7
clk_div_ff <= (others => '0');
elsif rising_edge(clk_i) then
-- fresh clocks anyone? --
if ((wdt_cg_en or uart_cg_en or spi_cg_en or twi_cg_en or pwm_cg_en or cfu0_cg_en or cfu1_cg_en) = '1') then
if ((wdt_cg_en or uart_cg_en or spi_cg_en or twi_cg_en or pwm_cg_en or cfs_cg_en) = '1') then
clk_div <= std_ulogic_vector(unsigned(clk_div) + 1);
end if;
clk_div_ff <= clk_div;
352,12 → 359,13
PMP_NUM_REGIONS => PMP_NUM_REGIONS, -- number of regions (0..64)
PMP_MIN_GRANULARITY => PMP_MIN_GRANULARITY, -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS => HPM_NUM_CNTS -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS => HPM_NUM_CNTS -- number of implemented HPM counters (0..29)
)
port map (
-- global control --
clk_i => clk_i, -- global clock, rising edge
rstn_i => sys_rstn, -- global reset, low-active, async
sleep_o => cpu_sleep, -- cpu is in sleep mode when set
-- instruction bus interface --
i_bus_addr_o => cpu_i.addr, -- bus access address
i_bus_rdata_i => cpu_i.rdata, -- bus read data
391,7 → 399,8
mext_irq_i => mext_irq_i, -- machine external interrupt request
mtime_irq_i => mtime_irq, -- machine timer interrupt
-- fast interrupts (custom) --
firq_i => fast_irq
firq_i => fast_irq, -- fast interrupt trigger
firq_ack_o => fast_irq_ack -- fast interrupt acknowledge mask
);
 
-- misc --
402,11 → 411,16
fence_o <= cpu_d.fence; -- indicates an executed FENCE operation
fencei_o <= cpu_i.fence; -- indicates an executed FENCEI operation
 
-- fast interrupts --
fast_irq(0) <= wdt_irq; -- highest priority, watchdog timeout interrupt
fast_irq(1) <= gpio_irq; -- GPIO input pin-change interrupt
fast_irq(2) <= uart_irq; -- UART TX done or RX complete interrupt
fast_irq(3) <= spi_irq or twi_irq; -- lowest priority, can be triggered by SPI or TWI
-- fast interrupts - processor-internal --
fast_irq(0) <= wdt_irq; -- highest priority, watchdog timeout interrupt
fast_irq(1) <= gpio_irq or cfs_irq; -- GPIO input pin-change interrupt or custom CFS interrupt
fast_irq(2) <= uart_irq; -- UART TX done or RX complete interrupt
fast_irq(3) <= spi_irq or twi_irq; -- lowest priority, can be triggered by SPI or TWI
-- fast interrupts - platform level (for cutsom use) --
fast_irq(4) <= soc_firq_i(0);
fast_irq(5) <= soc_firq_i(1);
fast_irq(6) <= soc_firq_i(2);
fast_irq(7) <= soc_firq_i(3);
 
 
-- CPU Instruction Cache ------------------------------------------------------------------
415,9 → 429,9
if (ICACHE_EN = true) generate
neorv32_icache_inst: neorv32_icache
generic map (
CACHE_NUM_BLOCKS => ICACHE_NUM_BLOCKS, -- number of blocks (min 2), has to be a power of 2
CACHE_BLOCK_SIZE => ICACHE_BLOCK_SIZE, -- block size in bytes (min 4), has to be a power of 2
CACHE_NUM_SETS => ICACHE_ASSOCIATIVITY -- associativity / number of sets (1=direct_mapped), has to be a power of 2
ICACHE_NUM_BLOCKS => ICACHE_NUM_BLOCKS, -- number of blocks (min 2), has to be a power of 2
ICACHE_BLOCK_SIZE => ICACHE_BLOCK_SIZE, -- block size in bytes (min 4), has to be a power of 2
ICACHE_NUM_SETS => ICACHE_ASSOCIATIVITY -- associativity / number of sets (1=direct_mapped), has to be a power of 2
)
port map (
-- global control --
513,14 → 527,14
 
-- processor bus: CPU data input --
p_bus.rdata <= (imem_rdata or dmem_rdata or bootrom_rdata) or wishbone_rdata or (gpio_rdata or mtime_rdata or uart_rdata or
spi_rdata or twi_rdata or pwm_rdata or wdt_rdata or trng_rdata or cfu0_rdata or cfu1_rdata or sysinfo_rdata);
spi_rdata or twi_rdata or pwm_rdata or wdt_rdata or trng_rdata or cfs_rdata or sysinfo_rdata);
 
-- processor bus: CPU data ACK input --
p_bus.ack <= (imem_ack or dmem_ack or bootrom_ack) or wishbone_ack or (gpio_ack or mtime_ack or uart_ack or
spi_ack or twi_ack or pwm_ack or wdt_ack or trng_ack or cfu0_ack or cfu1_ack or sysinfo_ack);
spi_ack or twi_ack or pwm_ack or wdt_ack or trng_ack or cfs_ack or sysinfo_ack);
 
-- processor bus: CPU data bus error input --
p_bus.err <= wishbone_err;
p_bus.err <= wishbone_err or cfs_err;
 
-- current CPU privilege level --
p_bus.priv <= cpu_i.priv; -- cpu_i.priv == cpu_d.priv
676,10 → 690,54
-- -------------------------------------------------------------------------------------------
io_acc <= '1' when (p_bus.addr(data_width_c-1 downto index_size_f(io_size_c)) = io_base_c(data_width_c-1 downto index_size_f(io_size_c))) else '0';
io_rden <= io_acc and p_bus.re and (not p_bus.src); -- PMA: no_execute for IO region
-- the peripheral/IO devices in the IO area can only be written in word mode (reduces HW complexity)
io_wren <= io_acc and p_bus.we and and_all_f(p_bus.ben) and (not p_bus.src); -- PMA: no_execute for IO region
-- the default NEORV32 peripheral/IO devices in the IO area can only be written in word mode (reduces HW complexity)
io_wren <= io_acc and p_bus.we and and_all_f(p_bus.ben) and (not p_bus.src); -- PMA: write32 only, no_execute for IO region
 
 
-- Custom Functions Subsystem (CFS) -------------------------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_cfs_inst_true:
if (IO_CFS_EN = true) generate
neorv32_cfs_inst: neorv32_cfs
generic map (
CFS_CONFIG => IO_CFS_CONFIG -- custom CFS configuration generic
)
port map (
-- host access --
clk_i => clk_i, -- global clock line
rstn_i => sys_rstn, -- global reset line, low-active, use as async
addr_i => p_bus.addr, -- address
rden_i => io_rden, -- read enable
wren_i => io_wren, -- byte write enable
data_i => p_bus.wdata, -- data in
data_o => cfs_rdata, -- data out
ack_o => cfs_ack, -- transfer acknowledge
err_o => cfs_err, -- transfer error
-- clock generator --
clkgen_en_o => cfs_cg_en, -- enable clock generator
clkgen_i => clk_gen, -- "clock" inputs
-- CPU state --
sleep_i => cpu_sleep, -- set if cpu is in sleep mode
-- interrupt --
irq_o => cfs_irq, -- interrupt request
irq_ack_i => fast_irq_ack(1), -- interrupt acknowledge
-- custom io (conduit) --
cfs_in_i => cfs_in_i, -- custom inputs
cfs_out_o => cfs_out_o -- custom outputs
);
end generate;
 
neorv32_cfs_inst_false:
if (IO_CFS_EN = false) generate
cfs_rdata <= (others => '0');
cfs_ack <= '0';
cfs_err <= '0';
cfs_cg_en <= '0';
cfs_irq <= '0';
cfs_out_o <= (others => '0');
end generate;
 
 
-- General Purpose Input/Output Port (GPIO) -----------------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_gpio_inst_true:
941,68 → 999,6
end generate;
 
 
-- Custom Functions Unit 0 (CFU0) ---------------------------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_cfu0_inst_true:
if (IO_CFU0_EN = true) generate
neorv32_cfu0_inst: neorv32_cfu0
port map (
-- host access --
clk_i => clk_i, -- global clock line
rstn_i => sys_rstn, -- global reset line, low-active, use as async
addr_i => p_bus.addr, -- address
rden_i => io_rden, -- read enable
wren_i => io_wren, -- write enable
data_i => p_bus.wdata, -- data in
data_o => cfu0_rdata, -- data out
ack_o => cfu0_ack, -- transfer acknowledge
-- clock generator --
clkgen_en_o => cfu0_cg_en, -- enable clock generator
clkgen_i => clk_gen -- "clock" inputs
-- custom io --
-- ...
);
end generate;
 
neorv32_cfu0_inst_false:
if (IO_CFU0_EN = false) generate
cfu0_rdata <= (others => '0');
cfu0_ack <= '0';
cfu0_cg_en <= '0';
end generate;
 
 
-- Custom Functions Unit 1 (CFU1) ---------------------------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_cfu1_inst_true:
if (IO_CFU1_EN = true) generate
neorv32_cfu1_inst: neorv32_cfu1
port map (
-- host access --
clk_i => clk_i, -- global clock line
rstn_i => sys_rstn, -- global reset line, low-active, use as async
addr_i => p_bus.addr, -- address
rden_i => io_rden, -- read enable
wren_i => io_wren, -- write enable
data_i => p_bus.wdata, -- data in
data_o => cfu1_rdata, -- data out
ack_o => cfu1_ack, -- transfer acknowledge
-- clock generator --
clkgen_en_o => cfu1_cg_en, -- enable clock generator
clkgen_i => clk_gen -- "clock" inputs
-- custom io --
-- ...
);
end generate;
 
neorv32_cfu1_inst_false:
if (IO_CFU1_EN = false) generate
cfu1_rdata <= (others => '0');
cfu1_ack <= '0';
cfu1_cg_en <= '0';
end generate;
 
 
-- System Configuration Information Memory (SYSINFO) --------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_sysinfo_inst: neorv32_sysinfo
1034,8 → 1030,7
IO_PWM_EN => IO_PWM_EN, -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN => IO_WDT_EN, -- implement watch dog timer (WDT)?
IO_TRNG_EN => IO_TRNG_EN, -- implement true random number generator (TRNG)?
IO_CFU0_EN => IO_CFU0_EN, -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN => IO_CFU1_EN -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN => IO_CFS_EN -- implement custom functions subsystem (CFS)?
)
port map (
-- host access --
/rtl/core/neorv32_trng.vhd
1,17 → 1,14
-- #################################################################################################
-- # << NEORV32 - True Random Number Generator (TRNG) >> #
-- # ********************************************************************************************* #
-- # This unit implements a true random number generator which uses several GARO chain as entropy #
-- # source. The outputs of all chains are XORed and de-biased using a John von Neumann randomness #
-- # extractor. The de-biased signal is further processed by a simple LFSR for improved whitening. #
-- # #
-- # Sources: #
-- # - Von Neumann De-Biasing: "Iterating Von Neumann's Post-Processing under Hardware #
-- # Constraints" by Vladimir Rozic, Bohan Yang, Wim Dehaene and Ingrid Verbauwhede, 2016 #
-- # This unit implements a *true* random number generator which uses several ring oscillators as #
-- # entropy source. The outputs of all chains are XORed and de-biased using a John von Neumann #
-- # randomness extractor. The de-biased signal is further processed by a simple LFSR for improved #
-- # whitening. #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
-- # Copyright (c) 2020, Stephan Nolting. All rights reserved. #
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
-- # #
-- # Redistribution and use in source and binary forms, with or without modification, are #
-- # permitted provided that the following conditions are met: #
62,43 → 59,35
 
architecture neorv32_trng_rtl of neorv32_trng is
 
-- advanced configuration --------------------------------------------------------------------------------
constant num_inv_c : natural := 15; -- length of GARO inverter chain (default=15, has to be odd)
constant num_garos_c : natural := 2; -- number of GARO elements (default=2)
constant lfsr_taps_c : std_ulogic_vector(7 downto 0) := "10111000"; -- Fibonacci post-processing LFSR feedback taps
constant lfsr_en_c : boolean := true; -- use LFSR-based post-processing
type tap_mask_t is array (0 to num_garos_c-1) of std_ulogic_vector(num_inv_c-2 downto 0);
constant tap_mask : tap_mask_t := ( -- GARO tap masks, sum of set bits has to be even
"11110000000000",
"00000011000000"
);
-- Advanced Configuration --------------------------------------------------------------------------------
constant num_roscs_c : natural := 4; -- total number of ring oscillators
constant num_inv_start_c : natural := 5; -- number of inverters in FIRST ring oscillator (has to be odd)
constant num_inv_inc_c : natural := 2; -- number of inverters increment for each next ring oscillator (has to be even)
constant lfsr_en_c : boolean := true; -- use LFSR-based post-processing
constant lfsr_taps_c : std_ulogic_vector(7 downto 0) := "10111000"; -- Fibonacci post-processing LFSR feedback taps
-- -------------------------------------------------------------------------------------------------------
 
-- control register bits --
constant ctrl_data_lsb_c : natural := 0; -- r/-: Random data bit LSB
constant ctrl_data_msb_c : natural := 7; -- r/-: Random data bit MSB
constant ctrl_data_valid_c : natural := 15; -- r/-: Output data valid
constant ctrl_err_zero_c : natural := 16; -- r/-: stuck at 0 error
constant ctrl_err_one_c : natural := 17; -- r/-: stuck at 1 error
constant ctrl_en_c : natural := 31; -- r/w: TRNG enable
constant ctrl_data_lsb_c : natural := 0; -- r/-: Random data byte LSB
constant ctrl_data_msb_c : natural := 7; -- r/-: Random data byte MSB
--
constant ctrl_en_c : natural := 30; -- r/w: TRNG enable
constant ctrl_valid_c : natural := 31; -- r/-: Output data valid
 
-- IO space: module base address --
constant hi_abb_c : natural := index_size_f(io_size_c)-1; -- high address boundary bit
constant lo_abb_c : natural := index_size_f(trng_size_c); -- low address boundary bit
 
-- Component: GARO Element --
component neorv32_trng_garo_element
-- Component: Ring-Oscillator --
component neorv32_trng_ring_osc
generic (
NUM_INV : natural := 16 -- number of inverters in chain
);
port (
clk_i : in std_ulogic;
enable_i : in std_ulogic;
enable_o : out std_ulogic;
mask_i : in std_ulogic_vector(NUM_INV-2 downto 0);
data_o : out std_ulogic;
error0_o : out std_ulogic;
error1_o : out std_ulogic
enable_i : in std_ulogic; -- enable chain input
enable_o : out std_ulogic; -- enable chain output
data_o : out std_ulogic -- sync random bit
);
end component;
 
107,35 → 96,38
signal wren : std_ulogic; -- full word write enable
signal rden : std_ulogic; -- read enable
 
-- garo array --
signal garo_en_in : std_ulogic_vector(num_garos_c-1 downto 0);
signal garo_en_out : std_ulogic_vector(num_garos_c-1 downto 0);
signal garo_data : std_ulogic_vector(num_garos_c-1 downto 0);
signal garo_err_zero : std_ulogic_vector(num_garos_c-1 downto 0);
signal garo_err_one : std_ulogic_vector(num_garos_c-1 downto 0);
signal garo_res : std_ulogic;
signal garo_err0 : std_ulogic;
signal garo_err1 : std_ulogic;
-- ring-oscillator array --
signal osc_array_en_in : std_ulogic_vector(num_roscs_c-1 downto 0);
signal osc_array_en_out : std_ulogic_vector(num_roscs_c-1 downto 0);
signal osc_array_data : std_ulogic_vector(num_roscs_c-1 downto 0);
 
-- de-biasing --
signal db_data : std_ulogic_vector(2 downto 0);
signal db_state : std_ulogic; -- process de-biasing every second cycle
signal rnd_valid : std_ulogic;
signal rnd_data : std_ulogic;
-- von-Neumann de-biasing --
type debiasing_t is record
sreg : std_ulogic_vector(1 downto 0);
state : std_ulogic; -- process de-biasing every second cycle
valid : std_ulogic; -- de-biased data
data : std_ulogic; -- de-biased data valid
end record;
signal debiasing : debiasing_t;
 
-- processing core --
signal rnd_enable : std_ulogic;
signal rnd_cnt : std_ulogic_vector(3 downto 0);
signal rnd_sreg : std_ulogic_vector(7 downto 0);
signal rnd_output : std_ulogic_vector(7 downto 0);
signal rnd_ready : std_ulogic;
-- (post-)processing core --
type processing_t is record
enable : std_ulogic; -- TRNG enable flag
cnt : std_ulogic_vector(3 downto 0); -- bit counter
sreg : std_ulogic_vector(7 downto 0); -- data shift register
output : std_ulogic_vector(7 downto 0); -- output register
valid : std_ulogic; -- data output valid flag
end record;
signal processing : processing_t;
 
-- health check --
signal rnd_error_zero : std_ulogic; -- stuck at zero
signal rnd_error_one : std_ulogic; -- stuck at one
 
begin
 
-- Sanity Checks --------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
assert not (num_roscs_c = 0) report "NEORV32 PROCESSOR CONFIG NOTE: TRNG - Total number of ring-oscillators has to be >0." severity error;
assert not ((num_inv_start_c mod 2) = 0) report "NEORV32 PROCESSOR CONFIG NOTE: TRNG - Number of inverters in fisrt ring has to be odd." severity error;
assert not ((num_inv_inc_c mod 2) /= 0) report "NEORV32 PROCESSOR CONFIG NOTE: TRNG - Number of inverters increment for each next ring has to be even." severity error;
 
-- Access Control -------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
acc_en <= '1' when (addr_i(hi_abb_c downto lo_abb_c) = trng_base_c(hi_abb_c downto lo_abb_c)) else '0';
148,19 → 140,17
rw_access: process(clk_i)
begin
if rising_edge(clk_i) then
ack_o <= acc_en and (rden_i or wren_i);
ack_o <= wren or rden;
-- write access --
if (wren = '1') then
rnd_enable <= data_i(ctrl_en_c);
processing.enable <= data_i(ctrl_en_c);
end if;
-- read access --
data_o <= (others => '0');
if (rden = '1') then
data_o(ctrl_data_msb_c downto ctrl_data_lsb_c) <= rnd_output;
data_o(ctrl_data_valid_c) <= rnd_ready;
data_o(ctrl_err_zero_c) <= rnd_error_zero;
data_o(ctrl_err_one_c) <= rnd_error_one;
data_o(ctrl_en_c) <= rnd_enable;
data_o(ctrl_data_msb_c downto ctrl_data_lsb_c) <= processing.output;
data_o(ctrl_en_c) <= processing.enable;
data_o(ctrl_valid_c) <= processing.valid;
end if;
end if;
end process rw_access;
168,75 → 158,55
 
-- Entropy Source -------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
neorv32_trng_garo_element_inst:
for i in 0 to num_garos_c-1 generate
neorv32_trng_garo_element_inst_i: neorv32_trng_garo_element
neorv32_trng_ring_osc_inst:
for i in 0 to num_roscs_c-1 generate
neorv32_trng_ring_osc_inst_i: neorv32_trng_ring_osc
generic map (
NUM_INV => num_inv_c -- number of inverters in chain
NUM_INV => num_inv_start_c + (i*num_inv_inc_c) -- number of inverters in chain
)
port map (
clk_i => clk_i,
enable_i => garo_en_in(i),
enable_o => garo_en_out(i),
mask_i => tap_mask(i),
data_o => garo_data(i),
error0_o => garo_err_zero(i),
error1_o => garo_err_one(i)
enable_i => osc_array_en_in(i),
enable_o => osc_array_en_out(i),
data_o => osc_array_data(i)
);
end generate;
 
-- GARO element connection --
garo_intercon: process(rnd_enable, garo_en_out, garo_data, garo_err_zero, garo_err_one)
variable data_v : std_ulogic;
variable err0_v : std_ulogic;
variable err1_v : std_ulogic;
-- RO enable chain --
array_intercon: process(processing.enable, osc_array_en_out)
begin
-- enable chain --
for i in 0 to num_garos_c-1 loop
if (i = 0) then
garo_en_in(i) <= rnd_enable;
for i in 0 to num_roscs_c-1 loop
if (i = 0) then -- start of enable chain
osc_array_en_in(i) <= processing.enable;
else
garo_en_in(i) <= garo_en_out(i-1);
osc_array_en_in(i) <= osc_array_en_out(i-1);
end if;
end loop; -- i
-- data & status --
data_v := garo_data(0);
err0_v := garo_err_zero(0);
err1_v := garo_err_one(0);
for i in 1 to num_garos_c-1 loop
data_v := data_v xor garo_data(i);
err0_v := err0_v or garo_err_zero(i);
err1_v := err1_v or garo_err_one(i);
end loop; -- i
garo_res <= data_v;
garo_err0 <= err0_v;
garo_err1 <= err1_v;
end process garo_intercon;
end process array_intercon;
 
 
-- De-Biasing -----------------------------------------------------------------------------
-- John von Neumann De-Biasing ------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
jvn_debiasing_sync: process(clk_i)
neumann_debiasing_sync: process(clk_i)
begin
if rising_edge(clk_i) then
db_data <= db_data(db_data'left-1 downto 0) & garo_res;
db_state <= (not db_state) and rnd_enable; -- just toggle when enabled -> process in every second cycle
debiasing.sreg <= debiasing.sreg(debiasing.sreg'left-1 downto 0) & xor_all_f(osc_array_data);
debiasing.state <= (not debiasing.state) and osc_array_en_out(num_roscs_c-1); -- start toggling when last RO is enabled -> process in every second cycle
end if;
end process jvn_debiasing_sync;
end process neumann_debiasing_sync;
 
 
-- John von Neumann De-Biasing --
jvn_debiasing: process(db_state, db_data)
-- Edge detector --
neumann_debiasing_comb: process(debiasing)
variable tmp_v : std_ulogic_vector(2 downto 0);
begin
-- check groups of two non-overlapping bits from the input stream
tmp_v := db_state & db_data(db_data'left downto db_data'left-1);
tmp_v := debiasing.state & debiasing.sreg;
case tmp_v is
when "101" => rnd_valid <= '1'; rnd_data <= '1'; -- rising edge -> '1'
when "110" => rnd_valid <= '1'; rnd_data <= '0'; -- falling edge -> '0'
when others => rnd_valid <= '0'; rnd_data <= '-'; -- invalid
when "101" => debiasing.valid <= '1'; debiasing.data <= '1'; -- rising edge -> '1'
when "110" => debiasing.valid <= '1'; debiasing.data <= '0'; -- falling edge -> '0'
when others => debiasing.valid <= '0'; debiasing.data <= '0'; -- no valid data
end case;
end process jvn_debiasing;
end process neumann_debiasing_comb;
 
 
-- Processing Core ------------------------------------------------------------------------
244,43 → 214,34
processing_core: process(clk_i)
begin
if rising_edge(clk_i) then
-- sample random data and apply post-processing --
if (rnd_enable = '0') then
rnd_cnt <= (others => '0');
rnd_sreg <= (others => '0');
elsif (rnd_valid = '1') and (garo_en_out(garo_en_out'left) = '1') then -- valid random sample and GAROs ready?
if (rnd_cnt = "1000") then
rnd_cnt <= (others => '0');
-- sample random data bit and apply post-processing --
if (processing.enable = '0') then
processing.cnt <= (others => '0');
processing.sreg <= (others => '0');
elsif (debiasing.valid = '1') then -- valid random sample?
if (processing.cnt = "1000") then
processing.cnt <= (others => '0');
else
rnd_cnt <= std_ulogic_vector(unsigned(rnd_cnt) + 1);
processing.cnt <= std_ulogic_vector(unsigned(processing.cnt) + 1);
end if;
if (lfsr_en_c = true) then -- LFSR post-processing
rnd_sreg <= rnd_sreg(rnd_sreg'left-1 downto 0) & (xnor_all_f(rnd_sreg and lfsr_taps_c) xnor rnd_data);
processing.sreg <= processing.sreg(processing.sreg'left-1 downto 0) & (xnor_all_f(processing.sreg and lfsr_taps_c) xnor debiasing.data);
else -- NO post-processing
rnd_sreg <= rnd_sreg(rnd_sreg'left-1 downto 0) & rnd_data;
processing.sreg <= processing.sreg(processing.sreg'left-1 downto 0) & debiasing.data;
end if;
end if;
 
-- data output register --
if (rnd_cnt = "1000") then
rnd_output <= rnd_sreg;
if (processing.cnt = "1000") then
processing.output <= processing.sreg;
end if;
 
-- health check error --
if (rnd_enable = '0') then
rnd_error_zero <= '0';
rnd_error_one <= '0';
else
rnd_error_zero <= rnd_error_zero or garo_err0;
rnd_error_one <= rnd_error_one or garo_err1;
-- data ready/valid flag --
if (processing.cnt = "1000") then -- new sample ready?
processing.valid <= '1';
elsif (processing.enable = '0') or (rden = '1') then -- clear when deactivated or on data read
processing.valid <= '0';
end if;
 
-- data ready flag --
if (rnd_cnt = "1000") then -- new sample ready?
rnd_ready <= '1';
elsif (rnd_enable = '0') or (rden = '1') then -- clear when deactivated or on data read
rnd_ready <= '0';
end if;
end if;
end process processing_core;
 
293,25 → 254,18
 
 
-- #################################################################################################
-- # << NEORV32 - True Random Number Generator (TRNG) - GARO Chain-Based Entropy Source >> #
-- # << NEORV32 - True Random Number Generator (TRNG) - Ring-Oscillator-Based Entropy Source >> #
-- # ********************************************************************************************* #
-- # An inverter chain (ring oscillator) is used as entropy source. The inverter chain is #
-- # constructed as GARO (Galois Ring Oscillator) TRNG, which is an "asynchronous" LFSR. The #
-- # single inverters are connected via latches that are used to enbale/disable the TRNG. Also, #
-- # these latches are used as additional delay element. By using unique enable signals for each #
-- # latch, the synthesis tool cannot "optimize" (=remove) any of the inverters out of the design. #
-- # Furthermore, the latches prevent the synthesis tool from detecting combinatorial loops. #
-- # #
-- # Sources: #
-- # - GARO: "Experimental Assessment of FIRO- and GARO-based Noise Sources for Digital TRNG #
-- # Designs on FPGAs" by Martin Schramm, Reiner Dojen and Michael Heigly, 2017 #
-- # - Latches for platform independence: "Extended Abstract: The Butterfly PUF Protecting IP #
-- # on every FPGA" by Sandeep S. Kumar, Jorge Guajardo, Roel Maesyz, Geert-Jan Schrijen and #
-- # Pim Tuyls, Philips Research Europe, 2008 #
-- # An inverter chain (ring oscillator) is used as entropy source. #
-- # The inverter chain is constructed as an "asynchronous" LFSR. The single inverters are #
-- # connected via latches that are used to enable/disable the TRNG. Also, these latches are used #
-- # as additional delay element. By using unique enable signals for each latch, the synthesis #
-- # tool cannot "optimize" (=remove) any of the inverters out of the design. Furthermore, the #
-- # latches prevent the synthesis tool from detecting combinatorial loops. #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
-- # Copyright (c) 2020, Stephan Nolting. All rights reserved. #
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
-- # #
-- # Redistribution and use in source and binary forms, with or without modification, are #
-- # permitted provided that the following conditions are met: #
347,71 → 301,51
library neorv32;
use neorv32.neorv32_package.all;
 
entity neorv32_trng_garo_element is
entity neorv32_trng_ring_osc is
generic (
NUM_INV : natural := 15 -- number of inverters in chain
);
port (
clk_i : in std_ulogic;
enable_i : in std_ulogic;
enable_o : out std_ulogic;
mask_i : in std_ulogic_vector(NUM_INV-2 downto 0);
data_o : out std_ulogic;
error0_o : out std_ulogic;
error1_o : out std_ulogic
enable_i : in std_ulogic; -- enable chain input
enable_o : out std_ulogic; -- enable chain output
data_o : out std_ulogic -- sync random bit
);
end neorv32_trng_garo_element;
end neorv32_trng_ring_osc;
 
architecture neorv32_trng_garo_element_rtl of neorv32_trng_garo_element is
architecture neorv32_trng_ring_osc_rtl of neorv32_trng_ring_osc is
 
-- debugging --
constant is_sim_c : boolean := false;
 
signal inv_chain : std_ulogic_vector(NUM_INV-1 downto 0); -- oscillator chain
signal enable_sreg : std_ulogic_vector(NUM_INV-1 downto 0); -- enable shift register
signal sync_ff : std_ulogic_vector(2 downto 0); -- synchronizer
signal sync_ff : std_ulogic_vector(1 downto 0); -- output signal synchronizer
 
signal cnt_zero, cnt_one : std_ulogic_vector(5 downto 0); -- stuck-at-0/1 counters
 
begin
 
-- Sanity Check ---------------------------------------------------------------------------
-- Sanity Checks --------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
assert ((NUM_INV mod 2) /= 0) report "NEORV32 TRNG.GARO_element: NUM_INV has to be odd." severity error;
assert not ((NUM_INV mod 2) = 0) report "NEORV32 PROCESSOR CONFIG NOTE: TNRG.ring_oscillator - Number of inverters in ring has to be odd." severity error;
 
 
-- Entropy Source -------------------------------------------------------------------------
-- Ring Oscillator ------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
garo_chain: process(clk_i, enable_i, enable_sreg, mask_i, inv_chain)
ring_osc: process(enable_i, enable_sreg, inv_chain)
begin
if (is_sim_c = false) then
for i in 0 to NUM_INV-1 loop -- inverters in chain
if (enable_i = '0') then -- start with a defined state (latch reset)
inv_chain(i) <= '0';
-- Using individual enable signals for each inverter - derived from a shift register - to prevent the synthesis tool
-- from removing all but one inverter (since they implement "logical identical functions").
-- This also allows to make the TRNG platform independent.
elsif (enable_sreg(i) = '1') then
-- here we have the inverter chain --
if (i = NUM_INV-1) then -- left-most inverter?
inv_chain(i) <= not inv_chain(0); -- direct input of right most inverter (= output signal)
else
-- if tap switch is ON: use final output XORed with previous inverter's output
-- if tap switch is OFF: just use previous inverter's output
inv_chain(i) <= not (inv_chain(i+1) xor (inv_chain(0) and mask_i(i)));
end if;
end if;
end loop; -- i
else -- simulate as simple LFSR
if rising_edge(clk_i) then
if (enable_i = '0') then
inv_chain <= (others => '0');
-- Using individual enable signals for each inverter - derived from a shift register - to prevent the synthesis tool
-- from removing all but one inverter (since they implement "logical identical functions").
-- This also allows to make the TRNG platform independent.
for i in 0 to NUM_INV-1 loop -- inverters in chain
if (enable_i = '0') then -- start with a defined state (latch reset)
inv_chain(i) <= '0';
elsif (enable_sreg(i) = '1') then
-- here we have the inverter chain --
if (i = NUM_INV-1) then -- left-most inverter?
inv_chain(i) <= not inv_chain(0);
else
inv_chain(NUM_INV-1 downto 0) <= inv_chain(inv_chain'left-1 downto 0) & xnor_all_f(inv_chain(NUM_INV-2 downto 0) and mask_i);
inv_chain(i) <= not inv_chain(i+1);
end if;
end if;
end if;
end process garo_chain;
end loop; -- i
end process ring_osc;
 
 
-- Control --------------------------------------------------------------------------------
420,7 → 354,7
begin
if rising_edge(clk_i) then
enable_sreg <= enable_sreg(enable_sreg'left-1 downto 0) & enable_i; -- activate right-most inverter first
sync_ff <= sync_ff(sync_ff'left-1 downto 0) & inv_chain(0); -- synchronize to prevent metastability
sync_ff <= sync_ff(0) & inv_chain(0); -- synchronize to prevent metastability
end if;
end process ctrl_unit;
 
428,43 → 362,7
enable_o <= enable_sreg(enable_sreg'left);
 
-- rnd output --
data_o <= sync_ff(sync_ff'left);
data_o <= sync_ff(1);
 
 
-- Health Check ---------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
health_check: process(clk_i)
begin
if rising_edge(clk_i) then
if (enable_sreg(enable_sreg'left) = '0') then
cnt_zero <= (others => '0');
cnt_one <= (others => '0');
else
-- stuck-at-zero --
if (and_all_f(cnt_zero) = '0') then -- max not reached yet
error0_o <= '0';
if (sync_ff(sync_ff'left) = '0') then
cnt_zero <= std_ulogic_vector(unsigned(cnt_zero) + 1);
else
cnt_zero <= (others => '0');
end if;
else
error0_o <= '1';
end if;
-- stuck-at-one --
if (and_all_f(cnt_one) = '0') then -- max not reached yet
error1_o <= '0';
if (sync_ff(sync_ff'left) = '1') then
cnt_one <= std_ulogic_vector(unsigned(cnt_one) + 1);
else
cnt_one <= (others => '0');
end if;
else
error1_o <= '1';
end if;
end if;
end if;
end process health_check;
 
 
end neorv32_trng_garo_element_rtl;
end neorv32_trng_ring_osc_rtl;
/rtl/core/neorv32_wdt.vhd
1,12 → 1,13
-- #################################################################################################
-- # << NEORV32 - Watch Dog Timer (WDT) >> #
-- # ********************************************************************************************* #
-- # The internal counter is 20 bit wide and increases using 1 out of 8 available clock #
-- # prescalers. When the counter overflows, either a hardware reset (mode = 1) is performed or an #
-- # interrupt (mode = 0) is triggered. The WDT can only operate when the enable bit is set. A #
-- # write access to the WDT can only be performed, if the higher byte of the written data #
-- # contains the specific WDT password (0x47). For a write access with a wrong password #
-- # a HW reset or IRQ (depending on mode) is triggered, but only if the WDT is enabled. #
-- # Watchdog counter to trigger an action if the CPU gets stuck. #
-- # The internal counter is 20-bit wide. If this counter overflows one of two possible actions is #
-- # triggered: Generate an IRQ or force a hardware reset of the system. #
-- # A WDT action can also be triggered manually at any time by setting the FORCE bit. #
-- # #
-- # Access to the control register can be permanently locked by setting the lock bit. This bit #
-- # can only be cleared by a hardware reset (external or caused by the watchdog itself). #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License #
-- # #
72,136 → 73,152
constant hi_abb_c : natural := index_size_f(io_size_c)-1; -- high address boundary bit
constant lo_abb_c : natural := index_size_f(wdt_size_c); -- low address boundary bit
 
-- Watchdog access password --
constant wdt_password_c : std_ulogic_vector(07 downto 0) := x"47";
 
-- Control register bits --
constant ctrl_clksel0_c : natural := 0; -- r/w: prescaler select bit 0
constant ctrl_clksel1_c : natural := 1; -- r/w: prescaler select bit 1
constant ctrl_clksel2_c : natural := 2; -- r/w: prescaler select bit 2
constant ctrl_enable_c : natural := 3; -- r/w: WDT enable
constant ctrl_mode_c : natural := 4; -- r/w: 0: timeout causes interrupt, 1: timeout causes hard reset
constant ctrl_cause_c : natural := 5; -- r/-: action (reset/IRQ) cause (0: external, 1: watchdog)
constant ctrl_pwfail_c : natural := 6; -- r/-: watchdog action (reset/IRQ) caused by wrong password access when '1'
constant ctrl_enable_c : natural := 0; -- r/w: WDT enable
constant ctrl_clksel0_c : natural := 1; -- r/w: prescaler select bit 0
constant ctrl_clksel1_c : natural := 2; -- r/w: prescaler select bit 1
constant ctrl_clksel2_c : natural := 3; -- r/w: prescaler select bit 2
constant ctrl_mode_c : natural := 4; -- r/w: 0: WDT timeout triggers interrupt, 1: WDT timeout triggers hard reset
constant ctrl_rcause_c : natural := 5; -- r/-: cause of last action (reset/IRQ): 0=external reset, 1=watchdog overflow
constant ctrl_reset_c : natural := 6; -- -/w: reset WDT if set
constant ctrl_force_c : natural := 7; -- -/w: force WDT action
constant ctrl_lock_c : natural := 8; -- r/w: lock access to control register when set
 
-- access control --
signal acc_en : std_ulogic; -- module access enable
signal pwd_ok : std_ulogic; -- password correct
signal fail, fail_ff : std_ulogic; -- unauthorized access
signal wren : std_ulogic;
signal acc_en : std_ulogic; -- module access enable
signal wren : std_ulogic;
signal rden : std_ulogic;
 
-- accessible regs --
signal source : std_ulogic; -- source of wdt action: '0' = external, '1' = watchdog
signal pw_fail : std_ulogic; -- watchdog action caused by wrong password access
signal enable : std_ulogic;
signal mode : std_ulogic;
signal clk_sel : std_ulogic_vector(02 downto 0);
-- control register --
type ctrl_reg_t is record
enable : std_ulogic; -- 1=WDT enabled
clk_sel : std_ulogic_vector(2 downto 0);
mode : std_ulogic; -- 0=trigger IRQ on overflow; 1=trigger hard reset on overflow
rcause : std_ulogic; -- cause of last system reset: '0' = external, '1' = watchdog
reset : std_ulogic; -- reset WDT
force : std_ulogic; -- force action
lock : std_ulogic; -- lock control register
end record;
signal ctrl_reg : ctrl_reg_t;
 
-- reset counter --
signal cnt : std_ulogic_vector(20 downto 0);
signal rst_gen : std_ulogic_vector(03 downto 0);
signal rst_sync : std_ulogic_vector(01 downto 0);
 
-- prescaler clock generator --
signal prsc_tick : std_ulogic;
 
-- WDT core --
signal wdt_cnt : std_ulogic_vector(20 downto 0);
signal hw_rst : std_ulogic;
signal rst_gen : std_ulogic_vector(03 downto 0);
 
-- internal reset (sync, low-active) --
signal rstn_sync : std_ulogic;
 
begin
 
-- Access Control -------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
acc_en <= '1' when (addr_i(hi_abb_c downto lo_abb_c) = wdt_base_c(hi_abb_c downto lo_abb_c)) else '0';
pwd_ok <= '1' when (data_i(15 downto 8) = wdt_password_c) else '0'; -- password check
wren <= '1' when ((acc_en = '1') and (wren_i = '1') and (pwd_ok = '1')) else '0'; -- write access ok
fail <= '1' when ((acc_en = '1') and (wren_i = '1') and (pwd_ok = '0')) else '0'; -- write access fail!
wren <= acc_en and wren_i;
rden <= acc_en and rden_i;
 
 
-- Write Access, Reset Generator ----------------------------------------------------------
-- Write Access ---------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
wdt_core: process(clk_i)
write_access: process(rstn_i, clk_i)
begin
if rising_edge(clk_i) then
if (rstn_i = '0') or (rst_sync(1) = '0') then -- external or internal reset
enable <= '0'; -- disable WDT
mode <= '0'; -- trigger interrupt if watchdog timeouts
clk_sel <= (others => '1'); -- slowest clock rst_source
rst_gen <= (others => '1'); -- do NOT fire on reset!
if (rstn_i = '0') then
ctrl_reg.reset <= '0';
ctrl_reg.force <= '0';
ctrl_reg.enable <= '0'; -- disable WDT
ctrl_reg.mode <= '0'; -- trigger interrupt on WDT overflow
ctrl_reg.clk_sel <= (others => '1'); -- slowest clock source
ctrl_reg.lock <= '0';
elsif rising_edge(clk_i) then
if (rstn_sync = '0') then -- internal reset
ctrl_reg.reset <= '0';
ctrl_reg.force <= '0';
ctrl_reg.enable <= '0'; -- disable WDT
ctrl_reg.mode <= '0'; -- trigger interrupt on WDT overflow
ctrl_reg.clk_sel <= (others => '1'); -- slowest clock source
ctrl_reg.lock <= '0';
else
-- control register write access --
if (wren = '1') then -- allow write if password is correct
enable <= data_i(ctrl_enable_c);
clk_sel <= data_i(ctrl_clksel2_c downto ctrl_clksel0_c);
mode <= data_i(ctrl_mode_c);
-- auto-clear WDT reset and WDT force flags --
ctrl_reg.reset <= '0';
ctrl_reg.force <= '0';
-- actual write access --
if (wren = '1') then
ctrl_reg.reset <= data_i(ctrl_reset_c);
ctrl_reg.force <= data_i(ctrl_force_c);
if (ctrl_reg.lock = '0') then -- update configuration only if unlocked
ctrl_reg.enable <= data_i(ctrl_enable_c);
ctrl_reg.mode <= data_i(ctrl_mode_c);
ctrl_reg.clk_sel <= data_i(ctrl_clksel2_c downto ctrl_clksel0_c);
ctrl_reg.lock <= data_i(ctrl_lock_c);
end if;
end if;
-- trigger system reset when enabled AND reset mode AND timeout OR unauthorized access --
if (enable = '1') and (mode = '1') and ((cnt(cnt'left) = '1') or (fail_ff = '1')) then
rst_gen <= (others => '0');
else
rst_gen <= rst_gen(rst_gen'left-1 downto 0) & '1';
end if;
end if;
end if;
end process wdt_core;
end process write_access;
 
-- enable external clock generator --
clkgen_en_o <= enable;
-- clock generator --
clkgen_en_o <= ctrl_reg.enable; -- enable clock generator
prsc_tick <= clkgen_i(to_integer(unsigned(ctrl_reg.clk_sel))); -- clock enable tick
 
 
-- Counter Update -------------------------------------------------------------------------
-- Watchdog Counter -----------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
cnt_sync: process(clk_i)
wdt_counter: process(clk_i)
begin
if rising_edge(clk_i) then
-- clock_en buffer --
prsc_tick <= clkgen_i(to_integer(unsigned(clk_sel)));
-- unauthorized access buffer --
fail_ff <= fail;
-- reset synchronizer --
rst_sync <= rst_sync(0) & rst_gen(rst_gen'left);
-- IRQ mode --
irq_o <= '0';
if (enable = '1') and (mode = '0') and ((cnt(cnt'left) = '1') or (fail_ff = '1')) then
irq_o <= '1'; -- trigger interrupt if watchdog timeout and MODE=0
if (ctrl_reg.reset = '1') then -- watchdog reset
wdt_cnt <= (others => '0');
elsif (ctrl_reg.enable = '1') and (prsc_tick = '1') then
wdt_cnt <= std_ulogic_vector(unsigned(wdt_cnt) + 1);
end if;
-- counter update --
if (wren = '1') then -- clear counter on write access (manual watchdog reset)
cnt <= (others => '0');
elsif (enable = '1') and (prsc_tick = '1') then
cnt <= std_ulogic_vector(unsigned('0' & cnt(cnt'left-1 downto 0)) + 1);
end if;
end if;
end process cnt_sync;
end process wdt_counter;
 
-- system reset --
rstn_o <= rst_sync(1);
-- action trigger --
irq_o <= ctrl_reg.enable and (wdt_cnt(wdt_cnt'left) or ctrl_reg.force) and (not ctrl_reg.mode); -- mode 0: IRQ
hw_rst <= ctrl_reg.enable and (wdt_cnt(wdt_cnt'left) or ctrl_reg.force) and ( ctrl_reg.mode); -- mode 1: RESET
 
 
-- Reset Cause Indicator ------------------------------------------------------------------
-- Reset Generator & Action Cause Indicator -----------------------------------------------
-- -------------------------------------------------------------------------------------------
rst_cause: process(rstn_i, clk_i)
reset_generator: process(rstn_i, clk_i)
begin
if (rstn_i = '0') then
source <= '0';
pw_fail <= '0';
ctrl_reg.rcause <= '0';
rst_gen <= (others => '1'); -- do NOT fire on reset!
rstn_sync <= '1';
elsif rising_edge(clk_i) then
source <= source or (cnt(cnt'left) and enable) or (fail_ff and enable); -- set on WDT timeout or access error
pw_fail <= (pw_fail or (fail_ff and enable)) and (not (cnt(cnt'left) and enable)); -- set on failed access, clear on WDT timeout
ctrl_reg.rcause <= ctrl_reg.rcause or hw_rst; -- sticky-set on WDT timeout/force
if (hw_rst = '1') then
rst_gen <= (others => '0');
else
rst_gen <= rst_gen(rst_gen'left-1 downto 0) & '1';
end if;
rstn_sync <= rst_gen(rst_gen'left);
end if;
end process rst_cause;
end process reset_generator;
 
-- system reset --
rstn_o <= rst_gen(rst_gen'left);
 
 
-- Read Access ----------------------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
read_access: process(clk_i)
begin
if rising_edge(clk_i) then
ack_o <= acc_en and (rden_i or wren_i);
data_o <= (others => '0');
if (acc_en = '1') and (rden_i = '1') then
data_o(ctrl_clksel2_c downto ctrl_clksel0_c) <= clk_sel;
data_o(ctrl_enable_c) <= enable;
data_o(ctrl_cause_c) <= source;
data_o(ctrl_pwfail_c) <= pw_fail;
data_o(ctrl_mode_c) <= mode;
ack_o <= rden or wren;
if (rden = '1') then
data_o(ctrl_enable_c) <= ctrl_reg.enable;
data_o(ctrl_mode_c) <= ctrl_reg.mode;
data_o(ctrl_rcause_c) <= ctrl_reg.rcause;
data_o(ctrl_clksel2_c downto ctrl_clksel0_c) <= ctrl_reg.clk_sel;
data_o(ctrl_lock_c) <= ctrl_reg.lock;
else
data_o <= (others => '0');
end if;
end if;
end process read_access;
/rtl/top_templates/neorv32_test_setup.vhd
89,7 → 89,7
PMP_NUM_REGIONS => 2, -- number of regions (0..64)
PMP_MIN_GRANULARITY => 64*1024, -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS => 2, -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS => 2, -- number of implemented HPM counters (0..29)
-- Internal Instruction memory --
MEM_INT_IMEM_EN => true, -- implement processor-internal instruction memory
MEM_INT_IMEM_SIZE => 16*1024, -- size of processor-internal instruction memory in bytes
113,8 → 113,8
IO_PWM_EN => false, -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN => true, -- implement watch dog timer (WDT)?
IO_TRNG_EN => false, -- implement true random number generator (TRNG)?
IO_CFU0_EN => false, -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN => false -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN => false, -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG => (others => '0') -- custom CFS configuration generic
)
port map (
-- Global control --
151,9 → 151,13
twi_scl_io => open, -- twi serial clock line
-- PWM --
pwm_o => open, -- pwm channels
-- Custom Functions Subsystem IO --
cfs_in_i => (others => '0'), -- custom inputs
cfs_out_o => open, -- custom outputs
-- system time input from external MTIME (available if IO_MTIME_EN = false) --
mtime_i => (others => '0'), -- current system time
-- Interrupts --
soc_firq_i => (others => '0'), -- fast interrupt channels
mtime_irq_i => '0', -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i => '0', -- machine software interrupt
mext_irq_i => '0' -- machine external interrupt
/rtl/top_templates/neorv32_top_axi4lite.vhd
64,7 → 64,7
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0; -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0; -- number of implemented HPM counters (0..29)
-- Internal Instruction memory --
MEM_INT_IMEM_EN : boolean := true; -- implement processor-internal instruction memory
MEM_INT_IMEM_SIZE : natural := 16*1024; -- size of processor-internal instruction memory in bytes
86,8 → 86,8
IO_PWM_EN : boolean := true; -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN : boolean := true; -- implement watch dog timer (WDT)?
IO_TRNG_EN : boolean := false; -- implement true random number generator (TRNG)?
IO_CFU0_EN : boolean := false; -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN : boolean := false -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN : boolean := false; -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG : std_logic_vector(31 downto 0) := (others => '0') -- custom CFS configuration generic
);
port (
-- AXI Lite-Compatible Master Interface --
135,7 → 135,11
twi_scl_io : inout std_logic; -- twi serial clock line
-- PWM --
pwm_o : out std_logic_vector(03 downto 0); -- pwm channels
-- Custom Functions Subsystem IO (available if IO_CFS_EN = true) --
cfs_in_i : in std_logic_vector(31 downto 0); -- custom inputs
cfs_out_o : out std_logic_vector(31 downto 0); -- custom outputs
-- Interrupts --
soc_firq_i : in std_logic_vector(3 downto 0) := (others => '0'); -- fast interrupt channels
mtime_irq_i : in std_logic := '0'; -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i : in std_logic := '0'; -- machine software interrupt
mext_irq_i : in std_logic := '0' -- machine external interrupt
145,8 → 149,9
architecture neorv32_top_axi4lite_rtl of neorv32_top_axi4lite is
 
-- type conversion --
constant USER_CODE_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(USER_CODE);
constant HW_THREAD_ID_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(HW_THREAD_ID);
constant USER_CODE_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(USER_CODE);
constant HW_THREAD_ID_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(HW_THREAD_ID);
constant IO_CFS_CONFIG_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(IO_CFS_CONFIG);
--
signal clk_i_int : std_ulogic;
signal rstn_i_int : std_ulogic;
164,6 → 169,10
--
signal pwm_o_int : std_ulogic_vector(03 downto 0);
--
signal cfs_in_i_int : std_ulogic_vector(31 downto 0);
signal cfs_out_o_int : std_ulogic_vector(31 downto 0);
--
signal soc_firq_i_int : std_ulogic_vector(3 downto 0);
signal mtime_irq_i_int : std_ulogic;
signal msw_irq_i_int : std_ulogic;
signal mext_irq_i_int : std_ulogic;
227,7 → 236,7
PMP_NUM_REGIONS => PMP_NUM_REGIONS, -- number of regions (0..64)
PMP_MIN_GRANULARITY => PMP_MIN_GRANULARITY, -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS => HPM_NUM_CNTS, -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS => HPM_NUM_CNTS, -- number of implemented HPM counters (0..29)
-- Internal Instruction memory --
MEM_INT_IMEM_EN => MEM_INT_IMEM_EN, -- implement processor-internal instruction memory
MEM_INT_IMEM_SIZE => MEM_INT_IMEM_SIZE, -- size of processor-internal instruction memory in bytes
251,8 → 260,8
IO_PWM_EN => IO_PWM_EN, -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN => IO_WDT_EN, -- implement watch dog timer (WDT)?
IO_TRNG_EN => IO_TRNG_EN, -- implement true random number generator (TRNG)?
IO_CFU0_EN => IO_CFU0_EN, -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN => IO_CFU1_EN -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN => IO_CFS_EN, -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG => IO_CFS_CONFIG_INT -- custom CFS configuration generic
)
port map (
-- Global control --
289,9 → 298,13
twi_scl_io => twi_scl_io, -- twi serial clock line
-- PWM --
pwm_o => pwm_o_int, -- pwm channels
-- Custom Functions Subsystem IO (available if IO_CFS_EN = true) --
cfs_in_i => cfs_in_i_int, -- custom inputs
cfs_out_o => cfs_out_o_int, -- custom outputs
-- system time input from external MTIME (available if IO_MTIME_EN = false) --
mtime_i => (others => '0'), -- current system time
-- Interrupts --
soc_firq_i => soc_firq_i_int, -- fast interrupt channels
mtime_irq_i => mtime_irq_i_int, -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i => msw_irq_i_int, -- machine software interrupt
mext_irq_i => mext_irq_i_int -- machine external interrupt
311,6 → 324,10
 
pwm_o <= std_logic_vector(pwm_o_int);
 
cfs_in_i_int <= std_ulogic_vector(cfs_in_i);
cfs_out_o <= std_logic_vector(cfs_out_o_int);
 
soc_firq_i_int <= std_ulogic_vector(soc_firq_i);
msw_irq_i_int <= std_ulogic(msw_irq_i);
mext_irq_i_int <= std_ulogic(mext_irq_i);
/rtl/top_templates/neorv32_top_stdlogic.vhd
62,7 → 62,7
PMP_NUM_REGIONS : natural := 0; -- number of regions (0..64)
PMP_MIN_GRANULARITY : natural := 64*1024; -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS : natural := 0; -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS : natural := 0; -- number of implemented HPM counters (0..29)
-- Internal Instruction memory --
MEM_INT_IMEM_EN : boolean := true; -- implement processor-internal instruction memory
MEM_INT_IMEM_SIZE : natural := 16*1024; -- size of processor-internal instruction memory in bytes
86,8 → 86,8
IO_PWM_EN : boolean := true; -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN : boolean := true; -- implement watch dog timer (WDT)?
IO_TRNG_EN : boolean := false; -- implement true random number generator (TRNG)?
IO_CFU0_EN : boolean := false; -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN : boolean := false -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN : boolean := false; -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG : std_logic_vector(31 downto 0) := (others => '0') -- custom CFS configuration generic
);
port (
-- Global control --
124,9 → 124,13
twi_scl_io : inout std_logic; -- twi serial clock line
-- PWM (available if IO_PWM_EN = true) --
pwm_o : out std_logic_vector(03 downto 0); -- pwm channels
-- Custom Functions Subsystem IO (available if IO_CFS_EN = true) --
cfs_in_i : in std_logic_vector(31 downto 0); -- custom inputs
cfs_out_o : out std_logic_vector(31 downto 0); -- custom outputs
-- system time input from external MTIME (available if IO_MTIME_EN = false) --
mtime_i : in std_logic_vector(63 downto 0) := (others => '0'); -- current system time
-- Interrupts --
soc_firq_i : in std_logic_vector(3 downto 0) := (others => '0'); -- fast interrupt channels
mtime_irq_i : in std_logic := '0'; -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i : in std_logic := '0'; -- machine software interrupt
mext_irq_i : in std_logic := '0' -- machine external interrupt
136,8 → 140,9
architecture neorv32_top_stdlogic_rtl of neorv32_top_stdlogic is
 
-- type conversion --
constant USER_CODE_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(USER_CODE);
constant HW_THREAD_ID_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(HW_THREAD_ID);
constant USER_CODE_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(USER_CODE);
constant HW_THREAD_ID_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(HW_THREAD_ID);
constant IO_CFS_CONFIG_INT : std_ulogic_vector(31 downto 0) := std_ulogic_vector(IO_CFS_CONFIG);
--
signal clk_i_int : std_ulogic;
signal rstn_i_int : std_ulogic;
170,8 → 175,12
--
signal pwm_o_int : std_ulogic_vector(03 downto 0);
--
signal cfs_in_i_int : std_ulogic_vector(31 downto 0);
signal cfs_out_o_int : std_ulogic_vector(31 downto 0);
--
signal mtime_i_int : std_ulogic_vector(63 downto 0);
--
signal soc_firq_i_int : std_ulogic_vector(3 downto 0);
signal mtime_irq_i_int : std_ulogic;
signal msw_irq_i_int : std_ulogic;
signal mext_irq_i_int : std_ulogic;
203,7 → 212,7
PMP_NUM_REGIONS => PMP_NUM_REGIONS, -- number of regions (0..64)
PMP_MIN_GRANULARITY => PMP_MIN_GRANULARITY, -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS => HPM_NUM_CNTS, -- number of inmplemnted HPM counters (0..29)
HPM_NUM_CNTS => HPM_NUM_CNTS, -- number of implemented HPM counters (0..29)
-- Internal Instruction memory --
MEM_INT_IMEM_EN => MEM_INT_IMEM_EN, -- implement processor-internal instruction memory
MEM_INT_IMEM_SIZE => MEM_INT_IMEM_SIZE, -- size of processor-internal instruction memory in bytes
227,8 → 236,8
IO_PWM_EN => IO_PWM_EN, -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN => IO_WDT_EN, -- implement watch dog timer (WDT)?
IO_TRNG_EN => IO_TRNG_EN, -- implement true random number generator (TRNG)?
IO_CFU0_EN => IO_CFU0_EN, -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN => IO_CFU1_EN -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN => IO_CFS_EN, -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG => IO_CFS_CONFIG_INT -- custom CFS configuration generic
)
port map (
-- Global control --
265,9 → 274,13
twi_scl_io => twi_scl_io, -- twi serial clock line
-- PWM --
pwm_o => pwm_o_int, -- pwm channels
-- Custom Functions Subsystem IO (available if IO_CFS_EN = true) --
cfs_in_i => cfs_in_i_int, -- custom inputs
cfs_out_o => cfs_out_o_int, -- custom outputs
-- system time input from external MTIME (available if IO_MTIME_EN = false) --
mtime_i => mtime_i_int, -- current system time
-- Interrupts --
soc_firq_i => soc_firq_i_int, -- fast interrupt channels
mtime_irq_i => mtime_irq_i_int, -- machine timer interrupt, available if IO_MTIME_EN = false
msw_irq_i => msw_irq_i_int, -- machine software interrupt
mext_irq_i => mext_irq_i_int -- machine external interrupt
305,8 → 318,12
 
pwm_o <= std_logic_vector(pwm_o_int);
 
cfs_in_i_int <= std_ulogic_vector(cfs_in_i);
cfs_out_o <= std_logic_vector(cfs_out_o_int);
 
mtime_i_int <= std_ulogic_vector(mtime_i);
 
soc_firq_i_int <= std_ulogic_vector(soc_firq_i);
msw_irq_i_int <= std_ulogic(msw_irq_i);
mext_irq_i_int <= std_ulogic(mext_irq_i);
 
/sim/ghdl/ghdl_sim.sh
42,8 → 42,7
ghdl -a --work=neorv32 $srcdir_core/neorv32_boot_rom.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_busswitch.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_icache.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_cfu0.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_cfu1.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_cfs.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_cpu.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_cpu_alu.vhd
ghdl -a --work=neorv32 $srcdir_core/neorv32_cpu_bus.vhd
/sim/neorv32_tb.vhd
73,9 → 73,8
constant ext_mem_c_base_addr_c : std_ulogic_vector(31 downto 0) := x"F0000000"; -- wishbone memory base address (default begin of EXTERNAL IO area)
constant ext_mem_c_size_c : natural := 64; -- wishbone memory size in bytes
constant ext_mem_c_latency_c : natural := 3; -- latency in clock cycles (min 1, max 255), plus 1 cycle initial delay
-- machine interrupt triggers --
constant msi_trigger_c : std_ulogic_vector(31 downto 0) := x"FF000000"; -- machine software interrupt
constant mei_trigger_c : std_ulogic_vector(31 downto 0) := x"FF000004"; -- machine external interrupt
-- simulation interrupt trigger --
constant irq_trigger_c : std_ulogic_vector(31 downto 0) := x"FF000000";
-- -------------------------------------------------------------------------------------------
 
-- internals - hands off! --
109,6 → 108,7
 
-- irq --
signal msi_ring, mei_ring : std_ulogic;
signal soc_firq_ring : std_ulogic_vector(3 downto 0);
 
-- Wishbone bus --
type wishbone_t is record
124,7 → 124,7
tag : std_ulogic_vector(2 downto 0); -- tag
lock : std_ulogic; -- locked/exclusive bus access
end record;
signal wb_cpu, wb_mem_a, wb_mem_b, wb_mem_c, wb_msi, wb_mei : wishbone_t;
signal wb_cpu, wb_mem_a, wb_mem_b, wb_mem_c, wb_irq : wishbone_t;
 
-- Wishbone memories --
type ext_mem_a_ram_t is array (0 to ext_mem_a_size_c/4-1) of std_ulogic_vector(31 downto 0);
190,7 → 190,7
FAST_MUL_EN => false, -- use DSPs for M extension's multiplier
FAST_SHIFT_EN => false, -- use barrel shifter for shift operations
-- Physical Memory Protection (PMP) --
PMP_NUM_REGIONS => 5, -- number of regions (0..64)
PMP_NUM_REGIONS => 4, -- number of regions (0..64)
PMP_MIN_GRANULARITY => 64*1024, -- minimal region granularity in bytes, has to be a power of 2, min 8 bytes
-- Hardware Performance Monitors (HPM) --
HPM_NUM_CNTS => 12, -- number of inmplemnted HPM counters (0..29)
217,8 → 217,8
IO_PWM_EN => true, -- implement pulse-width modulation unit (PWM)?
IO_WDT_EN => true, -- implement watch dog timer (WDT)?
IO_TRNG_EN => false, -- trng cannot be simulated
IO_CFU0_EN => true, -- implement custom functions unit 0 (CFU0)?
IO_CFU1_EN => true -- implement custom functions unit 1 (CFU1)?
IO_CFS_EN => true, -- implement custom functions subsystem (CFS)?
IO_CFS_CONFIG => (others => '0') -- custom CFS configuration generic
)
port map (
-- Global control --
255,9 → 255,13
twi_scl_io => twi_scl, -- twi serial clock line
-- PWM --
pwm_o => open, -- pwm channels
-- Custom Functions Subsystem IO --
cfs_in_i => (others => '0'), -- custom CFS inputs
cfs_out_o => open, -- custom CFS outputs
-- system time input from external MTIME (available if IO_MTIME_EN = false) --
mtime_i => (others => '0'), -- current system time
-- Interrupts --
soc_firq_i => soc_firq_ring, -- fast interrupt channels
mtime_irq_i => '0', -- machine software interrupt, available if IO_MTIME_EN = false
msw_irq_i => msi_ring, -- machine software interrupt
mext_irq_i => mei_ring -- machine external interrupt
347,33 → 351,24
wb_mem_c.cyc <= wb_cpu.cyc;
wb_mem_c.lock <= wb_cpu.lock;
 
wb_msi.addr <= wb_cpu.addr;
wb_msi.wdata <= wb_cpu.wdata;
wb_msi.we <= wb_cpu.we;
wb_msi.sel <= wb_cpu.sel;
wb_msi.tag <= wb_cpu.tag;
wb_msi.cyc <= wb_cpu.cyc;
wb_msi.lock <= wb_cpu.lock;
wb_irq.addr <= wb_cpu.addr;
wb_irq.wdata <= wb_cpu.wdata;
wb_irq.we <= wb_cpu.we;
wb_irq.sel <= wb_cpu.sel;
wb_irq.tag <= wb_cpu.tag;
wb_irq.cyc <= wb_cpu.cyc;
wb_irq.lock <= wb_cpu.lock;
 
wb_mei.addr <= wb_cpu.addr;
wb_mei.wdata <= wb_cpu.wdata;
wb_mei.we <= wb_cpu.we;
wb_mei.sel <= wb_cpu.sel;
wb_mei.tag <= wb_cpu.tag;
wb_mei.cyc <= wb_cpu.cyc;
wb_mei.lock <= wb_cpu.lock;
 
-- CPU read-back signals (no mux here since peripherals have "output gates") --
wb_cpu.rdata <= wb_mem_a.rdata or wb_mem_b.rdata or wb_mem_c.rdata or wb_mei.rdata or wb_msi.rdata;
wb_cpu.ack <= wb_mem_a.ack or wb_mem_b.ack or wb_mem_c.ack or wb_mei.ack or wb_msi.ack;
wb_cpu.err <= wb_mem_a.err or wb_mem_b.err or wb_mem_c.err or wb_mei.err or wb_msi.err;
wb_cpu.rdata <= wb_mem_a.rdata or wb_mem_b.rdata or wb_mem_c.rdata or wb_irq.rdata;
wb_cpu.ack <= wb_mem_a.ack or wb_mem_b.ack or wb_mem_c.ack or wb_irq.ack;
wb_cpu.err <= wb_mem_a.err or wb_mem_b.err or wb_mem_c.err or wb_irq.err;
 
-- peripheral select via STROBE signal --
wb_mem_a.stb <= wb_cpu.stb when (wb_cpu.addr >= ext_mem_a_base_addr_c) and (wb_cpu.addr < std_ulogic_vector(unsigned(ext_mem_a_base_addr_c) + ext_mem_a_size_c)) else '0';
wb_mem_b.stb <= wb_cpu.stb when (wb_cpu.addr >= ext_mem_b_base_addr_c) and (wb_cpu.addr < std_ulogic_vector(unsigned(ext_mem_b_base_addr_c) + ext_mem_b_size_c)) else '0';
wb_mem_c.stb <= wb_cpu.stb when (wb_cpu.addr >= ext_mem_c_base_addr_c) and (wb_cpu.addr < std_ulogic_vector(unsigned(ext_mem_c_base_addr_c) + ext_mem_c_size_c)) else '0';
wb_msi.stb <= wb_cpu.stb when (wb_cpu.addr = msi_trigger_c) else '0';
wb_mei.stb <= wb_cpu.stb when (wb_cpu.addr = mei_trigger_c) else '0';
wb_irq.stb <= wb_cpu.stb when (wb_cpu.addr = irq_trigger_c) else '0';
 
 
-- Wishbone Memory A (simulated external IMEM) --------------------------------------------
503,27 → 498,22
irq_trigger: process(clk_gen)
begin
if rising_edge(clk_gen) then
-- default --
msi_ring <= '0';
wb_msi.rdata <= (others => '0');
wb_msi.ack <= '0';
wb_msi.err <= '0';
mei_ring <= '0';
wb_mei.rdata <= (others => '0');
wb_mei.ack <= '0';
wb_mei.err <= '0';
 
-- machine software interrupt --
if ((wb_msi.cyc and wb_msi.stb and wb_msi.we) = '1') then
msi_ring <= '1';
wb_msi.ack <= '1';
-- bus interface --
wb_irq.rdata <= (others => '0');
wb_irq.ack <= wb_irq.cyc and wb_irq.stb and wb_irq.we;
wb_irq.err <= '0';
-- trigger IRQ using CSR.MIE bit layout --
msi_ring <= '0';
mei_ring <= '0';
soc_firq_ring <= (others => '0');
if ((wb_irq.cyc and wb_irq.stb and wb_irq.we) = '1') then
msi_ring <= wb_irq.wdata(03); -- machine software interrupt
mei_ring <= wb_irq.wdata(11); -- machine software interrupt
soc_firq_ring(0) <= wb_irq.wdata(20); -- fast interrupt channel 4
soc_firq_ring(1) <= wb_irq.wdata(21); -- fast interrupt channel 5
soc_firq_ring(2) <= wb_irq.wdata(22); -- fast interrupt channel 6
soc_firq_ring(3) <= wb_irq.wdata(22); -- fast interrupt channel 7
end if;
 
-- machine external interrupt --
if ((wb_mei.cyc and wb_mei.stb and wb_mei.we) = '1') then
mei_ring <= '1';
wb_mei.ack <= '1';
end if;
end if;
end process irq_trigger;
 
/sw/bootloader/bootloader.c
153,9 → 153,15
* This global variable keeps the size of the available executable in bytes.
* If =0 no executable is available (yet).
**************************************************************************/
uint32_t exe_available = 0;
volatile uint32_t exe_available = 0;
 
 
/**********************************************************************//**
* Only set during executable fetch (required for cpaturing STORE-BUS-TIMOUT exception).
**************************************************************************/
volatile uint32_t getting_exe = 0;
 
 
// Function prototypes
void __attribute__((__interrupt__)) bootloader_trap_handler(void);
void fast_upload(int src);
187,19 → 193,10
#warning In order to allow the bootloader to run on any CPU configuration it should be compiled using the base ISA (rv32i/e) only.
#endif
 
// global variable for executable size; 0 means there is no exe available
exe_available = 0;
exe_available = 0; // global variable for executable size; 0 means there is no exe available
getting_exe = 0; // we are not trying to get an executable yet
 
// ------------------------------------------------
// Minimal CPU hardware initialization
// - all IO devices are reset and disabled by the crt0 code
// ------------------------------------------------
 
// confiure trap handler (bare-metal, no neorv32 rte available)
neorv32_cpu_csr_write(CSR_MTVEC, (uint32_t)(&bootloader_trap_handler));
 
 
// ------------------------------------------------
// Minimal processor hardware initialization
// - all IO devices are reset and disabled by the crt0 code
// ------------------------------------------------
226,6 → 223,10
// Configure machine system timer interrupt for ~2Hz
neorv32_mtime_set_timecmp(neorv32_mtime_get_time() + (clock_speed/4));
 
// confiure trap handler (bare-metal, no neorv32 rte available)
neorv32_cpu_csr_write(CSR_MTVEC, (uint32_t)(&bootloader_trap_handler));
 
// active timer IRQ
neorv32_cpu_csr_write(CSR_MIE, 1 << CSR_MIE_MTIE); // activate MTIME IRQ source
neorv32_cpu_eint(); // enable global interrupts
 
405,12 → 406,13
 
/**********************************************************************//**
* Bootloader trap handler. Used for the MTIME tick and to capture any other traps.
* @warning Since we have no runtime environment, we have to use the interrupt attribute here. Here, and only here!
* @warning Since we have no runtime environment, we have to use the interrupt attribute here. Here and only here!
**************************************************************************/
void __attribute__((__interrupt__)) bootloader_trap_handler(void) {
 
uint32_t cause = neorv32_cpu_csr_read(CSR_MCAUSE);
 
// make sure this was caused by MTIME IRQ
uint32_t cause = neorv32_cpu_csr_read(CSR_MCAUSE);
if (cause == TRAP_CODE_MTI) { // raw exception code for MTI
if (STATUS_LED_EN == 1) {
// toggle status LED
419,17 → 421,20
// set time for next IRQ
neorv32_mtime_set_timecmp(neorv32_mtime_get_time() + (SYSINFO_CLK/4));
}
 
else if (cause == TRAP_CODE_S_ACCESS) { // seems like executable is too large
system_error(ERROR_SIZE);
}
 
else {
neorv32_uart_print("\n\nEXC (");
print_hex_word(cause);
neorv32_uart_print(") @ 0x");
print_hex_word(neorv32_cpu_csr_read(CSR_MEPC));
system_error(ERROR_SYSTEM);
// store bus access error during get_exe
// -> seems like executable is too large
if ((cause == TRAP_CODE_S_ACCESS) && (getting_exe)) {
system_error(ERROR_SIZE);
}
// unknown error
else {
neorv32_uart_print("\n\nEXC (");
print_hex_word(cause);
neorv32_uart_print(") @ 0x");
print_hex_word(neorv32_cpu_csr_read(CSR_MEPC));
system_error(ERROR_SYSTEM);
}
}
}
 
441,6 → 446,8
**************************************************************************/
void get_exe(int src) {
 
getting_exe = 1; // to inform trap handler we were trying to get an executable
 
// is MEM implemented and read-only?
if ((SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_MEM_INT_IMEM_ROM)) &&
(SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_MEM_INT_IMEM))) {
493,6 → 500,8
neorv32_uart_print("OK");
exe_available = size; // store exe size
}
 
getting_exe = 0; // to inform trap handler we are done getting an executable
}
 
 
/sw/common/crt0.S
39,7 → 39,7
 
 
// IO region
.equ IO_BEGIN, 0xFFFFFF80 // start of processor-internal IO region
.equ IO_BEGIN, 0xFFFFFF00 // start of processor-internal IO region
 
 
_start:
/sw/example/bit_manipulation/main.c
1,5 → 1,5
// #################################################################################################
// # << NEORV32 - Bit manipulation 'B.Zbb' test program >> #
// # << NEORV32 - RISC-V Bit Manipulation 'B.Zbb' Extension Test Program >> #
// # ********************************************************************************************* #
// # BSD 3-Clause License #
// # #
55,7 → 55,7
 
// Prototypes
uint32_t xorshift32(void);
uint32_t check_result(uint32_t opa, uint32_t opb, uint32_t ref, uint32_t res);
uint32_t check_result(uint32_t num, uint32_t opa, uint32_t opb, uint32_t ref, uint32_t res);
void print_report(int num_err, int num_tests);
 
 
69,8 → 69,8
int main() {
 
uint32_t opa = 0, opb = 0, res_hw = 0, res_sw = 0;
int i = 0, err_cnt = 0;
const int num_tests = (int)NUM_TEST_CASES;
uint32_t i = 0, err_cnt = 0;
const uint32_t num_tests = (int)NUM_TEST_CASES;
 
// capture all exceptions and give debug info via UART
neorv32_rte_setup();
94,7 → 94,7
opa = xorshift32();
res_sw = riscv_emulate_clz(opa);
res_hw = riscv_intrinsic_clz(opa);
err_cnt += check_result(opa, 0, res_sw, res_hw);
err_cnt += check_result(i, opa, 0, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
105,7 → 105,7
opa = xorshift32();
res_sw = riscv_emulate_ctz(opa);
res_hw = riscv_intrinsic_ctz(opa);
err_cnt += check_result(opa, 0, res_sw, res_hw);
err_cnt += check_result(i, opa, 0, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
116,7 → 116,7
opa = xorshift32();
res_sw = riscv_emulate_cpop(opa);
res_hw = riscv_intrinsic_cpop(opa);
err_cnt += check_result(opa, 0, res_sw, res_hw);
err_cnt += check_result(i, opa, 0, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
127,7 → 127,7
opa = xorshift32();
res_sw = riscv_emulate_sextb(opa);
res_hw = riscv_intrinsic_sextb(opa);
err_cnt += check_result(opa, 0, res_sw, res_hw);
err_cnt += check_result(i, opa, 0, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
138,7 → 138,7
opa = xorshift32();
res_sw = riscv_emulate_sexth(opa);
res_hw = riscv_intrinsic_sexth(opa);
err_cnt += check_result(opa, 0, res_sw, res_hw);
err_cnt += check_result(i, opa, 0, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
150,7 → 150,7
opb = xorshift32();
res_sw = riscv_emulate_min(opa, opb);
res_hw = riscv_intrinsic_min(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
162,7 → 162,7
opb = xorshift32();
res_sw = riscv_emulate_minu(opa, opb);
res_hw = riscv_intrinsic_minu(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
174,7 → 174,7
opb = xorshift32();
res_sw = riscv_emulate_max(opa, opb);
res_hw = riscv_intrinsic_max(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
186,7 → 186,7
opb = xorshift32();
res_sw = riscv_emulate_maxu(opa, opb);
res_hw = riscv_intrinsic_maxu(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
198,7 → 198,7
opb = xorshift32();
res_sw = riscv_emulate_pack(opa, opb);
res_hw = riscv_intrinsic_pack(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
210,7 → 210,7
opb = xorshift32();
res_sw = riscv_emulate_andn(opa, opb);
res_hw = riscv_intrinsic_andn(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
222,7 → 222,7
opb = xorshift32();
res_sw = riscv_emulate_orn(opa, opb);
res_hw = riscv_intrinsic_orn(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
234,7 → 234,7
opb = xorshift32();
res_sw = riscv_emulate_xnor(opa, opb);
res_hw = riscv_intrinsic_xnor(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
246,7 → 246,7
opb = xorshift32();
res_sw = riscv_emulate_rol(opa, opb);
res_hw = riscv_intrinsic_rol(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
258,7 → 258,7
opb = xorshift32();
res_sw = riscv_emulate_ror(opa, opb);
res_hw = riscv_intrinsic_ror(opa, opb);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
269,7 → 269,7
opa = xorshift32();
res_sw = riscv_emulate_ror(opa, 20);
res_hw = riscv_intrinsic_rori20(opa);
err_cnt += check_result(opa, opb, res_sw, res_hw);
err_cnt += check_result(i, opa, opb, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
280,7 → 280,7
opa = xorshift32();
res_sw = riscv_emulate_orcb(opa);
res_hw = riscv_intrinsic_orcb(opa);
err_cnt += check_result(opa, 0, res_sw, res_hw);
err_cnt += check_result(i, opa, 0, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
291,7 → 291,7
opa = xorshift32();
res_sw = riscv_emulate_rev8(opa);
res_hw = riscv_intrinsic_rev8(opa);
err_cnt += check_result(opa, 0, res_sw, res_hw);
err_cnt += check_result(i, opa, 0, res_sw, res_hw);
}
print_report(err_cnt, num_tests);
 
322,6 → 322,7
/**********************************************************************//**
* Check results (reference (SW) vs actual hardware).
*
* @param[in] num Test case number
* @param[in] opa Operand 1
* @param[in] opb Operand 2
* @param[in] ref Software reference
328,10 → 329,10
* @param[in] res Actual results
* @return zero if results are equal.
**************************************************************************/
uint32_t check_result(uint32_t opa, uint32_t opb, uint32_t ref, uint32_t res) {
uint32_t check_result(uint32_t num, uint32_t opa, uint32_t opb, uint32_t ref, uint32_t res) {
 
if (ref != res) {
neorv32_uart_printf("opa = 0x%x, opb = 0x%x : ref = 0x%x vs res = 0x%x ", opa, opb, ref, res);
neorv32_uart_printf("%u: opa = 0x%x, opb = 0x%x : ref = 0x%x vs res = 0x%x ", num, opa, opb, ref, res);
neorv32_uart_printf("%c[1m[FAILED]%c[0m\n", 27, 27);
return 1;
}
/sw/example/cpu_test/main.c
36,7 → 36,7
/**********************************************************************//**
* @file cpu_test/main.c
* @author Stephan Nolting
* @brief Simple CPU test program.
* @brief CPU/Processor test program.
**************************************************************************/
 
#include <neorv32.h>
51,8 → 51,8
#define BAUD_RATE 19200
//** Reachable unaligned address */
#define ADDR_UNALIGNED 0x00000002
//** Unreachable aligned address */
#define ADDR_UNREACHABLE 0xFFFFFF00
//** Unreachable word-aligned address */
#define ADDR_UNREACHABLE (IO_BASE_ADDRESS-4)
//* external memory base address */
#define EXT_MEM_BASE 0xF0000000
/**@}*/
59,8 → 59,7
 
 
// Prototypes
void sim_trigger_msi(void);
void sim_trigger_mei(void);
void sim_irq_trigger(uint32_t sel);
void global_trap_handler(void);
void test_ok(void);
void test_fail(void);
96,24 → 95,6
 
 
/**********************************************************************//**
* Simulation-based function to trigger CPU MSI (machine software interrupt).
**************************************************************************/
void sim_trigger_msi(void) {
 
*(IO_REG32 (0xFF000000)) = 1;
}
 
 
/**********************************************************************//**
* Simulation-based function to trigger CPU MEI (machine external interrupt).
**************************************************************************/
void sim_trigger_mei(void) {
 
*(IO_REG32 (0xFF000004)) = 1;
}
 
 
/**********************************************************************//**
* This program uses mostly synthetic case to trigger all implemented exceptions.
* Each exception is captured and evaluated for correct detection.
*
140,7 → 121,7
return 0;
#endif
 
neorv32_uart_printf("\n<< PROCESSOR/CPU TEST >>\n");
neorv32_uart_printf("\n<< CPU/PROCESSOR TEST >>\n");
neorv32_uart_printf("build: "__DATE__" "__TIME__"\n");
 
// check if we came from hardware reset
149,7 → 130,7
neorv32_uart_printf("yes\n");
}
else {
neorv32_uart_printf("unknown (mcause != TRAP_CODE_RESET)\n");
neorv32_uart_printf("unknown\n");
}
 
// check available hardware extensions and compare with compiler flags
208,20 → 189,28
install_err += neorv32_rte_exception_install(RTE_TRAP_FIRQ_1, global_trap_handler);
install_err += neorv32_rte_exception_install(RTE_TRAP_FIRQ_2, global_trap_handler);
install_err += neorv32_rte_exception_install(RTE_TRAP_FIRQ_3, global_trap_handler);
install_err += neorv32_rte_exception_install(RTE_TRAP_FIRQ_4, global_trap_handler);
install_err += neorv32_rte_exception_install(RTE_TRAP_FIRQ_5, global_trap_handler);
install_err += neorv32_rte_exception_install(RTE_TRAP_FIRQ_6, global_trap_handler);
install_err += neorv32_rte_exception_install(RTE_TRAP_FIRQ_7, global_trap_handler);
 
if (install_err) {
neorv32_uart_printf("RTE error (%i)!\n", install_err);
neorv32_uart_printf("RTE install error (%i)!\n", install_err);
return 0;
}
 
// enable interrupt sources
install_err = neorv32_cpu_irq_enable(CSR_MIE_MSIE); // activate software interrupt
install_err += neorv32_cpu_irq_enable(CSR_MIE_MTIE); // activate timer interrupt
install_err += neorv32_cpu_irq_enable(CSR_MIE_MEIE); // activate external interrupt
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ0E); // activate fast interrupt channel 0
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ1E); // activate fast interrupt channel 1
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ2E); // activate fast interrupt channel 2
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ3E); // activate fast interrupt channel 3
install_err = neorv32_cpu_irq_enable(CSR_MIE_MSIE); // machine software interrupt
install_err += neorv32_cpu_irq_enable(CSR_MIE_MTIE); // machine timer interrupt
install_err += neorv32_cpu_irq_enable(CSR_MIE_MEIE); // machine external interrupt
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ0E); // fast interrupt channel 0
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ1E); // fast interrupt channel 1
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ2E); // fast interrupt channel 2
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ3E); // fast interrupt channel 3
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ4E); // fast interrupt channel 4
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ5E); // fast interrupt channel 5
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ6E); // fast interrupt channel 6
install_err += neorv32_cpu_irq_enable(CSR_MIE_FIRQ7E); // fast interrupt channel 7
 
if (install_err) {
neorv32_uart_printf("IRQ enable error (%i)!\n", install_err);
472,7 → 461,7
 
 
// ----------------------------------------------------------
// Test FENCE.I instruction (clear & reload i-cache)
// Test FENCE.I instruction (instruction buffer / i-cache clear & reload)
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] Testing FENCE.I operation: ", cnt_test);
662,7 → 651,7
}
}
else {
neorv32_uart_printf("skipped (not possible when C extension is enabled)\n");
neorv32_uart_printf("skipped (n.a. with C-ext)\n");
}
 
 
738,7 → 727,7
}
}
else {
neorv32_uart_printf("skipped (not possible when C-EXT disabled)\n");
neorv32_uart_printf("skipped (n.a. with C-ext)\n");
}
 
 
874,7 → 863,7
 
}
else {
neorv32_uart_printf("skipped (not possible when U-EXT disabled)\n");
neorv32_uart_printf("skipped (n.a. without U-ext)\n");
}
 
 
919,7 → 908,7
cnt_test++;
 
// trigger IRQ
sim_trigger_msi();
sim_irq_trigger(1 << CSR_MIE_MSIE);
 
// wait some time for the IRQ to arrive the CPU
asm volatile("nop");
947,7 → 936,7
cnt_test++;
 
// trigger IRQ
sim_trigger_mei();
sim_irq_trigger(1 << CSR_MIE_MEIE);
 
// wait some time for the IRQ to arrive the CPU
asm volatile("nop");
969,14 → 958,14
// Fast interrupt channel 0 (WDT)
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] FIRQ0 (fast IRQ0) interrupt test (via WDT): ", cnt_test);
neorv32_uart_printf("[%i] FIRQ0 (fast interrupt 0) test (via WDT): ", cnt_test);
 
if (neorv32_wdt_available()) {
cnt_test++;
 
// configure WDT
neorv32_wdt_setup(CLK_PRSC_2, 0); // lowest clock prescaler, trigger IRQ on timeout
neorv32_wdt_reset(); // reset watchdog
neorv32_wdt_setup(CLK_PRSC_4096, 0, 1); // highest clock prescaler, trigger IRQ on timeout, lock access
WDT_CT = 0; // try to deactivate WDT (should fail as access is loced)
neorv32_wdt_force(); // force watchdog into action
 
// wait some time for the IRQ to arrive the CPU
1002,7 → 991,7
// Fast interrupt channel 1 (GPIO)
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] FIRQ1 (fast IRQ1) interrupt test (via GPIO): ", cnt_test);
neorv32_uart_printf("[%i] FIRQ1 (fast interrupt 1) test (via GPIO): ", cnt_test);
 
if (UART_CT & (1 << UART_CT_SIM_MODE)) { // check if this is a simulation
if (neorv32_gpio_available()) {
1048,7 → 1037,7
// Fast interrupt channel 2 (UART)
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] FIRQ2 (fast IRQ2) interrupt test (via UART): ", cnt_test);
neorv32_uart_printf("[%i] FIRQ2 (fast interrupt 2) test (via UART): ", cnt_test);
 
if (neorv32_uart_available()) {
cnt_test++;
1098,7 → 1087,7
// Fast interrupt channel 3 (SPI)
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] FIRQ3 (fast IRQ3) interrupt test (via SPI): ", cnt_test);
neorv32_uart_printf("[%i] FIRQ3 (fast interrupt 3) test (via SPI): ", cnt_test);
 
if (neorv32_spi_available()) {
cnt_test++;
1133,7 → 1122,7
// Fast interrupt channel 3 (TWI)
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] FIRQ3 (fast IRQ3) interrupt test (via TWI): ", cnt_test);
neorv32_uart_printf("[%i] FIRQ3 (fast interrupt 3) test (via TWI): ", cnt_test);
 
if (neorv32_twi_available()) {
cnt_test++;
1166,6 → 1155,42
 
 
// ----------------------------------------------------------
// Fast interrupt channel 4..7 (SoC fast IRQ)
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] FIRQ4..7 (SoC fast interrupt 0..3, via testbench) test: ", cnt_test);
 
cnt_test++;
 
// trigger all SoC Fast interrupts at once
neorv32_cpu_dint(); // do not fire yet!
sim_irq_trigger((1 << CSR_MIE_FIRQ4E) | (1 << CSR_MIE_FIRQ5E) | (1 << CSR_MIE_FIRQ6E) | (1 << CSR_MIE_FIRQ7E));
 
// wait some time for the IRQ to arrive the CPU
asm volatile("nop");
asm volatile("nop");
 
// make sure all SoC FIRQs have been triggered
tmp_a = (1 << CSR_MIP_FIRQ4P) | (1 << CSR_MIP_FIRQ5P) | (1 << CSR_MIP_FIRQ6P) | (1 << CSR_MIP_FIRQ7P);
if (neorv32_cpu_csr_read(CSR_MIP) == tmp_a) {
neorv32_cpu_eint(); // allow IRQs to fire again
asm volatile ("nop");
asm volatile ("nop"); // irq should kick in HERE
if (neorv32_cpu_csr_read(CSR_MCAUSE) == TRAP_CODE_FIRQ_7) { // make sure FIRQ7 was last IRQ to be handled
test_ok();
}
else {
test_fail();
}
}
else {
test_fail();
}
 
neorv32_cpu_eint(); // re-enable IRQs globally
 
 
// ----------------------------------------------------------
// Test WFI ("sleep") instructions, wakeup via MTIME
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
1227,7 → 1252,7
 
}
else {
neorv32_uart_printf("skipped (not possible when U-EXT disabled)\n");
neorv32_uart_printf("skipped (n.a. without U-ext)\n");
}
 
 
1480,56 → 1505,25
 
 
// ----------------------------------------------------------
// Test AMO atomic operation - should raise illegal instruction exception
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCAUSE, 0);
neorv32_uart_printf("[%i] Atomic AMOSWAP test (should raise illegal CMD exception): ", cnt_test);
 
#ifdef __riscv_atomic
// skip if A-mode is not implemented
if ((neorv32_cpu_csr_read(CSR_MISA) & (1<<CSR_MISA_A_EXT)) != 0) {
 
cnt_test++;
 
// AMO operations are not implemented!
// this should cause an illegal instruction exception
asm volatile ("amoswap.w x0, x0, (x0)");
 
// atomic compare-and-swap
if (neorv32_cpu_csr_read(CSR_MCAUSE) == TRAP_CODE_I_ILLEGAL) {
test_ok();
}
else {
test_fail();
}
}
else {
neorv32_uart_printf("skipped (not implemented)\n");
}
#else
neorv32_uart_printf("skipped (not implemented)\n");
#endif
 
 
// ----------------------------------------------------------
// HPM reports
// ----------------------------------------------------------
neorv32_cpu_csr_write(CSR_MCOUNTINHIBIT, -1); // stop all counters
neorv32_uart_printf("\n\n-- HPM reports (%u HPMs available) --\n", num_hpm_cnts_global);
neorv32_uart_printf("#IR - Total number of instructions: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_INSTRET)); // = HPM_0
neorv32_uart_printf("#CY - Total number of clock cycles: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_CYCLE)); // = HPM_2
neorv32_uart_printf("#03 - Retired compr. instructions: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER3));
neorv32_uart_printf("#04 - I-fetch wait cycles: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER4));
neorv32_uart_printf("#05 - I-issue wait cycles: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER5));
neorv32_uart_printf("#06 - Multi-cycle ALU wait cycles: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER6));
neorv32_uart_printf("#07 - Load operations: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER7));
neorv32_uart_printf("#08 - Store operations: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER8));
neorv32_uart_printf("#09 - Load/store wait cycles: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER9));
neorv32_uart_printf("#10 - Unconditional jumps: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER10));
neorv32_uart_printf("#11 - Conditional branches (all): %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER11));
neorv32_uart_printf("#12 - Conditional branches (taken): %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER12));
neorv32_uart_printf("#13 - Entered traps: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER13));
neorv32_uart_printf("#14 - Illegal operations: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER14));
neorv32_uart_printf("#IR - Total number of instr.: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_INSTRET)); // = HPM_0
//neorv32_uart_printf("#TM - Current system time: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_TIME)); // = HPM_1
neorv32_uart_printf("#CY - Total number of clk cyc.: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_CYCLE)); // = HPM_2
neorv32_uart_printf("#03 - Retired compr. instr.: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER3));
neorv32_uart_printf("#04 - I-fetch wait cyc.: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER4));
neorv32_uart_printf("#05 - I-issue wait cyc.: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER5));
neorv32_uart_printf("#06 - Multi-cyc. ALU wait cyc.: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER6));
neorv32_uart_printf("#07 - Load operations: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER7));
neorv32_uart_printf("#08 - Store operations: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER8));
neorv32_uart_printf("#09 - Load/store wait cycles: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER9));
neorv32_uart_printf("#10 - Unconditional jumps: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER10));
neorv32_uart_printf("#11 - Cond. branches (all): %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER11));
neorv32_uart_printf("#12 - Cond. branches (taken): %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER12));
neorv32_uart_printf("#13 - Entered traps: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER13));
neorv32_uart_printf("#14 - Illegal operations: %u\n", (uint32_t)neorv32_cpu_csr_read(CSR_MHPMCOUNTER14));
 
 
// ----------------------------------------------------------
1550,6 → 1544,17
 
 
/**********************************************************************//**
* Simulation-based function to trigger CPU interrupts (MSI, MEI, FIRQ4..7).
*
* @param[in] sel IRQ select mask (bit positions according to #NEORV32_CSR_MIE_enum).
**************************************************************************/
void sim_irq_trigger(uint32_t sel) {
 
*(IO_REG32 (0xFF000000)) = sel;
}
 
 
/**********************************************************************//**
* Trap handler for ALL exceptions/interrupts.
**************************************************************************/
void global_trap_handler(void) {
/sw/example/demo_trng/main.c
36,7 → 36,7
/**********************************************************************//**
* @file demo_trng/main.c
* @author Stephan Nolting
* @brief TRNG demo program.
* @brief True random number generator demo program.
**************************************************************************/
 
#include <neorv32.h>
51,9 → 51,13
/**@}*/
 
 
// prototypes
void print_random_data(void);
void generate_histogram(void);
 
 
/**********************************************************************//**
* This program generates a simple dimming sequence for PWM channel 0,1,2.
* Simple true random number test/demo program.
*
* @note This program requires the UART and the TRNG to be synthesized.
*
61,14 → 65,6
**************************************************************************/
int main(void) {
 
uint8_t lucky_numbers_5of50[5];
uint8_t lucky_numbers_2of10[2];
 
int err;
uint8_t i, j, probe;
uint8_t trng_data;
unsigned int num_samples;
 
// check if UART unit is implemented at all
if (neorv32_uart_available() == 0) {
return 0;
102,7 → 98,7
// main menu
neorv32_uart_printf("\nCommands:\n"
" n: Print 8-bit random numbers (abort by pressing any key)\n"
" l: Print your lucky numbers\n");
" h: Generate and print histogram\n");
 
neorv32_uart_printf("CMD:> ");
char cmd = neorv32_uart_getc();
109,104 → 105,101
neorv32_uart_putc(cmd); // echo
neorv32_uart_printf("\n");
 
// output RND data
if (cmd == 'n') {
num_samples = 0;
while(1) {
err = neorv32_trng_get(&trng_data);
if (err) {
neorv32_uart_printf("\nTRNG error (%i)!\n", err);
break;
}
neorv32_uart_printf("%u ", (uint32_t)(trng_data));
num_samples++;
if (neorv32_uart_char_received()) { // abort when key pressed
neorv32_uart_printf("\nPrinted samples: %u", num_samples);
break;
}
}
print_random_data();
}
else if (cmd == 'h') {
generate_histogram();
}
else {
neorv32_uart_printf("Invalid command.\n");
}
}
 
// print lucky numbers
if (cmd == 'l') {
// reset arrays
for (i=0; i<5; i++) {
lucky_numbers_5of50[i] = 0;
}
lucky_numbers_2of10[0] = 0;
lucky_numbers_2of10[1] = 0;
return 0;
}
 
// get numbers
i = 0;
while (i<5) {
err = neorv32_trng_get(&trng_data);
if (err) {
neorv32_uart_printf("\nTRNG error (%i)!\n", err);
break;
}
// valid range?
if ((trng_data == 0) || (trng_data > 50)) {
continue;
}
// already sampled?
probe = 0;
for (j=0; j<5; j++) {
if (lucky_numbers_5of50[j] == trng_data) {
probe++;
}
}
if (probe) {
continue;
}
else {
lucky_numbers_5of50[i] = trng_data;
i++;
}
}
 
// get numbers part 2
i = 0;
while (i<2) {
err = neorv32_trng_get(&trng_data);
if (err) {
neorv32_uart_printf("\nTRNG error (%i)!\n", err);
break;
}
// valid range?
if ((trng_data == 0) || (trng_data > 10)) {
continue;
}
// already sampled?
probe = 0;
for (j=0; j<2; j++) {
if (lucky_numbers_2of10[j] == trng_data) {
probe++;
}
}
if (probe) {
continue;
}
else {
lucky_numbers_2of10[i] = trng_data;
i++;
}
}
/**********************************************************************//**
* Print random numbers until a key is pressed.
**************************************************************************/
void print_random_data(void) {
 
// output
neorv32_uart_printf("\n");
for (j=0; j<5; j++) {
if (i==4) {
neorv32_uart_printf("%u", (uint32_t)lucky_numbers_5of50[j]);
}
else {
neorv32_uart_printf("%u, ", (uint32_t)lucky_numbers_5of50[j]);
}
}
neorv32_uart_printf("\nLucky numbers: %u, %u\n", (uint32_t)lucky_numbers_2of10[0], (uint32_t)lucky_numbers_2of10[1]);
uint32_t num_samples = 0;
int err = 0;
uint8_t trng_data;
 
while(1) {
err = neorv32_trng_get(&trng_data);
if (err) {
neorv32_uart_printf("\nTRNG error!\n");
break;
}
neorv32_uart_printf("%u ", (uint32_t)(trng_data));
num_samples++;
if (neorv32_uart_char_received()) { // abort when key pressed
break;
}
}
neorv32_uart_printf("\nPrinted samples: %u\n", num_samples);
}
 
return 0;
 
/**********************************************************************//**
* Generate and print histogram. Samples random data until a key is pressed.
**************************************************************************/
void generate_histogram(void) {
 
uint32_t hist[256];
uint32_t i;
uint32_t cnt = 0;
int err = 0;
uint8_t trng_data;
 
neorv32_uart_printf("Press any key to start.\n");
 
while(neorv32_uart_char_received() == 0);
neorv32_uart_printf("Sampling... Press any key to stop.\n");
 
// clear histogram
for (i=0; i<256; i++) {
hist[i] = 0;
}
 
// sample random data
while(1) {
 
err = neorv32_trng_get(&trng_data);
hist[trng_data & 0xff]++;
cnt++;
 
if (err) {
neorv32_uart_printf("\nTRNG error!\n");
break;
}
 
if (neorv32_uart_char_received()) { // abort when key pressed
break;
}
 
if (cnt & 0x80000000UL) { // to prevent overflow
break;
}
}
 
// print histogram
neorv32_uart_printf("Histogram [random data value] : [# occurences]\n");
for (i=0; i<256; i++) {
neorv32_uart_printf("%u: %u\n", (uint32_t)i, hist[i]);
}
 
neorv32_uart_printf("\nSamples: %u\n", cnt);
 
// average
uint64_t average = 0;
for (i=0; i<256; i++) {
average += (uint64_t)hist[i] * i;
}
average = average / ((uint64_t)cnt);
neorv32_uart_printf("Average value: %u\n", (uint32_t)average);
}
 
/sw/example/demo_wdt/main.c
75,7 → 75,6
// this is not required, but keeps us safe
neorv32_rte_setup();
 
 
// init UART at default baud rate, no parity bits, no rx interrupt, no tx interrupt
neorv32_uart_setup(BAUD_RATE, 0b00, 0, 0);
 
90,25 → 89,23
neorv32_uart_print("Cause of last processor reset: ");
uint8_t wdt_cause = neorv32_wdt_get_cause();
 
if (wdt_cause == 1) {
if (wdt_cause == 0) {
neorv32_uart_print("External reset\n");
}
else if (wdt_cause == 2) {
neorv32_uart_print("Watchdog timeout\n");
else if (wdt_cause == 1) {
neorv32_uart_print("Watchdog\n");
}
else if (wdt_cause == 3) {
neorv32_uart_print("Watchdog access fault\n");
}
else {
neorv32_uart_print("Undefined\n");
}
 
 
// the watchod has a 20-bit counter, which trigger either an interrupt or a system reset
// the watchod has a 20-bit counter, which triggers either an interrupt or a system reset
// when overflowing
 
// init watchdog (watchdog timer increment = cpu_clock/64, trigger reset on overflow)
neorv32_wdt_setup(CLK_PRSC_64, 1);
// init watchdog (watchdog timer increment = cpu_clock/64, trigger reset on overflow, lock
// access so nobody can alter the configuration until next reset)
neorv32_wdt_setup(CLK_PRSC_64, 1, 1);
 
 
 
/sw/lib/include/neorv32.h
372,7 → 372,11
CSR_MIE_FIRQ0E = 16, /**< CPU mie CSR (16): FIRQ0E - Fast interrupt channel 0 enable bit (r/w) */
CSR_MIE_FIRQ1E = 17, /**< CPU mie CSR (17): FIRQ1E - Fast interrupt channel 1 enable bit (r/w) */
CSR_MIE_FIRQ2E = 18, /**< CPU mie CSR (18): FIRQ2E - Fast interrupt channel 2 enable bit (r/w) */
CSR_MIE_FIRQ3E = 19 /**< CPU mie CSR (19): FIRQ3E - Fast interrupt channel 3 enable bit (r/w) */
CSR_MIE_FIRQ3E = 19, /**< CPU mie CSR (19): FIRQ3E - Fast interrupt channel 3 enable bit (r/w) */
CSR_MIE_FIRQ4E = 20, /**< CPU mie CSR (20): FIRQ4E - Fast interrupt channel 4 enable bit (r/w) */
CSR_MIE_FIRQ5E = 21, /**< CPU mie CSR (21): FIRQ5E - Fast interrupt channel 5 enable bit (r/w) */
CSR_MIE_FIRQ6E = 22, /**< CPU mie CSR (22): FIRQ6E - Fast interrupt channel 6 enable bit (r/w) */
CSR_MIE_FIRQ7E = 23 /**< CPU mie CSR (23): FIRQ7E - Fast interrupt channel 7 enable bit (r/w) */
};
 
 
387,7 → 391,11
CSR_MIP_FIRQ0P = 16, /**< CPU mip CSR (16): FIRQ0P - Fast interrupt channel 0 pending (r/-) */
CSR_MIP_FIRQ1P = 17, /**< CPU mip CSR (17): FIRQ1P - Fast interrupt channel 1 pending (r/-) */
CSR_MIP_FIRQ2P = 18, /**< CPU mip CSR (18): FIRQ2P - Fast interrupt channel 2 pending (r/-) */
CSR_MIP_FIRQ3P = 19 /**< CPU mip CSR (19): FIRQ3P - Fast interrupt channel 3 pending (r/-) */
CSR_MIP_FIRQ3P = 19, /**< CPU mip CSR (19): FIRQ3P - Fast interrupt channel 3 pending (r/-) */
CSR_MIP_FIRQ4P = 20, /**< CPU mip CSR (20): FIRQ4P - Fast interrupt channel 4 pending (r/-) */
CSR_MIP_FIRQ5P = 21, /**< CPU mip CSR (21): FIRQ5P - Fast interrupt channel 5 pending (r/-) */
CSR_MIP_FIRQ6P = 22, /**< CPU mip CSR (22): FIRQ6P - Fast interrupt channel 6 pending (r/-) */
CSR_MIP_FIRQ7P = 23 /**< CPU mip CSR (23): FIRQ7P - Fast interrupt channel 7 pending (r/-) */
};
 
 
463,7 → 471,11
TRAP_CODE_FIRQ_0 = 0x80000010, /**< 1.16: Fast interrupt channel 0 */
TRAP_CODE_FIRQ_1 = 0x80000011, /**< 1.17: Fast interrupt channel 1 */
TRAP_CODE_FIRQ_2 = 0x80000012, /**< 1.18: Fast interrupt channel 2 */
TRAP_CODE_FIRQ_3 = 0x80000013 /**< 1.19: Fast interrupt channel 3 */
TRAP_CODE_FIRQ_3 = 0x80000013, /**< 1.19: Fast interrupt channel 3 */
TRAP_CODE_FIRQ_4 = 0x80000014, /**< 1.20: Fast interrupt channel 4 */
TRAP_CODE_FIRQ_5 = 0x80000015, /**< 1.21: Fast interrupt channel 5 */
TRAP_CODE_FIRQ_6 = 0x80000016, /**< 1.22: Fast interrupt channel 6 */
TRAP_CODE_FIRQ_7 = 0x80000017 /**< 1.23: Fast interrupt channel 7 */
};
 
 
471,14 → 483,14
* Processor clock prescalers
**************************************************************************/
enum NEORV32_CLOCK_PRSC_enum {
CLK_PRSC_2 = 0, /**< CPU_CLK / 2 */
CLK_PRSC_4 = 1, /**< CPU_CLK / 4 */
CLK_PRSC_8 = 2, /**< CPU_CLK / 8 */
CLK_PRSC_64 = 3, /**< CPU_CLK / 64 */
CLK_PRSC_128 = 4, /**< CPU_CLK / 128 */
CLK_PRSC_1024 = 5, /**< CPU_CLK / 1024 */
CLK_PRSC_2048 = 6, /**< CPU_CLK / 2048 */
CLK_PRSC_4096 = 7 /**< CPU_CLK / 4096 */
CLK_PRSC_2 = 0, /**< CPU_CLK (from clk_i top signal) / 2 */
CLK_PRSC_4 = 1, /**< CPU_CLK (from clk_i top signal) / 4 */
CLK_PRSC_8 = 2, /**< CPU_CLK (from clk_i top signal) / 8 */
CLK_PRSC_64 = 3, /**< CPU_CLK (from clk_i top signal) / 64 */
CLK_PRSC_128 = 4, /**< CPU_CLK (from clk_i top signal) / 128 */
CLK_PRSC_1024 = 5, /**< CPU_CLK (from clk_i top signal) / 1024 */
CLK_PRSC_2048 = 6, /**< CPU_CLK (from clk_i top signal) / 2048 */
CLK_PRSC_4096 = 7 /**< CPU_CLK (from clk_i top signal) / 4096 */
};
 
 
523,11 → 535,82
/** bootloader memory base address (r/-/x) */
#define BOOTLOADER_BASE_ADDRESS (0xFFFF0000UL)
/** peripheral/IO devices memory base address (r/w/x) */
#define IO_BASE_ADDRESS (0xFFFFFF80UL)
#define IO_BASE_ADDRESS (0xFFFFFF00UL)
/**@}*/
 
 
/**********************************************************************//**
* @name IO Device: Custom Functions Subsystem (CFS)
**************************************************************************/
/**@{*/
/** custom CFS register 0 */
#define CFS_REG_0 (*(IO_REG32 0xFFFFFF00UL)) // /**< (r)/(w): CFS register 0, user-defined */
/** custom CFS register 1 */
#define CFS_REG_1 (*(IO_REG32 0xFFFFFF04UL)) // /**< (r)/(w): CFS register 1, user-defined */
/** custom CFS register 2 */
#define CFS_REG_2 (*(IO_REG32 0xFFFFFF08UL)) // /**< (r)/(w): CFS register 2, user-defined */
/** custom CFS register 3 */
#define CFS_REG_3 (*(IO_REG32 0xFFFFFF0CUL)) // /**< (r)/(w): CFS register 3, user-defined */
/** custom CFS register 4 */
#define CFS_REG_4 (*(IO_REG32 0xFFFFFF10UL)) // /**< (r)/(w): CFS register 4, user-defined */
/** custom CFS register 5 */
#define CFS_REG_5 (*(IO_REG32 0xFFFFFF14UL)) // /**< (r)/(w): CFS register 5, user-defined */
/** custom CFS register 6 */
#define CFS_REG_6 (*(IO_REG32 0xFFFFFF18UL)) // /**< (r)/(w): CFS register 6, user-defined */
/** custom CFS register 7 */
#define CFS_REG_7 (*(IO_REG32 0xFFFFFF1CUL)) // /**< (r)/(w): CFS register 7, user-defined */
/** custom CFS register 8 */
#define CFS_REG_8 (*(IO_REG32 0xFFFFFF20UL)) // /**< (r)/(w): CFS register 8, user-defined */
/** custom CFS register 9 */
#define CFS_REG_9 (*(IO_REG32 0xFFFFFF24UL)) // /**< (r)/(w): CFS register 9, user-defined */
/** custom CFS register 10 */
#define CFS_REG_10 (*(IO_REG32 0xFFFFFF28UL)) // /**< (r)/(w): CFS register 10, user-defined */
/** custom CFS register 11 */
#define CFS_REG_11 (*(IO_REG32 0xFFFFFF2CUL)) // /**< (r)/(w): CFS register 11, user-defined */
/** custom CFS register 12 */
#define CFS_REG_12 (*(IO_REG32 0xFFFFFF30UL)) // /**< (r)/(w): CFS register 12, user-defined */
/** custom CFS register 13 */
#define CFS_REG_13 (*(IO_REG32 0xFFFFFF34UL)) // /**< (r)/(w): CFS register 13, user-defined */
/** custom CFS register 14 */
#define CFS_REG_14 (*(IO_REG32 0xFFFFFF38UL)) // /**< (r)/(w): CFS register 14, user-defined */
/** custom CFS register 15 */
#define CFS_REG_15 (*(IO_REG32 0xFFFFFF3CUL)) // /**< (r)/(w): CFS register 15, user-defined */
/** custom CFS register 16 */
#define CFS_REG_16 (*(IO_REG32 0xFFFFFF40UL)) // /**< (r)/(w): CFS register 16, user-defined */
/** custom CFS register 17 */
#define CFS_REG_17 (*(IO_REG32 0xFFFFFF44UL)) // /**< (r)/(w): CFS register 17, user-defined */
/** custom CFS register 18 */
#define CFS_REG_18 (*(IO_REG32 0xFFFFFF48UL)) // /**< (r)/(w): CFS register 18, user-defined */
/** custom CFS register 19 */
#define CFS_REG_19 (*(IO_REG32 0xFFFFFF4CUL)) // /**< (r)/(w): CFS register 19, user-defined */
/** custom CFS register 20 */
#define CFS_REG_20 (*(IO_REG32 0xFFFFFF50UL)) // /**< (r)/(w): CFS register 20, user-defined */
/** custom CFS register 21 */
#define CFS_REG_21 (*(IO_REG32 0xFFFFFF54UL)) // /**< (r)/(w): CFS register 21, user-defined */
/** custom CFS register 22 */
#define CFS_REG_22 (*(IO_REG32 0xFFFFFF58UL)) // /**< (r)/(w): CFS register 22, user-defined */
/** custom CFS register 23 */
#define CFS_REG_23 (*(IO_REG32 0xFFFFFF5CUL)) // /**< (r)/(w): CFS register 23, user-defined */
/** custom CFS register 24 */
#define CFS_REG_24 (*(IO_REG32 0xFFFFFF60UL)) // /**< (r)/(w): CFS register 24, user-defined */
/** custom CFS register 25 */
#define CFS_REG_25 (*(IO_REG32 0xFFFFFF64UL)) // /**< (r)/(w): CFS register 25, user-defined */
/** custom CFS register 26 */
#define CFS_REG_26 (*(IO_REG32 0xFFFFFF68UL)) // /**< (r)/(w): CFS register 26, user-defined */
/** custom CFS register 27 */
#define CFS_REG_27 (*(IO_REG32 0xFFFFFF6CUL)) // /**< (r)/(w): CFS register 27, user-defined */
/** custom CFS register 28 */
#define CFS_REG_28 (*(IO_REG32 0xFFFFFF70UL)) // /**< (r)/(w): CFS register 28, user-defined */
/** custom CFS register 29 */
#define CFS_REG_29 (*(IO_REG32 0xFFFFFF74UL)) // /**< (r)/(w): CFS register 29, user-defined */
/** custom CFS register 30 */
#define CFS_REG_30 (*(IO_REG32 0xFFFFFF78UL)) // /**< (r)/(w): CFS register 30, user-defined */
/** custom CFS register 31 */
#define CFS_REG_31 (*(IO_REG32 0xFFFFFF7CUL)) // /**< (r)/(w): CFS register 31, user-defined */
/**@}*/
 
 
/**********************************************************************//**
* @name IO Device: General Purpose Input/Output Port Unit (GPIO)
**************************************************************************/
/**@{*/
547,12 → 630,11
 
/** TRNG control/data register bits */
enum NEORV32_TRNG_CT_enum {
TRNG_CT_DATA_LSB = 0, /**< TRNG data/control register(0) (r/-): Random data (8-bit) LSB */
TRNG_CT_DATA_MSB = 7, /**< TRNG data/control register(7) (r/-): Random data (8-bit) MSB */
TRNG_CT_VALID = 15, /**< TRNG data/control register(15) (r/-): Random data output valid */
TRNG_CT_ERROR_0 = 16, /**< TRNG data/control register(16) (r/-): Stuck-at-zero error */
TRNG_CT_ERROR_1 = 17, /**< TRNG data/control register(17) (r/-): Stuck-at-one error */
TRNG_CT_EN = 31 /**< TRNG data/control register(31) (r/w): TRNG enable */
TRNG_CT_DATA_LSB = 0, /**< TRNG data/control register(0) (r/-): Random data byte LSB */
TRNG_CT_DATA_MSB = 7, /**< TRNG data/control register(7) (r/-): Random data byte MSB */
 
TRNG_CT_EN = 30, /**< TRNG data/control register(30) (r/w): TRNG enable */
TRNG_CT_VALID = 31 /**< TRNG data/control register(31) (r/-): Random data output valid */
};
/**@}*/
 
566,20 → 648,16
 
/** WTD control register bits */
enum NEORV32_WDT_CT_enum {
WDT_CT_CLK_SEL0 = 0, /**< WDT control register(0) (r/w): Clock prescaler select bit 0 */
WDT_CT_CLK_SEL1 = 1, /**< WDT control register(1) (r/w): Clock prescaler select bit 1 */
WDT_CT_CLK_SEL2 = 2, /**< WDT control register(2) (r/w): Clock prescaler select bit 2 */
WDT_CT_EN = 3, /**< WDT control register(3) (r/w): Watchdog enable */
WDT_CT_MODE = 4, /**< WDT control register(4) (r/w): Watchdog mode; when 0: timeout causes interrupt; when 1: timeout causes processor reset */
WDT_CT_CAUSE = 5, /**< WDT control register(5) (r/-): Last action (reset/IRQ) cause (0: external reset, 1: watchdog timeout) */
WDT_CT_PWFAIL = 6, /**< WDT control register(6) (r/-): Last Watchdog action (reset/IRQ) caused by wrong password when 1 */
 
WDT_CT_PASSWORD_LSB = 8, /**< WDT control register(8) (-/w): First bit / position begin for watchdog access password */
WDT_CT_PASSWORD_MSB = 15 /**< WDT control register(15) (-/w): Last bit / position end for watchdog access password */
WDT_CT_EN = 0, /**< WDT control register(0) (r/w): Watchdog enable */
WDT_CT_CLK_SEL0 = 1, /**< WDT control register(1) (r/w): Clock prescaler select bit 0 */
WDT_CT_CLK_SEL1 = 2, /**< WDT control register(2) (r/w): Clock prescaler select bit 1 */
WDT_CT_CLK_SEL2 = 3, /**< WDT control register(3) (r/w): Clock prescaler select bit 2 */
WDT_CT_MODE = 4, /**< WDT control register(4) (r/w): Watchdog mode: 0=timeout causes interrupt, 1=timeout causes processor reset */
WDT_CT_RCAUSE = 5, /**< WDT control register(5) (r/-): Cause of last system reset: 0=external reset, 1=watchdog */
WDT_CT_RESET = 6, /**< WDT control register(6) (-/w): Reset WDT counter when set, auto-clears */
WDT_CT_FORCE = 7, /**< WDT control register(7) (-/w): Force WDT action, auto-clears */
WDT_CT_LOCK = 8 /**< WDT control register(8) (r/w): Lock write access to control register, clears on reset (HW or WDT) only */
};
 
/** Watchdog access passwort, must be set in WDT_CT bits 15:8 for every control register access */
#define WDT_PASSWORD 0x47
/**@}*/
 
 
645,6 → 723,7
enum NEORV32_UART_DATA_enum {
UART_DATA_LSB = 0, /**< UART receive/transmit data register(0) (r/w): Receive/transmit data LSB (bit 0) */
UART_DATA_MSB = 7, /**< UART receive/transmit data register(7) (r/w): Receive/transmit data MSB (bit 7) */
 
UART_DATA_PERR = 28, /**< UART receive/transmit data register(18) (r/-): RX parity error detected when set */
UART_DATA_FERR = 29, /**< UART receive/transmit data register(29) (r/-): RX frame error (not valid stop bit) wdetected when set */
UART_DATA_OVERR = 30, /**< UART receive/transmit data register(30) (r/-): RX data overrun when set */
752,36 → 831,6
 
 
/**********************************************************************//**
* @name IO Device: Custom Functions Unit 0 (CFU0)
**************************************************************************/
/**@{*/
/** CFU0 register 0 ((r)/(w)) */
#define CFU0_REG_0 (*(IO_REG32 0xFFFFFFC0UL)) // (r)/(w): CFU0 register 0, user-defined
/** CFU0 register 1 ((r)/(w)) */
#define CFU0_REG_1 (*(IO_REG32 0xFFFFFFC4UL)) // (r)/(w): CFU0 register 1, user-defined
/** CFU0 register 2 ((r)/(w)) */
#define CFU0_REG_2 (*(IO_REG32 0xFFFFFFC8UL)) // (r)/(w): CFU0 register 2, user-defined
/** CFU0 register 3 ((r)/(w)) */
#define CFU0_REG_3 (*(IO_REG32 0xFFFFFFCCUL)) // (r)/(w): CFU0 register 3, user-defined
/**@}*/
 
 
/**********************************************************************//**
* @name IO Device: Custom Functions Unit 1 (CFU1)
**************************************************************************/
/**@{*/
/** CFU1 register 0 ((r)/(w)) */
#define CFU1_REG_0 (*(IO_REG32 0xFFFFFFD0UL)) // (r)/(w): CFU1 register 0, user-defined
/** CFU1 register 1 ((r)/(w)) */
#define CFU1_REG_1 (*(IO_REG32 0xFFFFFFD4UL)) // (r)/(w): CFU1 register 1, user-defined
/** CFU1 register 2 ((r)/(w)) */
#define CFU1_REG_2 (*(IO_REG32 0xFFFFFFD8UL)) // (r)/(w): CFU1 register 2, user-defined
/** CFU1 register 3 ((r)/(w)) */
#define CFU1_REG_3 (*(IO_REG32 0xFFFFFFDCUL)) // (r)/(w): CFU1 register 3, user-defined
/**@}*/
 
 
/**********************************************************************//**
* @name IO Device: System Configuration Info Memory (SYSINFO)
**************************************************************************/
/**@{*/
822,9 → 871,8
SYSINFO_FEATURES_IO_TWI = 20, /**< SYSINFO_FEATURES (20) (r/-): Two-wire interface implemented when 1 (via IO_TWI_EN generic) */
SYSINFO_FEATURES_IO_PWM = 21, /**< SYSINFO_FEATURES (21) (r/-): Pulse-width modulation unit implemented when 1 (via IO_PWM_EN generic) */
SYSINFO_FEATURES_IO_WDT = 22, /**< SYSINFO_FEATURES (22) (r/-): Watchdog timer implemented when 1 (via IO_WDT_EN generic) */
SYSINFO_FEATURES_IO_CFU0 = 23, /**< SYSINFO_FEATURES (23) (r/-): Custom functions unit 0 implemented when 1 (via IO_CFU0_EN generic) */
SYSINFO_FEATURES_IO_TRNG = 24, /**< SYSINFO_FEATURES (24) (r/-): True random number generator implemented when 1 (via IO_TRNG_EN generic) */
SYSINFO_FEATURES_IO_CFU1 = 25 /**< SYSINFO_FEATURES (25) (r/-): Custom functions unit 1 implemented when 1 (via IO_CFU1_EN generic) */
SYSINFO_FEATURES_IO_CFS = 23, /**< SYSINFO_FEATURES (23) (r/-): Custom functions subsystem implemented when 1 (via IO_CFS_EN generic) */
SYSINFO_FEATURES_IO_TRNG = 24 /**< SYSINFO_FEATURES (24) (r/-): True random number generator implemented when 1 (via IO_TRNG_EN generic) */
};
 
/**********************************************************************//**
863,7 → 911,7
#include "neorv32_rte.h"
 
// io/peripheral devices
#include "neorv32_cfu.h"
#include "neorv32_cfs.h"
#include "neorv32_gpio.h"
#include "neorv32_mtime.h"
#include "neorv32_pwm.h"
/sw/lib/include/neorv32_cfs.h
0,0 → 1,53
// #################################################################################################
// # << NEORV32: neorv32_cfs.h - Custom Functions Subsystem (CFS)) HW Driver (stub) >> #
// # ********************************************************************************************* #
// # BSD 3-Clause License #
// # #
// # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
// # #
// # Redistribution and use in source and binary forms, with or without modification, are #
// # permitted provided that the following conditions are met: #
// # #
// # 1. Redistributions of source code must retain the above copyright notice, this list of #
// # conditions and the following disclaimer. #
// # #
// # 2. Redistributions in binary form must reproduce the above copyright notice, this list of #
// # conditions and the following disclaimer in the documentation and/or other materials #
// # provided with the distribution. #
// # #
// # 3. Neither the name of the copyright holder nor the names of its contributors may be used to #
// # endorse or promote products derived from this software without specific prior written #
// # permission. #
// # #
// # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS #
// # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF #
// # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE #
// # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
// # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE #
// # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED #
// # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING #
// # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED #
// # OF THE POSSIBILITY OF SUCH DAMAGE. #
// # ********************************************************************************************* #
// # The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting #
// #################################################################################################
 
 
/**********************************************************************//**
* @file neorv32_cfs.h
* @author Stephan Nolting
* @brief Custom Functions Subsystem (CFS)) HW driver header file.
*
* @warning There are no "real" CFS driver functions available here, because these functions are defined by the actual hardware.
* @warning Hence, the CFS designer has to provide the actual driver functions.
*
* @note These functions should only be used if the CFS was synthesized (IO_CFS_EN = true).
**************************************************************************/
 
#ifndef neorv32_cfs_h
#define neorv32_cfs_h
 
// prototypes
int neorv32_cfs_available(void);
 
#endif // neorv32_cfs_h
/sw/lib/include/neorv32_rte.h
62,7 → 62,11
RTE_TRAP_FIRQ_0 = 13, /**< Fast interrupt channel 0 */
RTE_TRAP_FIRQ_1 = 14, /**< Fast interrupt channel 1 */
RTE_TRAP_FIRQ_2 = 15, /**< Fast interrupt channel 2 */
RTE_TRAP_FIRQ_3 = 16 /**< Fast interrupt channel 3 */
RTE_TRAP_FIRQ_3 = 16, /**< Fast interrupt channel 3 */
RTE_TRAP_FIRQ_4 = 17, /**< Fast interrupt channel 4 */
RTE_TRAP_FIRQ_5 = 18, /**< Fast interrupt channel 5 */
RTE_TRAP_FIRQ_6 = 19, /**< Fast interrupt channel 6 */
RTE_TRAP_FIRQ_7 = 20 /**< Fast interrupt channel 7 */
};
 
// prototypes
/sw/lib/include/neorv32_wdt.h
46,10 → 46,10
 
// prototypes
int neorv32_wdt_available(void);
void neorv32_wdt_setup(uint8_t clk_prsc, uint8_t timeout_mode);
void neorv32_wdt_disable(void);
void neorv32_wdt_setup(uint8_t prsc, uint8_t mode, uint8_t lock);
int neorv32_wdt_disable(void);
void neorv32_wdt_reset(void);
uint8_t neorv32_wdt_get_cause(void);
int neorv32_wdt_get_cause(void);
void neorv32_wdt_force(void);
 
#endif // neorv32_wdt_h
/sw/lib/source/neorv32_cfs.c
0,0 → 1,65
// #################################################################################################
// # << NEORV32: neorv32_cfs.c - Custom Functions Subsystem (CFS) HW Driver (stub) >> #
// # ********************************************************************************************* #
// # BSD 3-Clause License #
// # #
// # Copyright (c) 2021, Stephan Nolting. All rights reserved. #
// # #
// # Redistribution and use in source and binary forms, with or without modification, are #
// # permitted provided that the following conditions are met: #
// # #
// # 1. Redistributions of source code must retain the above copyright notice, this list of #
// # conditions and the following disclaimer. #
// # #
// # 2. Redistributions in binary form must reproduce the above copyright notice, this list of #
// # conditions and the following disclaimer in the documentation and/or other materials #
// # provided with the distribution. #
// # #
// # 3. Neither the name of the copyright holder nor the names of its contributors may be used to #
// # endorse or promote products derived from this software without specific prior written #
// # permission. #
// # #
// # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS #
// # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF #
// # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE #
// # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #
// # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE #
// # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED #
// # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING #
// # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED #
// # OF THE POSSIBILITY OF SUCH DAMAGE. #
// # ********************************************************************************************* #
// # The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting #
// #################################################################################################
 
 
/**********************************************************************//**
* @file neorv32_cfs.c
* @author Stephan Nolting
* @brief Custom Functions Subsystem (CFS) HW driver source file.
*
* @warning There are no "real" CFS driver functions available here, because these functions are defined by the actual hardware.
* @warning Hence, the CFS designer has to provide the actual driver functions.
*
* @note These functions should only be used if the CFS was synthesized (IO_CFS_EN = true).
**************************************************************************/
 
#include "neorv32.h"
#include "neorv32_cfs.h"
 
 
/**********************************************************************//**
* Check if custom functions unit 0 was synthesized.
*
* @return 0 if CFS was not synthesized, 1 if CFS is available.
**************************************************************************/
int neorv32_cfs_available(void) {
 
if (SYSINFO_FEATURES & (1 << SYSINFO_FEATURES_IO_CFS)) {
return 1;
}
else {
return 0;
}
}
 
/sw/lib/source/neorv32_cpu.c
47,11 → 47,31
/**********************************************************************//**
* >Private< helper functions.
**************************************************************************/
static int __neorv32_cpu_irq_id_check(uint8_t irq_sel);
static uint32_t __neorv32_cpu_pmp_cfg_read(uint32_t index);
static void __neorv32_cpu_pmp_cfg_write(uint32_t index, uint32_t data);
 
 
/**********************************************************************//**
* Private function: Check IRQ id.
*
* @param[in] irq_sel CPU interrupt select. See #NEORV32_CSR_MIE_enum.
* @return 0 if success, 1 if error (invalid irq_sel).
**************************************************************************/
static int __neorv32_cpu_irq_id_check(uint8_t irq_sel) {
 
if ((irq_sel == CSR_MIE_MSIE) || (irq_sel == CSR_MIE_MTIE) || (irq_sel == CSR_MIE_MEIE) ||
(irq_sel == CSR_MIE_FIRQ0E) || (irq_sel == CSR_MIE_FIRQ1E) || (irq_sel == CSR_MIE_FIRQ2E) || (irq_sel == CSR_MIE_FIRQ3E) ||
(irq_sel == CSR_MIE_FIRQ4E) || (irq_sel == CSR_MIE_FIRQ5E) || (irq_sel == CSR_MIE_FIRQ6E) || (irq_sel == CSR_MIE_FIRQ7E)) {
return 0;
}
else {
return 1;
}
}
 
 
/**********************************************************************//**
* Enable specific CPU interrupt.
*
* @note Interrupts have to be globally enabled via neorv32_cpu_eint(void), too.
61,8 → 81,8
**************************************************************************/
int neorv32_cpu_irq_enable(uint8_t irq_sel) {
 
if ((irq_sel != CSR_MIE_MSIE) && (irq_sel != CSR_MIE_MTIE) && (irq_sel != CSR_MIE_MEIE) &&
(irq_sel != CSR_MIE_FIRQ0E) && (irq_sel != CSR_MIE_FIRQ1E) && (irq_sel != CSR_MIE_FIRQ2E) && (irq_sel != CSR_MIE_FIRQ3E)) {
// check IRQ id
if (__neorv32_cpu_irq_id_check(irq_sel)) {
return 1;
}
 
80,8 → 100,8
**************************************************************************/
int neorv32_cpu_irq_disable(uint8_t irq_sel) {
 
if ((irq_sel != CSR_MIE_MSIE) && (irq_sel != CSR_MIE_MTIE) && (irq_sel != CSR_MIE_MEIE) &&
(irq_sel != CSR_MIE_FIRQ0E) && (irq_sel != CSR_MIE_FIRQ1E) && (irq_sel != CSR_MIE_FIRQ2E) && (irq_sel != CSR_MIE_FIRQ3E)) {
// check IRQ id
if (__neorv32_cpu_irq_id_check(irq_sel)) {
return 1;
}
 
/sw/lib/source/neorv32_rte.c
45,7 → 45,7
/**********************************************************************//**
* The >private< trap vector look-up table of the NEORV32 RTE.
**************************************************************************/
static uint32_t __neorv32_rte_vector_lut[17] __attribute__((unused)); // trap handler vector table
static uint32_t __neorv32_rte_vector_lut[21] __attribute__((unused)); // trap handler vector table
 
// private functions
static void __attribute__((__interrupt__)) __neorv32_rte_core(void) __attribute__((aligned(16))) __attribute__((unused));
52,6 → 52,7
static void __neorv32_rte_debug_exc_handler(void) __attribute__((unused));
static void __neorv32_rte_print_true_false(int state) __attribute__((unused));
static void __neorv32_rte_print_hex_word(uint32_t num);
static int __neorv32_rte_check_exc_id(uint32_t id);
 
 
/**********************************************************************//**
93,14 → 94,8
int neorv32_rte_exception_install(uint8_t id, void (*handler)(void)) {
 
// id valid?
if ((id == RTE_TRAP_I_MISALIGNED) || (id == RTE_TRAP_I_ACCESS) || (id == RTE_TRAP_I_ILLEGAL) ||
(id == RTE_TRAP_BREAKPOINT) || (id == RTE_TRAP_L_MISALIGNED) || (id == RTE_TRAP_L_ACCESS) ||
(id == RTE_TRAP_S_MISALIGNED) || (id == RTE_TRAP_S_ACCESS) || (id == RTE_TRAP_MENV_CALL) || (id == RTE_TRAP_UENV_CALL) ||
(id == RTE_TRAP_MSI) || (id == RTE_TRAP_MTI) || (id == RTE_TRAP_MEI) ||
(id == RTE_TRAP_FIRQ_0) || (id == RTE_TRAP_FIRQ_1) || (id == RTE_TRAP_FIRQ_2) || (id == RTE_TRAP_FIRQ_3)) {
 
if (__neorv32_rte_check_exc_id(id) == 0) {
__neorv32_rte_vector_lut[id] = (uint32_t)handler; // install handler
 
return 0;
}
return 1;
120,14 → 115,8
int neorv32_rte_exception_uninstall(uint8_t id) {
 
// id valid?
if ((id == RTE_TRAP_I_MISALIGNED) || (id == RTE_TRAP_I_ACCESS) || (id == RTE_TRAP_I_ILLEGAL) ||
(id == RTE_TRAP_BREAKPOINT) || (id == RTE_TRAP_L_MISALIGNED) || (id == RTE_TRAP_L_ACCESS) ||
(id == RTE_TRAP_S_MISALIGNED) || (id == RTE_TRAP_S_ACCESS) || (id == RTE_TRAP_MENV_CALL) || (id == RTE_TRAP_UENV_CALL) ||
(id == RTE_TRAP_MSI) || (id == RTE_TRAP_MTI) || (id == RTE_TRAP_MEI) ||
(id == RTE_TRAP_FIRQ_0) || (id == RTE_TRAP_FIRQ_1) || (id == RTE_TRAP_FIRQ_2) || (id == RTE_TRAP_FIRQ_3)) {
 
if (__neorv32_rte_check_exc_id(id) == 0) {
__neorv32_rte_vector_lut[id] = (uint32_t)(&__neorv32_rte_debug_exc_handler); // use dummy handler in case the exception is accidently triggered
 
return 0;
}
return 1;
186,6 → 175,10
case TRAP_CODE_FIRQ_1: rte_handler = __neorv32_rte_vector_lut[RTE_TRAP_FIRQ_1]; break;
case TRAP_CODE_FIRQ_2: rte_handler = __neorv32_rte_vector_lut[RTE_TRAP_FIRQ_2]; break;
case TRAP_CODE_FIRQ_3: rte_handler = __neorv32_rte_vector_lut[RTE_TRAP_FIRQ_3]; break;
case TRAP_CODE_FIRQ_4: rte_handler = __neorv32_rte_vector_lut[RTE_TRAP_FIRQ_4]; break;
case TRAP_CODE_FIRQ_5: rte_handler = __neorv32_rte_vector_lut[RTE_TRAP_FIRQ_5]; break;
case TRAP_CODE_FIRQ_6: rte_handler = __neorv32_rte_vector_lut[RTE_TRAP_FIRQ_6]; break;
case TRAP_CODE_FIRQ_7: rte_handler = __neorv32_rte_vector_lut[RTE_TRAP_FIRQ_7]; break;
default: break;
}
 
221,10 → 214,14
case TRAP_CODE_MSI: neorv32_uart_print("Machine software interrupt"); break;
case TRAP_CODE_MTI: neorv32_uart_print("Machine timer interrupt"); break;
case TRAP_CODE_MEI: neorv32_uart_print("Machine external interrupt"); break;
case TRAP_CODE_FIRQ_0: neorv32_uart_print("Fast interrupt 0"); break;
case TRAP_CODE_FIRQ_1: neorv32_uart_print("Fast interrupt 1"); break;
case TRAP_CODE_FIRQ_2: neorv32_uart_print("Fast interrupt 2"); break;
case TRAP_CODE_FIRQ_3: neorv32_uart_print("Fast interrupt 3"); break;
case TRAP_CODE_FIRQ_0:
case TRAP_CODE_FIRQ_1:
case TRAP_CODE_FIRQ_2:
case TRAP_CODE_FIRQ_3:
case TRAP_CODE_FIRQ_4:
case TRAP_CODE_FIRQ_5:
case TRAP_CODE_FIRQ_6:
case TRAP_CODE_FIRQ_7: neorv32_uart_print("Fast interrupt "); neorv32_uart_putc((char)('0' + (trap_cause & 0x7))); break;
default: neorv32_uart_print("Unknown trap cause: "); __neorv32_rte_print_hex_word(trap_cause); break;
}
 
431,11 → 428,8
neorv32_uart_printf("TRNG - ");
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_TRNG));
 
neorv32_uart_printf("CFU0 - ");
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFU0));
 
neorv32_uart_printf("CFU1 - ");
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFU1));
neorv32_uart_printf("CFS - ");
__neorv32_rte_print_true_false(tmp & (1 << SYSINFO_FEATURES_IO_CFS));
}
 
 
476,7 → 470,31
}
 
 
/**********************************************************************//**
* NEORV32 runtime environment: Private function to check exception id
* as 8-digit hexadecimal value (with "0x" suffix).
*
* @param[in] id Exception id (#NEORV32_RTE_TRAP_enum).
* @return Return 0 if id is valid
**************************************************************************/
static int __neorv32_rte_check_exc_id(uint32_t id) {
 
// id valid?
if ((id == RTE_TRAP_I_MISALIGNED) || (id == RTE_TRAP_I_ACCESS) || (id == RTE_TRAP_I_ILLEGAL) ||
(id == RTE_TRAP_BREAKPOINT) || (id == RTE_TRAP_L_MISALIGNED) || (id == RTE_TRAP_L_ACCESS) ||
(id == RTE_TRAP_S_MISALIGNED) || (id == RTE_TRAP_S_ACCESS) || (id == RTE_TRAP_MENV_CALL) || (id == RTE_TRAP_UENV_CALL) ||
(id == RTE_TRAP_MSI) || (id == RTE_TRAP_MTI) || (id == RTE_TRAP_MEI) ||
(id == RTE_TRAP_FIRQ_0) || (id == RTE_TRAP_FIRQ_1) || (id == RTE_TRAP_FIRQ_2) || (id == RTE_TRAP_FIRQ_3) ||
(id == RTE_TRAP_FIRQ_4) || (id == RTE_TRAP_FIRQ_5) || (id == RTE_TRAP_FIRQ_6) || (id == RTE_TRAP_FIRQ_7)) {
return 0;
}
else {
return 1;
}
}
 
 
 
/**********************************************************************//**
* NEORV32 runtime environment: Print the processor version in human-readable format.
**************************************************************************/
547,12 → 565,13
for (v=0; v<4; v++) {
tmp = logo_data_c[u][v];
for (w=0; w<32; w++){
if (tmp & (1 << (31-w))) {
if (tmp & 0x80000000UL) { // check MSB
neorv32_uart_putc('#');
}
else {
neorv32_uart_putc(' ');
}
tmp <<= 1;
}
}
}
/sw/lib/source/neorv32_trng.c
70,13 → 70,13
 
TRNG_CT = 0; // reset
 
for (i=0; i<1000; i++) {
for (i=0; i<256; i++) {
asm volatile ("nop");
}
 
TRNG_CT = 1 << TRNG_CT_EN; // activate
 
for (i=0; i<1000; i++) {
for (i=0; i<256; i++) {
asm volatile ("nop");
}
}
87,37 → 87,32
**************************************************************************/
void neorv32_trng_disable(void) {
 
TRNG_CT &= ~((uint32_t)(1 << TRNG_CT_EN));
TRNG_CT = 0;
}
 
 
/**********************************************************************//**
* Get random data from TRNG.
* Get random data byte from TRNG.
*
* @note The TRNG is automatically reset if a stuck-at-one/stuck-at-zero error is detected.
*
* @param[in,out] data uint8_t pointer for storing random data word
* @return Data is valid when 0, stuck-at-zero error when 1, stuck-at-one error when 2, data not (yet) valid when 3
* @param[in,out] data uint8_t pointer for storing random data byte.
* @return Data is valid when 0 and invalid otherwise.
**************************************************************************/
int neorv32_trng_get(uint8_t *data) {
 
uint32_t trng_ct_reg = TRNG_CT;
const int retries = 3;
int i;
uint32_t ct_reg;
 
if (trng_ct_reg & (1<<TRNG_CT_ERROR_0)) { // stuck at zero error
neorv32_trng_enable(); // reset TRNG
return 1;
}
for (i=0; i<retries; i++) {
ct_reg = TRNG_CT;
 
if (trng_ct_reg & (1<<TRNG_CT_ERROR_1)) { // stuck at one error
neorv32_trng_enable(); // reset TRNG
return 2;
}
if ((ct_reg & (1<<TRNG_CT_VALID)) == 0) { // output data valid?
continue;
}
 
if ((trng_ct_reg & (1<<TRNG_CT_VALID)) == 0) { // output data valid (yet)?
return 3;
*data = (uint8_t)(ct_reg >> TRNG_CT_DATA_LSB);
return 0; // valid data
}
 
*data = (uint8_t)(trng_ct_reg >> TRNG_CT_DATA_LSB);
return 0; // valid data
return -1; // no valid data available
}
 
/sw/lib/source/neorv32_uart.c
71,9 → 71,11
/**********************************************************************//**
* Enable and configure UART.
*
* @warning The 'UART_SIM_MODE' compiler flag will configure UART for simulation mode: all UART TX data will be redirected to simulation output. Use this for simulations only!
* @warning To enable simulation mode add <USER_FLAGS+=-DUART_SIM_MODE> when compiling.
* @note The 'UART_SIM_MODE' compiler flag will configure UART for simulation mode: all UART TX data will be redirected to simulation output. Use this for simulations only!
* @note To enable simulation mode add <USER_FLAGS+=-DUART_SIM_MODE> when compiling.
*
* @warning The baud rate is computed using INTEGER operations (truncation errors might occur).
*
* @param[in] baudrate Targeted BAUD rate (e.g. 9600).
* @param[in] parity PArity configuration (00=off, 10=even, 11=odd).
* @param[in] rx_irq Enable RX interrupt (data received) when 1.
99,7 → 101,7
}
#endif
 
// find clock prsc
// find baud prescaler (12-bit wide))
while (i >= 0x0fff) {
if ((p == 2) || (p == 4))
i >>= 3;
108,11 → 110,12
p++;
}
 
uint32_t prsc = (uint32_t)p;
prsc = prsc << UART_CT_PRSC0;
uint32_t clk_prsc = (uint32_t)p;
clk_prsc = clk_prsc << UART_CT_PRSC0;
 
uint32_t baud = (uint32_t)i;
baud = baud << UART_CT_BAUD00;
uint32_t baud_prsc = (uint32_t)i;
baud_prsc = baud_prsc - 1;
baud_prsc = baud_prsc << UART_CT_BAUD00;
 
uint32_t uart_en = 1;
uart_en = uart_en << UART_CT_EN;
135,7 → 138,7
uint32_t sim_mode = 0;
#endif
 
UART_CT = prsc | baud | uart_en | parity_config | rx_irq_en | tx_irq_en | sim_mode;
UART_CT = clk_prsc | baud_prsc | uart_en | parity_config | rx_irq_en | tx_irq_en | sim_mode;
}
 
 
/sw/lib/source/neorv32_wdt.c
62,34 → 62,48
 
 
/**********************************************************************//**
* Enable and configure watchdog timer. The WDT control register bits are listed in #NEORV32_WDT_CT_enum.
* Configure and enable watchdog timer. The WDT control register bits are listed in #NEORV32_WDT_CT_enum.
*
* @param[in] clk_prsc Clock prescaler to selet timeout interval. See #NEORV32_CLOCK_PRSC_enum.
* @param[in] timeout_mode Trigger system reset on timeout when 1, trigger interrupt on timeout when 0.
* @param[in] prsc Clock prescaler to selet timeout interval. See #NEORV32_CLOCK_PRSC_enum.
* @param[in] mode Trigger system reset on timeout when 1, trigger interrupt on timeout when 0.
* @param[in] lock Control register will be locked when 1 (unitl next reset).
**************************************************************************/
void neorv32_wdt_setup(uint8_t clk_prsc, uint8_t timeout_mode) {
void neorv32_wdt_setup(uint8_t prsc, uint8_t mode, uint8_t lock) {
 
uint32_t prsc = (uint32_t)(clk_prsc & 0x07);
prsc = prsc << WDT_CT_CLK_SEL0;
WDT_CT = (1 << WDT_CT_RESET); // reset WDT counter
 
uint32_t mode = (uint32_t)(timeout_mode & 0x01);
mode = mode << WDT_CT_MODE;
uint32_t prsc_int = (uint32_t)(prsc & 0x07);
prsc_int = prsc_int << WDT_CT_CLK_SEL0;
 
uint32_t password = (uint32_t)(WDT_PASSWORD);
password = password << WDT_CT_PASSWORD_LSB;
uint32_t mode_int = (uint32_t)(mode & 0x01);
mode_int = mode_int << WDT_CT_MODE;
 
uint32_t enable = (uint32_t)(1 << WDT_CT_EN);
uint32_t lock_int = (uint32_t)(lock & 0x01);
lock_int = lock_int << WDT_CT_LOCK;
 
WDT_CT = password | enable | mode | prsc;
const uint32_t enable = (uint32_t)(1 << WDT_CT_EN);
 
// update WDT control register
WDT_CT = enable | mode_int | prsc_int | lock_int;
}
 
 
/**********************************************************************//**
* Disable watchdog timer.
*
* @return Returns 0 if WDT is really deativated, -1 otherwise.
**************************************************************************/
void neorv32_wdt_disable(void) {
int neorv32_wdt_disable(void) {
WDT_CT = 0;
 
WDT_CT = ((uint32_t)(WDT_PASSWORD << WDT_CT_PASSWORD_LSB)) | ((uint32_t)(0 << WDT_CT_EN));
// check if wdt is really off
if (WDT_CT & (1 << WDT_CT_EN)) {
return -1; // WDT still active
}
else {
return 0;
}
}
 
 
98,38 → 112,30
**************************************************************************/
void neorv32_wdt_reset(void) {
 
WDT_CT = WDT_CT | ((uint32_t)(WDT_PASSWORD << WDT_CT_PASSWORD_LSB));
WDT_CT = (1 << WDT_CT_RESET);
}
 
 
/**********************************************************************//**
* Get cause of last watchdog action.
* Get cause of last system reset.
*
* @return Cause of last reset/IRQ (0: undefined, 1: external reset, 2: watchdog timeout, 3: watchdog access error (wrong password)).
* @return Cause of last reset/IRQ (0: external reset, 1: watchdog timeout).
**************************************************************************/
uint8_t neorv32_wdt_get_cause(void) {
int neorv32_wdt_get_cause(void) {
 
uint8_t cause = 0;
uint32_t ctrl = WDT_CT;
if (ctrl & (1 << WDT_CT_CAUSE)) { // reset/IRQ casued by watchdog
if (ctrl & (1 << WDT_CT_PWFAIL)) { // reset/IRQ due to wrong password
cause = 3;
}
else { // reset/IRQ due to timeout
cause = 2;
}
if (WDT_CT & (1 << WDT_CT_RCAUSE)) { // reset caused by watchdog
return 1;
}
else { // external reset
cause = 1;
return 0;
}
return cause;
}
 
 
/**********************************************************************//**
* Force watchdog action (reset/IRQ) via wrong-password access.
* Force immediate watchdog action (reset/IRQ).
**************************************************************************/
void neorv32_wdt_force(void) {
 
WDT_CT = 0; // invalid access
WDT_CT = WDT_CT | (1 << WDT_CT_FORCE);
}
/CHANGELOG.md
15,6 → 15,12
 
| Date (*dd.mm.yyyy*) | Version | Comment |
|:----------:|:-------:|:--------|
| 29.01.2021 | 1.5.0.9 | removed custom function units `CFU0` & `CFU1`; :sparkles: replaced them by new *Custom Functions Subsystem `CFS`*, which provides up to 32x32-bit memory-mapped registers; new configuration generics: `IO_CFS_EN`, `IO_CFS_CONFIG`; new top entity signals: `cfs_in_i`, `cfs_out_o`; increased processor's IO area from 128 bytes to 256 bytes, now starting at `0xFFFFFF00` |
| 28.01.2021 | 1.5.0.8 | added *critical limit* for number of implemented PMP regions: When implementing more PMP regions that a certain critical limit an additional register stage is automatically inserted into the CPU’s memory interfaces increasing the latency of instruction fetches and data access by +1 cycle. The critical limit can be adapted for custom use by a constant from the main VHDL package file (rtl/core/neorv32_package.vhd). The default value is 8: `constant pmp_num_regions_critical_c : natural := 8;` |
| 27.01.2021 | 1.5.0.7 | added four additional *fast interrupt* channels `FIRQ4..7`, available via processor's top `soc_firq_i(3:0)` signal for custom platform use; fixed minor error in UART setup function (baud rate prescaler calculation for very high baud rates) |
| 26.01.2021 | 1.5.0.6 | minor logic optimization of CPU's `B` extension co-processor (reducing area); minor logic optimization or `HPM` triggers (reducing area); reworked CPU's co-processor interface; minor logic optimiztation of branch condition check (to shorten critical path) |
| 23.01.2021 | 1.5.0.5 | reworked true random number generator `TRNG`: architecture is now based on several simple ring oscillators with incrementing length; changed control register bits; updated according driver functions and demo program |
| 22.01.2021 | 1.5.0.4 | :bug: fixed BUG in bootloader (that caused it to immediately crash after reset if SPI/MTIME/GPIO peripherals were not implemented); reworked watchdog timer `WDT`: removed watchdog access password, added option to lock configuration until next system reset, changed control register bits - updated driver functions and demo/test programs |
| 17.01.2021 | 1.5.0.3 | CPU data register file can now be mapped to a **single** "true dual-port" block RAM by the synthesizer (requiring only 1024 memory bits instead of 2048); :bug: fixed typo error in `sim/rtl_modules/neorv32_imem.vhd`; modified `M` co-processor (due to register file read access modification), reduced switching activity when co-processor is idle; logic/arithmetic operations of `B` extension only require 3 cycles now, reduced switching activity when co-processor is idle |
| 15.01.2021 | 1.5.0.2 | added instruction cache associativity configuration (number of sets); new configuration generic: `ICACHE_ASSOCIATIVITY` -> number of sets (1 = direct mapped, 2 = 2-way set-associative), has to be a power of two; if associativity is > 1 the used replacement policy is *least recently used (LRU)*; :bug: fixed bug in `sw/lib/source/neorv32_cpu.c` PMP.CFG configuration function |
| 14.01.2021 | 1.5.0.1 | added new HPM trigger event: multi-cycle ALU operation wait cycle (`HPMCNT_EVENT_WAIT_MC`); renamed `neorv32_cache.vhd` -> `neorv32_icache.vhd` |
/README.md
8,7 → 8,7
[![release](https://img.shields.io/github/v/release/stnolting/neorv32)](https://github.com/stnolting/neorv32/releases)
 
* [Overview](#Overview)
* [Project Status](#Status)
* [Status](#Status)
* [Features](#Features)
* [FPGA Implementation Results](#FPGA-Implementation-Results)
* [Performance](#Performance)
25,35 → 25,38
on the RISC-V-compliant NEORV32 CPU. The processor is intended as *ready-to-go* auxiliary processor within a larger SoC
designs or as stand-alone custom microcontroller.
 
The project’s change log is available in the [CHANGELOG.md](https://github.com/stnolting/neorv32/blob/master/CHANGELOG.md) file in the root directory of this repository.
:label: The project’s change log is available in the [CHANGELOG.md](https://github.com/stnolting/neorv32/blob/master/CHANGELOG.md) file in the root directory of this repository.
To see the changes between releases visit the project's [release page](https://github.com/stnolting/neorv32/releases).
 
The documentation of the software framework is available online on [GitHub-pages](https://stnolting.github.io/neorv32/files.html).
For more detailed information take a look at the [:page_facing_up: NEORV32 data sheet](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/NEORV32.pdf) (pdf).
:books: The doxygen-based documentation of the software framework is available online at [GitHub-pages](https://stnolting.github.io/neorv32/files.html).
 
:page_facing_up: For more detailed information take a look at the [NEORV32 data sheet (pdf)](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/NEORV32.pdf).
 
 
### Key Features
 
* RISC-V-[compliant](#Status) 32-bit `rv32i` [**NEORV32 CPU**](#NEORV32-CPU-Features), compliant to
* RISC-V 32-bit `rv32i` [**NEORV32 CPU**](#NEORV32-CPU-Features), compliant to
* Subset of the *Unprivileged ISA Specification* [(Version 2.2)](https://github.com/stnolting/neorv32/blob/master/docs/riscv-privileged.pdf)
* Subset of the *Privileged Architecture Specification* [(Version 1.12-draft)](https://github.com/stnolting/neorv32/blob/master/docs/riscv-spec.pdf)
* Passes the [offcial RISC-V compliance tests](#Status)
* Configurable RISC-V-compliant CPU extensions
* `A` - atomic memory access instructions (optional)
* `B` - Bit manipulation instructions (optional)
* `C` - compressed instructions (16-bit) (optional)
* `E` - embedded CPU (reduced register file (optional)
* `I` - base integer instruction set (always enabled)
* `M` - integer multiplication and division hardware (optional)
* `U` - less-privileged *user mode* (optional)
* `X` - NEORV32_specific extensions (always enabled)
* `Zicsr` - control and status register access instructions (+ exception/irq system) (optional)
* `Zifencei` - instruction stream synchronization (optional)
* `PMP` - physical memory protection (optional)
* `HPM` - hardware performance monitors (optional)
* [`A`](#Atomic-memory-access-a-extension) - atomic memory access instructions (optional)
* [`B`](#Bit-manipulation-instructions-B-extension) - Bit manipulation instructions (optional)
* [`C`](#Compressed-instructions-C-extension) - compressed instructions (16-bit) (optional)
* [`E`](#Embedded-CPU-version-E-extension) - embedded CPU (reduced register file size) (optional)
* [`I`](#Integer-base-instruction-set-I-extension) - base integer instruction set (always enabled)
* [`M`](#Integer-multiplication-and-division-hardware-M-extension) - integer multiplication and division hardware (optional)
* [`U`](#Privileged-architecture---User-mode-U-extension) - less-privileged *user mode* (optional)
* [`X`](#NEORV32-specific-CPU-extensions-X-extension) - NEORV32-specific extensions (always enabled)
* [`Zicsr`](#Privileged-architecture---CSR-access-Zicsr-extension) - control and status register access instructions (+ exception/irq system) (optional)
* [`Zifencei`](#Privileged-architecture---Instruction-stream-synchronization-Zifencei-extension) - instruction stream synchronization (optional)
* [`PMP`](#Privileged-architecture---Physical-memory-protection-PMP) - physical memory protection (optional)
* [`HPM`](#Privileged-architecture---Hardware-performance-monitors-HPM-extension) - hardware performance monitors (optional)
* Full-scale RISC-V microcontroller system / **SoC** [**NEORV32 Processor**](#NEORV32-Processor-Features) with optional submodules
* optional embedded memories (instructions/data/bootloader, RAM/ROM) and caches
* timers (watch dog, RISC-V-compliant machine timer)
* serial interfaces (SPI, TWI, UART) and general purpose IO
* serial interfaces (SPI, TWI, UART)
* general purpose IO and PWM channels
* external bus interface (Wishbone / [AXI4](#AXI4-Connectivity))
* [more ...](#NEORV32-Processor-Features)
* Software framework
87,8 → 90,9
The processor is [synthesizable](#FPGA-Implementation-Results) (tested on *real hardware* using Intel Quartus Prime, Xilinx Vivado and Lattice Radiant/Synplify Pro) and can successfully execute
all the [provided example programs](https://github.com/stnolting/neorv32/tree/master/sw/example) including the [CoreMark benchmark](#CoreMark-Benchmark).
 
The processor passes the official `rv32_m/C`, `rv32_m/I`, `rv32_m/M`, `rv32_m/privilege` and `rv32_m/Zifencei`
[RISC-V compliance tests (new framework v2)](https://github.com/riscv/riscv-compliance).
**RISC-V Compliance**: The processor passes the official `rv32_m/C`, `rv32_m/I`, `rv32_m/M`, `rv32_m/privilege` and `rv32_m/Zifencei`
[RISC-V compliance](https://github.com/riscv/riscv-compliance) tests. More information regarding the NEORV32 port of the compliance framework can be found in
[`riscv-compliance/README.md`](https://github.com/stnolting/neorv32/blob/master/riscv-compliance/README.md).
 
| Project component | CI status |
|:----------------- |:----------|
142,8 → 146,8
* 32-bit external bus interface, Wishbone b4 compliant (**WISHBONE**), *standard* or *pipelined* handshake/transactions mode
* wrapper for **AXI4-Lite Master Interface** (see [AXI Connectivity](#AXI4-Connectivity))
* PWM controller with 4 channels and 8-bit duty cycle resolution (**PWM**)
* GARO-based true random number generator (**TRNG**)
* custom functions units (**CFU0** and **CFU1**) for tightly-coupled custom co-processors
* ring-oscillator-based true random number generator (**TRNG**)
* custom functions subsystem (**CFS**) for tightly-coupled custom co-processor extensions
* system configuration information memory to check hardware configuration by software (**SYSINFO**, mandatory - not *optional*)
 
 
159,7 → 163,8
the [:page_facing_up: NEORV32 data sheet](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/NEORV32.pdf).
 
 
**General**:
#### General Features
 
* Modified Harvard architecture (separate CPU interfaces for data and instructions; NEORV32 processor: Single processor-internal bus via I/D mux)
* Two stages in-order pipeline (FETCH, EXECUTE); each stage uses a multi-cycle processing scheme
* No hardware support of unaligned accesses - they will trigger an exception
169,14 → 174,23
* Official [RISC-V open-source architecture ID](https://github.com/riscv/riscv-isa-manual/blob/master/marchid.md)
 
 
**RV32I base instruction set** (`I` extension):
* ALU instructions: `LUI` `AUIPC` `ADDI` `SLTI` `SLTIU` `XORI` `ORI` `ANDI` `SLLI` `SRLI` `SRAI` `ADD` `SUB` `SLL` `SLT` `SLTU` `XOR` `SRL` `SRA` `OR` `AND`
* Jump and branch instructions: `JAL` `JALR` `BEQ` `BNE` `BLT` `BGE` `BLTU` `BGEU`
* Memory instructions: `LB` `LH` `LW` `LBU` `LHU` `SB` `SH` `SW`
* System instructions: `ECALL` `EBREAK` `FENCE`
* Pseudo-instructions are not listed
#### Atomic memory access (`A` extension)
 
**Compressed instructions** (`C` extension):
* Supported instructions: `LR.W` (load-reservate) `SC.W` (store-conditional)
 
 
#### Bit manipulation instructions (`B` extension)
 
* :warning: Extension is not officially ratified yet by the RISC-V foundation!
* Implies `Zbb` extension (base bit manipulation instruction set)
* Compatible to [v0.94-draft](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/bitmanip-draft.pdf) of the bit manipulation spec
* Support via intrisc library (see [`sw/example/bit_manipulation`](https://github.com/stnolting/neorv32/tree/master/sw/example/bit_manipulation))
* Only the `Zbb` base instructions subset is supported yet
* Supported instructions: `CLZ` `CTZ` `CPOP` `SEXT.B` `SEXT.H` `MIN[U]` `MAX[U]` `ANDN` `ORN` `XNOR` `ROL` `ROR` `RORI` `zext`(*pseudo-instruction* for `PACK rd, rs, zero`) `rev8`(*pseudo-instruction* for `GREVI rd, rs, -8`) `orc.b`(*pseudo-instruction* for `GORCI rd, rs, 7`)
 
 
#### Compressed instructions (`C` extension)
 
* ALU instructions: `C.ADDI4SPN` `C.ADDI` `C.ADD` `C.ADDI16SP` `C.LI` `C.LUI` `C.SLLI` `C.SRLI` `C.SRAI` `C.ANDI` `C.SUB` `C.XOR` `C.OR` `C.AND` `C.MV` `C.NOP`
* Jump and branch instructions: `C.J` `C.JAL` `C.JR` `C.JALR` `C.BEQZ` `C.BNEZ`
* Memory instructions: `C.LW` `C.SW` `C.LWSP` `C.SWSP`
183,26 → 197,44
* System instructions: `C.EBREAK` (only with `Zicsr` extension)
* Pseudo-instructions are not listed
 
**Embedded CPU version** (`E` extension):
#### Embedded CPU version (`E` extension)
 
* Reduced register file (only the 16 lowest registers)
 
**Integer multiplication and division hardware** (`M` extension):
 
#### Integer base instruction set (`I` extension)
 
* ALU instructions: `LUI` `AUIPC` `ADDI` `SLTI` `SLTIU` `XORI` `ORI` `ANDI` `SLLI` `SRLI` `SRAI` `ADD` `SUB` `SLL` `SLT` `SLTU` `XOR` `SRL` `SRA` `OR` `AND`
* Jump and branch instructions: `JAL` `JALR` `BEQ` `BNE` `BLT` `BGE` `BLTU` `BGEU`
* Memory instructions: `LB` `LH` `LW` `LBU` `LHU` `SB` `SH` `SW`
* System instructions: `ECALL` `EBREAK` `FENCE`
* Pseudo-instructions are not listed
 
 
#### Integer multiplication and division hardware (`M` extension)
 
* Multiplication instructions: `MUL` `MULH` `MULHSU` `MULHU`
* Division instructions: `DIV` `DIVU` `REM` `REMU`
* By default, the multiplier and divider cores use an iterative bit-serial processing scheme
* Multiplications can be mapped to DSPs via the `FAST_MUL_EN` generic to increase performance
 
**Atomic memory access** (`A` extension):
* Supported instructions: `LR.W` (load-reservate) `SC.W` (store-conditional)
 
**Bit manipulation instructions** (`B` extension implying `Zbb` extension):
* :warning: RISC-V `B` extension is not officially ratified yet!
* Compatible to [v0.94-draft](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/bitmanip-draft.pdf) of the bit manipulation spec
* Support via intrisc library (see [`sw/example/bit_manipulation`](https://github.com/stnolting/neorv32/tree/master/sw/example/bit_manipulation))
* Only the `Zbb` base instructions subset is supported yet
* Supported instructions: `CLZ` `CTZ` `CPOP` `SEXT.B` `SEXT.H` `MIN[U]` `MAX[U]` `ANDN` `ORN` `XNOR` `ROL` `ROR` `RORI` `zext`(*pseudo-instruction* for `PACK rd, rs, zero`) `rev8`(*pseudo-instruction* for `GREVI rd, rs, -8`) `orc.b`(*pseudo-instruction* for `GORCI rd, rs, 7`)
#### Privileged architecture - User mode (`U` extension)
 
**Privileged architecture / CSR access** (`Zicsr` extension):
* Requires `Zicsr` extension
* Privilege levels: `M` (machine mode) + less-privileged `U` (user mode)
 
 
#### NEORV32-specific CPU extensions (`X` extension)
 
* The NEORV32-specific extensions are always enabled and are indicated via the `X` bit set in the `misa` CSR.
* Eight *fast interrupt* request channels with according control/status bits in `mie` and `mip` and custom exception codes in `mcause`
* `mzext` CSR to check for implemented `Z*` CPU extensions (like `Zifencei`)
* All undefined/umimplemented/malformed/illegal instructions do raise an illegal instruction exception
 
 
#### Privileged architecture - CSR access (`Zicsr` extension)
 
* Privilege levels: `M-mode` (Machine mode)
* CSR access instructions: `CSRRW` `CSRRS` `CSRRC` `CSRRWI` `CSRRSI` `CSRRCI`
* System instructions: `MRET` `WFI`
223,19 → 255,24
* Machine timer interrupt `mti` (via processor's MTIME unit / external signal)
* Machine software interrupt `msi` (via external signal)
* Machine external interrupt `mei` (via external signal)
* Four fast interrupt requests (custom extension)
* Eight fast interrupt requests (custom extension)
 
**Privileged architecture / User mode** (`U` extension, requires `Zicsr` extension):
* Privilege levels: `M-mode` (Machine mode) + `U-mode` (User mode)
 
**Privileged architecture / Instruction stream synchronization** (`Zifencei` extension):
#### Privileged architecture - Instruction stream synchronization (`Zifencei` extension)
 
* System instructions: `FENCE.I` (among others, used to clear and reload instruction cache)
 
**Privileged architecture / Physical memory protection** (`PMP`, requires `Zicsr` extension):
 
#### Privileged architecture - Physical memory protection (`PMP`)
 
* Requires `Zicsr` extension
* Configurable number of regions (0..63)
* Additional machine CSRs: `pmpcfg*`(0..15) `pmpaddr*`(0..63)
 
**Privileged architecture / Hardware performance monitors** (`HPM`, requires `Zicsr` extension):
 
#### Privileged architecture - Hardware performance monitors (`HPM` extension)
 
* Requires `Zicsr` extension
* Configurable number of counters (0..29)
* Additional machine CSRs: `mhpmevent*`(3..31) `[m]hpmcounter*[h]`(3..31)
 
249,16 → 286,8
* The `mcause` trap code `0x80000000` (originally reserved in the RISC-V specs) is used to indicate a hardware reset (as "non-maskable interrupt")
* The bit manipulation extension is not yet officially ratified, but is expected to stay unchanged. There is no software support in the upstream GCC RISC-V port yet. However, an intrinsic library is provided to utilize the provided bit manipulation extension from C-language code (see [`sw/example/bit_manipulation`](https://github.com/stnolting/neorv32/tree/master/sw/example/bit_manipulation)). NEORV32's `B`/`Zbb` extension is compliant to spec. version "0.94-draft".
 
### NEORV32-Specific CPU Extensions
 
The NEORV32-specific extensions are always enabled and are indicated via the `X` bit in the `misa` CSR.
 
* Four *fast interrupt* request channels with according control/status bits in `mie` and `mip` and custom exception codes in `mcause`
* `mzext` CSR to check for implemented `Z*` CPU extensions (like `Zifencei`)
* All undefined/umimplemented/malformed/illegal instructions do raise an illegal instruction exception
 
 
 
## FPGA Implementation Results
 
### NEORV32 CPU
278,7 → 307,7
| `rv32im` + `u` + `Zicsr` + `Zifencei` | 2471 | 1148 | 1024 | 0 | 120 MHz |
| `rv32imc` + `u` + `Zicsr` + `Zifencei` | 2716 | 1165 | 1024 | 0 | 120 MHz |
| `rv32imac` + `u` + `Zicsr` + `Zifencei` | 2736 | 1168 | 1024 | 0 | 120 MHz |
| `rv32imacb` + `u` + `Zicsr` + `Zifencei` | 3045 | 1260 | 1024 | 0 | 114 MHz |
| `rv32imacb` + `u` + `Zicsr` + `Zifencei` | 3045 | 1260 | 1024 | 0 | 116 MHz |
 
Setups with enabled "embedded CPU extension" `E` show the same LUT and FF utilization and identical f_max. However, the size of the register file is cut in half.
 
292,8 → 321,7
| BOOT ROM | Bootloader ROM (default 4kB) | 3 | 1 | 32 768 | 0 |
| BUSSWITCH | Mux for CPU I & D interfaces | 65 | 8 | 0 | 0 |
| i-CACHE | Proc.-int. nstruction cache (default 1x4x64 bytes) | 234 | 156 | 8 192 | 0 |
| CFU0 | Custom functions unit 0 | - | - | - | - |
| CFU1 | Custom functions unit 1 | - | - | - | - |
| CFS | Custom functions subsystem | - | - | - | - |
| DMEM | Processor-internal data memory (default 8kB) | 6 | 2 | 65 536 | 0 |
| GPIO | General purpose input/output ports | 67 | 65 | 0 | 0 |
| IMEM | Processor-internal instruction memory (default 16kb) | 6 | 2 | 131 072 | 0 |
310,7 → 338,7
 
### NEORV32 Processor - Exemplary FPGA Setups
 
Exemplary processor implementation results for different FPGA platforms. The processor setup uses *the default peripheral configuration* (like no _CFUs_ and no _TRNG_),
Exemplary processor implementation results for different FPGA platforms. The processor setup uses *the default peripheral configuration* (like no _CFS_ and no _TRNG_),
no external memory interface and only internal instruction and data memories. IMEM uses 16kB and DMEM uses 8kB memory space. The setup's top entity connects most of the
processor's [top entity](https://github.com/stnolting/neorv32/blob/master/rtl/core/neorv32_top.vhd) signals
to FPGA pins - except for the Wishbone bus and the interrupt signals. The "default" strategy of each toolchain is used.
412,14 → 440,14
 
### Using the CPU in Stand-Alone Mode
 
If you do not want to use the NEORV32 processor setup, you can also use the CPU in stand-alone mode and build your own system around it.
If you *do not* want to use the NEORV32 processor setup, you can also use the CPU in stand-alone mode and build your own system around it.
The top entity of the stand-alone **NEORV32 CPU** is [`rtl/core/neorv32_cpu.vhd`](https://github.com/stnolting/neorv32/blob/master/rtl/core/neorv32_cpu.vhd).
Note that the CPU uses a proprietary interface for accessing data and instruction memory. More information can be found in the
[:page_facing_up: NEORV32 data sheet](https://raw.githubusercontent.com/stnolting/neorv32/master/docs/NEORV32.pdf).
 
:warning: It is recommended to use the processor setup even if you only want to use the CPU. Simply disable all the processor-internal modules via the generics
and you will get a "CPU wrapper" that provides a minimal CPU environment and an external memory interface (like AXI4). This setup also allows to further use the default
bootloader and application makefiles. From this base you can start building your own processor system.
:information_source: It is recommended to use the processor setup even if you only want to use the CPU. Simply disable all the processor-internal modules via the generics
and you will get a "CPU wrapper" that already provides a minimal CPU environment and an external memory interface (like AXI4). This setup also allows to further use the default
bootloader and software framework. From this base you can start building your own processor system.
 
 
### Alternative Top Entities

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.