diff --git a/CHANGELOG.md b/CHANGELOG.md index 359ef8623..45ad34661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ defined by the `hw_version_c` constant in the main VHDL package file [`rtl/core/ | Date (*dd.mm.yyyy*) | Version | Comment | |:----------:|:-------:|:--------| +| 08.01.2022 | 1.6.5.7 | :bug: fixed bug in BUSKEEPER's error type logic (introduced in version `1.6.5.4`); removed "unexpected ERR/ACK" error codes; [PR #253](https://github.com/stnolting/neorv32/pull/253) | | 07.01.2022 | 1.6.5.6 | :sparkles: **XIP & SPI: added high-speed SPI mode** (SPI clocking at half of the processor clock), see [PR #251](https://github.com/stnolting/neorv32/pull/251) | | 06.01.2022 | 1.6.5.5 | :warning: optimized/reworked XIP (execute in place) module, see [PR #249](https://github.com/stnolting/neorv32/pull/249) | | 04.01.2022 | 1.6.5.4 | **BUSKEEPER** can now optionally check for NULL address accesses (address `0x00000000`), see [PR #247](https://github.com/stnolting/neorv32/pull/247) | diff --git a/docs/datasheet/soc_buskeeper.adoc b/docs/datasheet/soc_buskeeper.adoc index 8fccfa537..3b7571124 100644 --- a/docs/datasheet/soc_buskeeper.adoc +++ b/docs/datasheet/soc_buskeeper.adoc @@ -32,19 +32,18 @@ constant from the processor's VHDL package file (`rtl/neorv32_package.vhd`). The In case of a bus access fault exception application software can evaluate the Bus Keeper's control register `NEORV32_BUSKEEPER.CTRL` to retrieve further details of the bus exception. The _BUSKEEPER_ERR_FLAG_ bit indicates that an actual bus access fault has occurred. The bit is sticky once set and is automatically cleared when reading or -writing the `NEORV32_BUSKEEPER.CTRL` register. The _BUSKEEPER_ERR_TYPE_ bits define the type of the bus fault: +writing the `NEORV32_BUSKEEPER.CTRL` register. The _BUSKEEPER_ERR_TYPE_ bit defines the type of the bus fault: -* `00` - "Device Error": The bus access exception was cause by the memory-mapped device that +* `0` - "Device Error": The bus access exception was cause by the memory-mapped device that has been accessed (the device asserted it's `err_o`). -* `01` - "Timeout Error": The bus access exception was caused by the Bus Keeper because the +* `1` - "Timeout Error": The bus access exception was caused by the Bus Keeper because the accessed memory-mapped device did not respond within the access time window. Note that this error type can also be raised by the optional timeout feature of the <<_processor_external_memory_interface_wishbone_axi4_lite>>). -* `10` - "Unexpected ACK": There was an ACK signal received while there was no pending transfer. -* `11` - "Unexpected ERR": There was an ERR signal received while there was no pending transfer. [NOTE] -Bus access fault exceptions are also raised if a physical memory protection rule is violated. In this case -the _BUSKEEPER_ERR_FLAG_ bit remains zero. +Bus access fault exceptions are also raised if a physical memory protection (PMP) rule is violated. In this case +the _BUSKEEPER_ERR_FLAG_ bit remains zero (since the error signal is not triggered by the BUSKEEPER but by +the CPU's PMP logic). **NULL Address Check** @@ -54,6 +53,9 @@ access often occur when using uninitialized pointers. If the _BUSKEEPER_NULL_CHE address zero (instruction fetch, load data, store data) will raise an according bus exception. This flag automatically clears on a hardware reset. +If a NULL address access has been detected the _BUSKEEPER_ERR_FLAG_ flag is set and the _BUSKEEPER_ERR_TYPE_ +flag is cleared indicating a "Device Error". + [NOTE] Address 0 is normally used by the IMEM and contains boot code instructions that are executed _once_ right after hardware reset. Hence, activating the bus keeper's NULL check in application code will not corrupt code execution @@ -65,7 +67,7 @@ at all. [options="header",grid="all"] |======================= | Address | Name [C] | Bit(s), Name [C] | R/W | Function -.3+<| `0xffffff7C` .3+<| `NEORV32_BUSKEEPER.CTRL` <|`1:0` _BUSKEEPER_ERR_TYPE_MSB_ : _BUSKEEPER_ERR_TYPE_LSB_ ^| r/- | Bus error type, valid if _BUSKEEPER_ERR_FLAG_ +.3+<| `0xffffff7C` .3+<| `NEORV32_BUSKEEPER.CTRL` <|`0` _BUSKEEPER_ERR_TYPE_ ^| r/- | Bus error type, valid if _BUSKEEPER_ERR_FLAG_ <|`16` _BUSKEEPER_NULL_CHECK_EN_ ^| r/w <| Enable NULL address check when set <|`31` _BUSKEEPER_ERR_FLAG_ ^| r/- <| Sticky error flag, clears after read or write access |======================= diff --git a/rtl/core/neorv32_application_image.vhd b/rtl/core/neorv32_application_image.vhd index cabeb6cba..b486341c8 100644 --- a/rtl/core/neorv32_application_image.vhd +++ b/rtl/core/neorv32_application_image.vhd @@ -1,6 +1,6 @@ -- The NEORV32 RISC-V Processor, https://github.com/stnolting/neorv32 -- Auto-generated memory init file (for APPLICATION) from source file --- Size: 3532 bytes +-- Size: 3448 bytes library ieee; use ieee.std_logic_1164.all; @@ -67,7 +67,7 @@ package neorv32_application_image is 00000053 => x"00158593", 00000054 => x"ff5ff06f", 00000055 => x"00001597", - 00000056 => x"cf058593", + 00000056 => x"c9c58593", 00000057 => x"80000617", 00000058 => x"f1c60613", 00000059 => x"80000697", @@ -114,15 +114,15 @@ package neorv32_application_image is 00000100 => x"b0050513", 00000101 => x"00112623", 00000102 => x"088000ef", - 00000103 => x"794000ef", + 00000103 => x"768000ef", 00000104 => x"00050c63", - 00000105 => x"740000ef", + 00000105 => x"714000ef", 00000106 => x"00001537", - 00000107 => x"adc50513", + 00000107 => x"ab050513", 00000108 => x"134000ef", 00000109 => x"020000ef", 00000110 => x"00001537", - 00000111 => x"ab850513", + 00000111 => x"a8c50513", 00000112 => x"124000ef", 00000113 => x"00c12083", 00000114 => x"00100513", @@ -133,12 +133,12 @@ package neorv32_application_image is 00000119 => x"00000593", 00000120 => x"00112623", 00000121 => x"00812423", - 00000122 => x"758000ef", + 00000122 => x"72c000ef", 00000123 => x"00000513", 00000124 => x"00150413", 00000125 => x"00000593", 00000126 => x"0ff57513", - 00000127 => x"744000ef", + 00000127 => x"718000ef", 00000128 => x"0c800513", 00000129 => x"164000ef", 00000130 => x"00040513", @@ -157,7 +157,7 @@ package neorv32_application_image is 00000143 => x"00151593", 00000144 => x"00078513", 00000145 => x"00060493", - 00000146 => x"7c4000ef", + 00000146 => x"798000ef", 00000147 => x"01051513", 00000148 => x"000017b7", 00000149 => x"01055513", @@ -238,11 +238,11 @@ package neorv32_application_image is 00000224 => x"02912223", 00000225 => x"03212023", 00000226 => x"01312e23", - 00000227 => x"680000ef", + 00000227 => x"654000ef", 00000228 => x"00c12603", 00000229 => x"00000693", 00000230 => x"00000593", - 00000231 => x"5d8000ef", + 00000231 => x"5ac000ef", 00000232 => x"00050413", 00000233 => x"00058993", 00000234 => x"f95ff0ef", @@ -310,7 +310,7 @@ package neorv32_application_image is 00000296 => x"0500006f", 00000297 => x"00001737", 00000298 => x"00279793", - 00000299 => x"af870713", + 00000299 => x"acc70713", 00000300 => x"00e787b3", 00000301 => x"0007a783", 00000302 => x"00078067", @@ -321,7 +321,7 @@ package neorv32_application_image is 00000307 => x"fcf768e3", 00000308 => x"00001737", 00000309 => x"00279793", - 00000310 => x"b2870713", + 00000310 => x"afc70713", 00000311 => x"00e787b3", 00000312 => x"0007a783", 00000313 => x"00078067", @@ -408,14 +408,14 @@ package neorv32_application_image is 00000394 => x"00050913", 00000395 => x"00001537", 00000396 => x"00912a23", - 00000397 => x"b9c50513", + 00000397 => x"b7050513", 00000398 => x"000014b7", 00000399 => x"00812c23", 00000400 => x"01312623", 00000401 => x"00112e23", 00000402 => x"01c00413", 00000403 => x"c99ff0ef", - 00000404 => x"dbc48493", + 00000404 => x"d6848493", 00000405 => x"ffc00993", 00000406 => x"008957b3", 00000407 => x"00f7f793", @@ -436,9 +436,9 @@ package neorv32_application_image is 00000422 => x"00812423", 00000423 => x"00912223", 00000424 => x"b71ff0ef", - 00000425 => x"1e050e63", + 00000425 => x"1c050863", 00000426 => x"00001537", - 00000427 => x"ba050513", + 00000427 => x"b7450513", 00000428 => x"c35ff0ef", 00000429 => x"34202473", 00000430 => x"00900713", @@ -450,20 +450,20 @@ package neorv32_application_image is 00000436 => x"0087ee63", 00000437 => x"00001737", 00000438 => x"00241793", - 00000439 => x"d8c70713", + 00000439 => x"d3870713", 00000440 => x"00e787b3", 00000441 => x"0007a783", 00000442 => x"00078067", 00000443 => x"800007b7", 00000444 => x"00b78713", - 00000445 => x"16e40863", + 00000445 => x"14e40e63", 00000446 => x"02876a63", 00000447 => x"00378713", - 00000448 => x"14e40663", + 00000448 => x"12e40c63", 00000449 => x"00778793", - 00000450 => x"14f40863", + 00000450 => x"12f40e63", 00000451 => x"00001537", - 00000452 => x"d0050513", + 00000452 => x"cd450513", 00000453 => x"bd1ff0ef", 00000454 => x"00040513", 00000455 => x"f05ff0ef", @@ -475,7 +475,7 @@ package neorv32_application_image is 00000461 => x"00f00713", 00000462 => x"fcf76ae3", 00000463 => x"00001537", - 00000464 => x"cf050513", + 00000464 => x"cc450513", 00000465 => x"ba1ff0ef", 00000466 => x"00048513", 00000467 => x"b81ff0ef", @@ -483,12 +483,12 @@ package neorv32_application_image is 00000469 => x"00500793", 00000470 => x"06f40263", 00000471 => x"00001537", - 00000472 => x"d6c50513", + 00000472 => x"d1850513", 00000473 => x"b81ff0ef", 00000474 => x"34002573", 00000475 => x"eb5ff0ef", 00000476 => x"00001537", - 00000477 => x"d7450513", + 00000477 => x"d2050513", 00000478 => x"b6dff0ef", 00000479 => x"34302573", 00000480 => x"ea1ff0ef", @@ -496,404 +496,383 @@ package neorv32_application_image is 00000482 => x"00c12083", 00000483 => x"00412483", 00000484 => x"00001537", - 00000485 => x"d8050513", + 00000485 => x"d2c50513", 00000486 => x"01010113", 00000487 => x"b49ff06f", 00000488 => x"00001537", - 00000489 => x"ba850513", + 00000489 => x"b7c50513", 00000490 => x"b3dff0ef", 00000491 => x"fb1ff06f", 00000492 => x"00001537", - 00000493 => x"bc850513", + 00000493 => x"b9c50513", 00000494 => x"b2dff0ef", 00000495 => x"f7c02783", - 00000496 => x"0c07da63", - 00000497 => x"0037f793", - 00000498 => x"00200713", - 00000499 => x"0ae78863", - 00000500 => x"00300713", - 00000501 => x"0ae78a63", - 00000502 => x"00100713", - 00000503 => x"08e78a63", - 00000504 => x"00001537", - 00000505 => x"d1850513", - 00000506 => x"fc1ff06f", - 00000507 => x"00001537", - 00000508 => x"be450513", - 00000509 => x"fb5ff06f", - 00000510 => x"00001537", - 00000511 => x"bf850513", - 00000512 => x"fa9ff06f", - 00000513 => x"00001537", - 00000514 => x"c0450513", - 00000515 => x"f9dff06f", - 00000516 => x"00001537", - 00000517 => x"c1c50513", - 00000518 => x"fa1ff06f", - 00000519 => x"00001537", - 00000520 => x"c3050513", - 00000521 => x"f85ff06f", - 00000522 => x"00001537", - 00000523 => x"c4c50513", - 00000524 => x"f89ff06f", - 00000525 => x"00001537", - 00000526 => x"c6050513", - 00000527 => x"f6dff06f", - 00000528 => x"00001537", - 00000529 => x"c8050513", - 00000530 => x"f61ff06f", - 00000531 => x"00001537", - 00000532 => x"ca050513", - 00000533 => x"f55ff06f", - 00000534 => x"00001537", - 00000535 => x"cbc50513", - 00000536 => x"f49ff06f", - 00000537 => x"00001537", - 00000538 => x"cd450513", - 00000539 => x"f3dff06f", - 00000540 => x"00001537", - 00000541 => x"d2850513", - 00000542 => x"f31ff06f", - 00000543 => x"00001537", - 00000544 => x"d3850513", - 00000545 => x"f25ff06f", - 00000546 => x"00001537", - 00000547 => x"d4c50513", - 00000548 => x"f19ff06f", - 00000549 => x"00001537", - 00000550 => x"d6050513", - 00000551 => x"f0dff06f", - 00000552 => x"00c12083", - 00000553 => x"00812403", - 00000554 => x"00412483", - 00000555 => x"01010113", - 00000556 => x"00008067", - 00000557 => x"01f00793", - 00000558 => x"02a7e263", - 00000559 => x"800007b7", - 00000560 => x"00078793", - 00000561 => x"00251513", - 00000562 => x"00a78533", - 00000563 => x"69000793", - 00000564 => x"00f52023", - 00000565 => x"00000513", - 00000566 => x"00008067", - 00000567 => x"00100513", - 00000568 => x"00008067", - 00000569 => x"ff010113", - 00000570 => x"00112623", - 00000571 => x"00812423", - 00000572 => x"00912223", - 00000573 => x"42400793", - 00000574 => x"30579073", - 00000575 => x"00000413", - 00000576 => x"01d00493", - 00000577 => x"00040513", - 00000578 => x"00140413", - 00000579 => x"0ff47413", - 00000580 => x"fa5ff0ef", - 00000581 => x"fe9418e3", - 00000582 => x"00c12083", - 00000583 => x"00812403", - 00000584 => x"f6002e23", - 00000585 => x"00412483", - 00000586 => x"01010113", - 00000587 => x"00008067", - 00000588 => x"fe802503", - 00000589 => x"01055513", - 00000590 => x"00157513", - 00000591 => x"00008067", - 00000592 => x"fc000793", - 00000593 => x"00a7a423", - 00000594 => x"00b7a623", - 00000595 => x"00008067", - 00000596 => x"00050613", - 00000597 => x"00000513", - 00000598 => x"0015f693", - 00000599 => x"00068463", - 00000600 => x"00c50533", - 00000601 => x"0015d593", - 00000602 => x"00161613", - 00000603 => x"fe0596e3", - 00000604 => x"00008067", - 00000605 => x"00050313", - 00000606 => x"ff010113", - 00000607 => x"00060513", - 00000608 => x"00068893", - 00000609 => x"00112623", - 00000610 => x"00030613", - 00000611 => x"00050693", - 00000612 => x"00000713", - 00000613 => x"00000793", - 00000614 => x"00000813", - 00000615 => x"0016fe13", - 00000616 => x"00171e93", - 00000617 => x"000e0c63", - 00000618 => x"01060e33", - 00000619 => x"010e3833", - 00000620 => x"00e787b3", - 00000621 => x"00f807b3", - 00000622 => x"000e0813", - 00000623 => x"01f65713", - 00000624 => x"0016d693", - 00000625 => x"00eee733", - 00000626 => x"00161613", - 00000627 => x"fc0698e3", - 00000628 => x"00058663", - 00000629 => x"f7dff0ef", - 00000630 => x"00a787b3", - 00000631 => x"00088a63", - 00000632 => x"00030513", - 00000633 => x"00088593", - 00000634 => x"f69ff0ef", - 00000635 => x"00f507b3", - 00000636 => x"00c12083", - 00000637 => x"00080513", - 00000638 => x"00078593", - 00000639 => x"01010113", - 00000640 => x"00008067", - 00000641 => x"06054063", - 00000642 => x"0605c663", - 00000643 => x"00058613", - 00000644 => x"00050593", - 00000645 => x"fff00513", - 00000646 => x"02060c63", - 00000647 => x"00100693", - 00000648 => x"00b67a63", - 00000649 => x"00c05863", - 00000650 => x"00161613", - 00000651 => x"00169693", - 00000652 => x"feb66ae3", - 00000653 => x"00000513", - 00000654 => x"00c5e663", - 00000655 => x"40c585b3", - 00000656 => x"00d56533", - 00000657 => x"0016d693", - 00000658 => x"00165613", - 00000659 => x"fe0696e3", - 00000660 => x"00008067", - 00000661 => x"00008293", - 00000662 => x"fb5ff0ef", - 00000663 => x"00058513", - 00000664 => x"00028067", - 00000665 => x"40a00533", - 00000666 => x"00b04863", - 00000667 => x"40b005b3", - 00000668 => x"f9dff06f", + 00000496 => x"0a07d463", + 00000497 => x"0017f793", + 00000498 => x"08078a63", + 00000499 => x"00001537", + 00000500 => x"cec50513", + 00000501 => x"fd5ff06f", + 00000502 => x"00001537", + 00000503 => x"bb850513", + 00000504 => x"fc9ff06f", + 00000505 => x"00001537", + 00000506 => x"bcc50513", + 00000507 => x"fbdff06f", + 00000508 => x"00001537", + 00000509 => x"bd850513", + 00000510 => x"fb1ff06f", + 00000511 => x"00001537", + 00000512 => x"bf050513", + 00000513 => x"fb5ff06f", + 00000514 => x"00001537", + 00000515 => x"c0450513", + 00000516 => x"f99ff06f", + 00000517 => x"00001537", + 00000518 => x"c2050513", + 00000519 => x"f9dff06f", + 00000520 => x"00001537", + 00000521 => x"c3450513", + 00000522 => x"f81ff06f", + 00000523 => x"00001537", + 00000524 => x"c5450513", + 00000525 => x"f75ff06f", + 00000526 => x"00001537", + 00000527 => x"c7450513", + 00000528 => x"f69ff06f", + 00000529 => x"00001537", + 00000530 => x"c9050513", + 00000531 => x"f5dff06f", + 00000532 => x"00001537", + 00000533 => x"ca850513", + 00000534 => x"f51ff06f", + 00000535 => x"00001537", + 00000536 => x"cfc50513", + 00000537 => x"f45ff06f", + 00000538 => x"00001537", + 00000539 => x"d0c50513", + 00000540 => x"f39ff06f", + 00000541 => x"00c12083", + 00000542 => x"00812403", + 00000543 => x"00412483", + 00000544 => x"01010113", + 00000545 => x"00008067", + 00000546 => x"01f00793", + 00000547 => x"02a7e263", + 00000548 => x"800007b7", + 00000549 => x"00078793", + 00000550 => x"00251513", + 00000551 => x"00a78533", + 00000552 => x"69000793", + 00000553 => x"00f52023", + 00000554 => x"00000513", + 00000555 => x"00008067", + 00000556 => x"00100513", + 00000557 => x"00008067", + 00000558 => x"ff010113", + 00000559 => x"00112623", + 00000560 => x"00812423", + 00000561 => x"00912223", + 00000562 => x"42400793", + 00000563 => x"30579073", + 00000564 => x"00000413", + 00000565 => x"01d00493", + 00000566 => x"00040513", + 00000567 => x"00140413", + 00000568 => x"0ff47413", + 00000569 => x"fa5ff0ef", + 00000570 => x"fe9418e3", + 00000571 => x"00c12083", + 00000572 => x"00812403", + 00000573 => x"f6002e23", + 00000574 => x"00412483", + 00000575 => x"01010113", + 00000576 => x"00008067", + 00000577 => x"fe802503", + 00000578 => x"01055513", + 00000579 => x"00157513", + 00000580 => x"00008067", + 00000581 => x"fc000793", + 00000582 => x"00a7a423", + 00000583 => x"00b7a623", + 00000584 => x"00008067", + 00000585 => x"00050613", + 00000586 => x"00000513", + 00000587 => x"0015f693", + 00000588 => x"00068463", + 00000589 => x"00c50533", + 00000590 => x"0015d593", + 00000591 => x"00161613", + 00000592 => x"fe0596e3", + 00000593 => x"00008067", + 00000594 => x"00050313", + 00000595 => x"ff010113", + 00000596 => x"00060513", + 00000597 => x"00068893", + 00000598 => x"00112623", + 00000599 => x"00030613", + 00000600 => x"00050693", + 00000601 => x"00000713", + 00000602 => x"00000793", + 00000603 => x"00000813", + 00000604 => x"0016fe13", + 00000605 => x"00171e93", + 00000606 => x"000e0c63", + 00000607 => x"01060e33", + 00000608 => x"010e3833", + 00000609 => x"00e787b3", + 00000610 => x"00f807b3", + 00000611 => x"000e0813", + 00000612 => x"01f65713", + 00000613 => x"0016d693", + 00000614 => x"00eee733", + 00000615 => x"00161613", + 00000616 => x"fc0698e3", + 00000617 => x"00058663", + 00000618 => x"f7dff0ef", + 00000619 => x"00a787b3", + 00000620 => x"00088a63", + 00000621 => x"00030513", + 00000622 => x"00088593", + 00000623 => x"f69ff0ef", + 00000624 => x"00f507b3", + 00000625 => x"00c12083", + 00000626 => x"00080513", + 00000627 => x"00078593", + 00000628 => x"01010113", + 00000629 => x"00008067", + 00000630 => x"06054063", + 00000631 => x"0605c663", + 00000632 => x"00058613", + 00000633 => x"00050593", + 00000634 => x"fff00513", + 00000635 => x"02060c63", + 00000636 => x"00100693", + 00000637 => x"00b67a63", + 00000638 => x"00c05863", + 00000639 => x"00161613", + 00000640 => x"00169693", + 00000641 => x"feb66ae3", + 00000642 => x"00000513", + 00000643 => x"00c5e663", + 00000644 => x"40c585b3", + 00000645 => x"00d56533", + 00000646 => x"0016d693", + 00000647 => x"00165613", + 00000648 => x"fe0696e3", + 00000649 => x"00008067", + 00000650 => x"00008293", + 00000651 => x"fb5ff0ef", + 00000652 => x"00058513", + 00000653 => x"00028067", + 00000654 => x"40a00533", + 00000655 => x"00b04863", + 00000656 => x"40b005b3", + 00000657 => x"f9dff06f", + 00000658 => x"40b005b3", + 00000659 => x"00008293", + 00000660 => x"f91ff0ef", + 00000661 => x"40a00533", + 00000662 => x"00028067", + 00000663 => x"00008293", + 00000664 => x"0005ca63", + 00000665 => x"00054c63", + 00000666 => x"f79ff0ef", + 00000667 => x"00058513", + 00000668 => x"00028067", 00000669 => x"40b005b3", - 00000670 => x"00008293", - 00000671 => x"f91ff0ef", - 00000672 => x"40a00533", - 00000673 => x"00028067", - 00000674 => x"00008293", - 00000675 => x"0005ca63", - 00000676 => x"00054c63", - 00000677 => x"f79ff0ef", - 00000678 => x"00058513", - 00000679 => x"00028067", - 00000680 => x"40b005b3", - 00000681 => x"fe0558e3", - 00000682 => x"40a00533", - 00000683 => x"f61ff0ef", - 00000684 => x"40b00533", - 00000685 => x"00028067", - 00000686 => x"6f727245", - 00000687 => x"4e202172", - 00000688 => x"5047206f", - 00000689 => x"75204f49", - 00000690 => x"2074696e", - 00000691 => x"746e7973", - 00000692 => x"69736568", - 00000693 => x"2164657a", - 00000694 => x"0000000a", - 00000695 => x"6e696c42", - 00000696 => x"676e696b", - 00000697 => x"44454c20", - 00000698 => x"6d656420", - 00000699 => x"7270206f", - 00000700 => x"6172676f", - 00000701 => x"00000a6d", - 00000702 => x"000004e8", - 00000703 => x"0000053c", - 00000704 => x"00000548", - 00000705 => x"00000550", - 00000706 => x"00000558", - 00000707 => x"00000560", - 00000708 => x"00000568", - 00000709 => x"00000570", - 00000710 => x"00000578", - 00000711 => x"0000049c", + 00000670 => x"fe0558e3", + 00000671 => x"40a00533", + 00000672 => x"f61ff0ef", + 00000673 => x"40b00533", + 00000674 => x"00028067", + 00000675 => x"6f727245", + 00000676 => x"4e202172", + 00000677 => x"5047206f", + 00000678 => x"75204f49", + 00000679 => x"2074696e", + 00000680 => x"746e7973", + 00000681 => x"69736568", + 00000682 => x"2164657a", + 00000683 => x"0000000a", + 00000684 => x"6e696c42", + 00000685 => x"676e696b", + 00000686 => x"44454c20", + 00000687 => x"6d656420", + 00000688 => x"7270206f", + 00000689 => x"6172676f", + 00000690 => x"00000a6d", + 00000691 => x"000004e8", + 00000692 => x"0000053c", + 00000693 => x"00000548", + 00000694 => x"00000550", + 00000695 => x"00000558", + 00000696 => x"00000560", + 00000697 => x"00000568", + 00000698 => x"00000570", + 00000699 => x"00000578", + 00000700 => x"0000049c", + 00000701 => x"0000049c", + 00000702 => x"00000580", + 00000703 => x"00000588", + 00000704 => x"0000049c", + 00000705 => x"0000049c", + 00000706 => x"0000049c", + 00000707 => x"00000590", + 00000708 => x"0000049c", + 00000709 => x"0000049c", + 00000710 => x"0000049c", + 00000711 => x"00000598", 00000712 => x"0000049c", - 00000713 => x"00000580", - 00000714 => x"00000588", + 00000713 => x"0000049c", + 00000714 => x"0000049c", 00000715 => x"0000049c", - 00000716 => x"0000049c", - 00000717 => x"0000049c", - 00000718 => x"00000590", - 00000719 => x"0000049c", - 00000720 => x"0000049c", - 00000721 => x"0000049c", - 00000722 => x"00000598", - 00000723 => x"0000049c", - 00000724 => x"0000049c", - 00000725 => x"0000049c", - 00000726 => x"0000049c", - 00000727 => x"000005a0", - 00000728 => x"000005a8", - 00000729 => x"000005b0", - 00000730 => x"000005b8", - 00000731 => x"000005c0", - 00000732 => x"000005c8", - 00000733 => x"000005d0", - 00000734 => x"000005d8", - 00000735 => x"000005e0", - 00000736 => x"000005e8", - 00000737 => x"000005f0", - 00000738 => x"000005f8", - 00000739 => x"00000600", - 00000740 => x"00000608", - 00000741 => x"00000610", - 00000742 => x"00000618", - 00000743 => x"00007830", - 00000744 => x"4554523c", - 00000745 => x"0000203e", - 00000746 => x"74736e49", - 00000747 => x"74637572", - 00000748 => x"206e6f69", - 00000749 => x"72646461", - 00000750 => x"20737365", - 00000751 => x"6173696d", - 00000752 => x"6e67696c", - 00000753 => x"00006465", - 00000754 => x"74736e49", - 00000755 => x"74637572", - 00000756 => x"206e6f69", - 00000757 => x"65636361", - 00000758 => x"66207373", - 00000759 => x"746c7561", - 00000760 => x"00000000", - 00000761 => x"656c6c49", - 00000762 => x"206c6167", - 00000763 => x"74736e69", - 00000764 => x"74637572", - 00000765 => x"006e6f69", - 00000766 => x"61657242", - 00000767 => x"696f706b", - 00000768 => x"0000746e", - 00000769 => x"64616f4c", - 00000770 => x"64646120", - 00000771 => x"73736572", - 00000772 => x"73696d20", - 00000773 => x"67696c61", - 00000774 => x"0064656e", - 00000775 => x"64616f4c", - 00000776 => x"63636120", - 00000777 => x"20737365", - 00000778 => x"6c756166", - 00000779 => x"00000074", - 00000780 => x"726f7453", - 00000781 => x"64612065", - 00000782 => x"73657264", - 00000783 => x"696d2073", - 00000784 => x"696c6173", - 00000785 => x"64656e67", - 00000786 => x"00000000", - 00000787 => x"726f7453", - 00000788 => x"63612065", - 00000789 => x"73736563", - 00000790 => x"75616620", - 00000791 => x"0000746c", - 00000792 => x"69766e45", - 00000793 => x"6d6e6f72", - 00000794 => x"20746e65", - 00000795 => x"6c6c6163", - 00000796 => x"6f726620", - 00000797 => x"2d55206d", - 00000798 => x"65646f6d", - 00000799 => x"00000000", - 00000800 => x"69766e45", - 00000801 => x"6d6e6f72", - 00000802 => x"20746e65", - 00000803 => x"6c6c6163", - 00000804 => x"6f726620", - 00000805 => x"2d4d206d", - 00000806 => x"65646f6d", - 00000807 => x"00000000", - 00000808 => x"6863614d", - 00000809 => x"20656e69", - 00000810 => x"74666f73", - 00000811 => x"65726177", - 00000812 => x"746e6920", - 00000813 => x"75727265", - 00000814 => x"00007470", - 00000815 => x"6863614d", - 00000816 => x"20656e69", - 00000817 => x"656d6974", - 00000818 => x"6e692072", - 00000819 => x"72726574", - 00000820 => x"00747075", - 00000821 => x"6863614d", - 00000822 => x"20656e69", - 00000823 => x"65747865", - 00000824 => x"6c616e72", - 00000825 => x"746e6920", - 00000826 => x"75727265", - 00000827 => x"00007470", - 00000828 => x"74736146", - 00000829 => x"746e6920", - 00000830 => x"75727265", - 00000831 => x"00207470", - 00000832 => x"6e6b6e55", - 00000833 => x"206e776f", - 00000834 => x"70617274", - 00000835 => x"75616320", - 00000836 => x"203a6573", - 00000837 => x"00000000", - 00000838 => x"45445b20", - 00000839 => x"45434956", - 00000840 => x"5252455f", - 00000841 => x"0000005d", - 00000842 => x"49545b20", - 00000843 => x"554f454d", - 00000844 => x"52455f54", - 00000845 => x"00005d52", - 00000846 => x"4e555b20", - 00000847 => x"45505845", - 00000848 => x"44455443", - 00000849 => x"4b43415f", - 00000850 => x"0000005d", - 00000851 => x"4e555b20", - 00000852 => x"45505845", - 00000853 => x"44455443", - 00000854 => x"5252455f", - 00000855 => x"0000005d", - 00000856 => x"4d505b20", - 00000857 => x"52455f50", - 00000858 => x"00005d52", - 00000859 => x"50204020", - 00000860 => x"00003d43", - 00000861 => x"544d202c", - 00000862 => x"3d4c4156", - 00000863 => x"00000000", - 00000864 => x"522f3c20", - 00000865 => x"0a3e4554", - 00000866 => x"00000000", - 00000867 => x"000007a0", - 00000868 => x"000007b0", - 00000869 => x"000007ec", - 00000870 => x"000007f8", - 00000871 => x"00000804", - 00000872 => x"00000810", - 00000873 => x"0000081c", - 00000874 => x"00000828", - 00000875 => x"00000834", - 00000876 => x"0000070c", - 00000877 => x"0000070c", - 00000878 => x"00000840", - 00000879 => x"33323130", - 00000880 => x"37363534", - 00000881 => x"42413938", - 00000882 => x"46454443" + 00000716 => x"000005a0", + 00000717 => x"000005a8", + 00000718 => x"000005b0", + 00000719 => x"000005b8", + 00000720 => x"000005c0", + 00000721 => x"000005c8", + 00000722 => x"000005d0", + 00000723 => x"000005d8", + 00000724 => x"000005e0", + 00000725 => x"000005e8", + 00000726 => x"000005f0", + 00000727 => x"000005f8", + 00000728 => x"00000600", + 00000729 => x"00000608", + 00000730 => x"00000610", + 00000731 => x"00000618", + 00000732 => x"00007830", + 00000733 => x"4554523c", + 00000734 => x"0000203e", + 00000735 => x"74736e49", + 00000736 => x"74637572", + 00000737 => x"206e6f69", + 00000738 => x"72646461", + 00000739 => x"20737365", + 00000740 => x"6173696d", + 00000741 => x"6e67696c", + 00000742 => x"00006465", + 00000743 => x"74736e49", + 00000744 => x"74637572", + 00000745 => x"206e6f69", + 00000746 => x"65636361", + 00000747 => x"66207373", + 00000748 => x"746c7561", + 00000749 => x"00000000", + 00000750 => x"656c6c49", + 00000751 => x"206c6167", + 00000752 => x"74736e69", + 00000753 => x"74637572", + 00000754 => x"006e6f69", + 00000755 => x"61657242", + 00000756 => x"696f706b", + 00000757 => x"0000746e", + 00000758 => x"64616f4c", + 00000759 => x"64646120", + 00000760 => x"73736572", + 00000761 => x"73696d20", + 00000762 => x"67696c61", + 00000763 => x"0064656e", + 00000764 => x"64616f4c", + 00000765 => x"63636120", + 00000766 => x"20737365", + 00000767 => x"6c756166", + 00000768 => x"00000074", + 00000769 => x"726f7453", + 00000770 => x"64612065", + 00000771 => x"73657264", + 00000772 => x"696d2073", + 00000773 => x"696c6173", + 00000774 => x"64656e67", + 00000775 => x"00000000", + 00000776 => x"726f7453", + 00000777 => x"63612065", + 00000778 => x"73736563", + 00000779 => x"75616620", + 00000780 => x"0000746c", + 00000781 => x"69766e45", + 00000782 => x"6d6e6f72", + 00000783 => x"20746e65", + 00000784 => x"6c6c6163", + 00000785 => x"6f726620", + 00000786 => x"2d55206d", + 00000787 => x"65646f6d", + 00000788 => x"00000000", + 00000789 => x"69766e45", + 00000790 => x"6d6e6f72", + 00000791 => x"20746e65", + 00000792 => x"6c6c6163", + 00000793 => x"6f726620", + 00000794 => x"2d4d206d", + 00000795 => x"65646f6d", + 00000796 => x"00000000", + 00000797 => x"6863614d", + 00000798 => x"20656e69", + 00000799 => x"74666f73", + 00000800 => x"65726177", + 00000801 => x"746e6920", + 00000802 => x"75727265", + 00000803 => x"00007470", + 00000804 => x"6863614d", + 00000805 => x"20656e69", + 00000806 => x"656d6974", + 00000807 => x"6e692072", + 00000808 => x"72726574", + 00000809 => x"00747075", + 00000810 => x"6863614d", + 00000811 => x"20656e69", + 00000812 => x"65747865", + 00000813 => x"6c616e72", + 00000814 => x"746e6920", + 00000815 => x"75727265", + 00000816 => x"00007470", + 00000817 => x"74736146", + 00000818 => x"746e6920", + 00000819 => x"75727265", + 00000820 => x"00207470", + 00000821 => x"6e6b6e55", + 00000822 => x"206e776f", + 00000823 => x"70617274", + 00000824 => x"75616320", + 00000825 => x"203a6573", + 00000826 => x"00000000", + 00000827 => x"49545b20", + 00000828 => x"554f454d", + 00000829 => x"52455f54", + 00000830 => x"00005d52", + 00000831 => x"45445b20", + 00000832 => x"45434956", + 00000833 => x"5252455f", + 00000834 => x"0000005d", + 00000835 => x"4d505b20", + 00000836 => x"52455f50", + 00000837 => x"00005d52", + 00000838 => x"50204020", + 00000839 => x"00003d43", + 00000840 => x"544d202c", + 00000841 => x"3d4c4156", + 00000842 => x"00000000", + 00000843 => x"522f3c20", + 00000844 => x"0a3e4554", + 00000845 => x"00000000", + 00000846 => x"000007a0", + 00000847 => x"000007b0", + 00000848 => x"000007d8", + 00000849 => x"000007e4", + 00000850 => x"000007f0", + 00000851 => x"000007fc", + 00000852 => x"00000808", + 00000853 => x"00000814", + 00000854 => x"00000820", + 00000855 => x"0000070c", + 00000856 => x"0000070c", + 00000857 => x"0000082c", + 00000858 => x"33323130", + 00000859 => x"37363534", + 00000860 => x"42413938", + 00000861 => x"46454443" ); end neorv32_application_image; diff --git a/rtl/core/neorv32_bus_keeper.vhd b/rtl/core/neorv32_bus_keeper.vhd index bcabff116..7d17ef45a 100644 --- a/rtl/core/neorv32_bus_keeper.vhd +++ b/rtl/core/neorv32_bus_keeper.vhd @@ -74,22 +74,19 @@ architecture neorv32_bus_keeper_rtl of neorv32_bus_keeper is constant lo_abb_c : natural := index_size_f(buskeeper_size_c); -- low address boundary bit -- Control register -- - constant ctrl_err_type_lsb_c : natural := 0; -- r/-: error type LSB: 0=device error, 1=access timeout - constant ctrl_err_type_msb_c : natural := 1; -- r/-: error type MSB: 2=unexpected ACK, 3=unexpected ERR + constant ctrl_err_type_c : natural := 0; -- r/-: error type LSB: 0=device error, 1=access timeout constant ctrl_nul_check_en_c : natural := 16; -- r/w: enable NULL address check constant ctrl_err_flag_c : natural := 31; -- r/c: bus error encountered, sticky; cleared by writing zero -- signal ctrl_null_check_en : std_ulogic; -- error codes -- - constant err_device_c : std_ulogic_vector(1 downto 0) := "00"; -- device access error - constant err_timeout_c : std_ulogic_vector(1 downto 0) := "01"; -- timeout error - constant err_unexp_ack_c : std_ulogic_vector(1 downto 0) := "10"; -- unexpected ACK signal error - constant err_unexp_err_c : std_ulogic_vector(1 downto 0) := "11"; -- unexpected ERR signal error + constant err_device_c : std_ulogic := '0'; -- device access error + constant err_timeout_c : std_ulogic := '1'; -- timeout error -- sticky error flags -- signal err_flag : std_ulogic; - signal err_type : std_ulogic_vector(1 downto 0); + signal err_type : std_ulogic; -- NULL address check -- signal null_check : std_ulogic; @@ -103,7 +100,7 @@ architecture neorv32_bus_keeper_rtl of neorv32_bus_keeper is type control_t is record pending : std_ulogic; timeout : std_ulogic_vector(index_size_f(max_proc_int_response_time_c) downto 0); - err_type : std_ulogic_vector(1 downto 0); + err_type : std_ulogic; bus_err : std_ulogic; end record; signal control : control_t; @@ -130,8 +127,8 @@ begin ack_o <= '-'; data_o <= (others => '-'); ctrl_null_check_en <= '0'; -- required - err_flag <= '0'; - err_type <= (others => '0'); + err_flag <= '0'; -- required + err_type <= '0'; elsif rising_edge(clk_i) then -- bus handshake -- ack_o <= wren or rden; @@ -144,16 +141,16 @@ begin -- read access -- data_o <= (others => '0'); if (rden = '1') then - data_o(ctrl_err_type_msb_c downto ctrl_err_type_lsb_c) <= err_type; - data_o(ctrl_nul_check_en_c) <= ctrl_null_check_en; - data_o(ctrl_err_flag_c) <= err_flag; + data_o(ctrl_err_type_c) <= err_type; + data_o(ctrl_nul_check_en_c) <= ctrl_null_check_en; + data_o(ctrl_err_flag_c) <= err_flag; end if; -- if (control.bus_err = '1') then -- sticky error flag err_flag <= '1'; err_type <= control.err_type; else - if ((wren or rden) = '1') then -- clear on read or write acces + if ((wren or rden) = '1') then -- clear on read or write access err_flag <= '0'; end if; end if; @@ -166,9 +163,9 @@ begin keeper_control: process(rstn_i, clk_i) begin if (rstn_i = '0') then - control.pending <= '0'; - control.bus_err <= '0'; - control.err_type <= (others => '-'); + control.pending <= '0'; -- required + control.bus_err <= '0'; -- required + control.err_type <= '-'; control.timeout <= (others => '-'); elsif rising_edge(clk_i) then -- defaults -- @@ -184,12 +181,6 @@ begin if ((bus_rden_i = '1') or (bus_wren_i = '1')) and (null_check = '1') then -- invalid access to NULL address control.err_type <= err_device_c; -- device error control.bus_err <= '1'; - elsif (bus_ack_i = '1') then - control.err_type <= err_unexp_ack_c; -- unexpected ACK - control.bus_err <= '1'; - elsif (bus_err_i = '1') then - control.err_type <= err_unexp_err_c; -- unexpected ERR - control.bus_err <= '1'; end if; -- access monitor: PENDING -- else @@ -204,7 +195,7 @@ begin control.bus_err <= '1'; control.pending <= '0'; elsif (bus_ack_i = '1') then -- normal termination by bus system - control.err_type <= (others => '0'); -- don't care + control.err_type <= '0'; -- don't care control.bus_err <= '0'; control.pending <= '0'; end if; diff --git a/rtl/core/neorv32_package.vhd b/rtl/core/neorv32_package.vhd index c23f57eea..09d6fadf1 100644 --- a/rtl/core/neorv32_package.vhd +++ b/rtl/core/neorv32_package.vhd @@ -64,7 +64,7 @@ package neorv32_package is -- Architecture Constants (do not modify!) ------------------------------------------------ -- ------------------------------------------------------------------------------------------- constant data_width_c : natural := 32; -- native data path width - do not change! - constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01060506"; -- no touchy! + constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01060507"; -- no touchy! constant archid_c : natural := 19; -- official NEORV32 architecture ID - hands off! -- Check if we're inside the Matrix ------------------------------------------------------- diff --git a/sw/lib/include/neorv32.h b/sw/lib/include/neorv32.h index 09b6fd676..0fc3926a1 100644 --- a/sw/lib/include/neorv32.h +++ b/sw/lib/include/neorv32.h @@ -907,8 +907,7 @@ typedef struct __attribute__((packed,aligned(4))) { /** BUSKEEPER control/data register bits */ enum NEORV32_BUSKEEPER_CTRL_enum { - BUSKEEPER_ERR_TYPE_LSB = 0, /**< BUSKEEPER control register( 0) (r/-): Bus error type LSB: 0=device error, 1=access timeout */ - BUSKEEPER_ERR_TYPE_MSB = 1, /**< BUSKEEPER control register( 1) (r/-): Bus error type MSB: 2=unexpected ACK, 3=unexpected ERR */ + BUSKEEPER_ERR_TYPE = 0, /**< BUSKEEPER control register( 0) (r/-): Bus error type: 0=device error, 1=access timeout */ BUSKEEPER_NULL_CHECK_EN = 16, /**< BUSKEEPER control register(16) (r/w): Enable NULL address check */ BUSKEEPER_ERR_FLAG = 31 /**< BUSKEEPER control register(31) (r/-): Sticky error flag, clears after read or write access */ }; diff --git a/sw/lib/source/neorv32_rte.c b/sw/lib/source/neorv32_rte.c index f1d95f1ba..75ae0b487 100644 --- a/sw/lib/source/neorv32_rte.c +++ b/sw/lib/source/neorv32_rte.c @@ -253,12 +253,11 @@ static void __neorv32_rte_debug_exc_handler(void) { if ((trap_cause == TRAP_CODE_I_ACCESS) || (trap_cause == TRAP_CODE_L_ACCESS) || (trap_cause == TRAP_CODE_S_ACCESS)) { register uint32_t bus_err = NEORV32_BUSKEEPER.CTRL; if (bus_err & (1< has to be caused by PMP rule violation diff --git a/sw/svd/neorv32.svd b/sw/svd/neorv32.svd index 948f1c5c5..e30616bb1 100644 --- a/sw/svd/neorv32.svd +++ b/sw/svd/neorv32.svd @@ -517,9 +517,9 @@ BUSKEEPER_ERR_TYPE - [1:0] + [0:0] read-only - Bus error type: 0=device error, 1=access timeout, 2=unexpected ACK, 3=unexpected ERR + Bus error type: 0=device error, 1=access timeout BUSKEEPER_NULL_CHECK_EN