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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [docs/] [datasheet/] [soc_buskeeper.adoc] - Blame information for rev 73

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 66 zero_gravi
<<<
2
:sectnums:
3
==== Internal Bus Monitor (BUSKEEPER)
4
 
5
[cols="<3,<3,<4"]
6
[frame="topbot",grid="none"]
7
|=======================
8
| Hardware source file(s): | neorv32_buskeeper.vhd |
9 70 zero_gravi
| Software driver file(s): | none |
10 66 zero_gravi
| Top entity port:         | none |
11
| Configuration generics:  | none |
12
| Package constants:       | `max_proc_int_response_time_c` | Access time window (#cycles)
13
| CPU interrupts:          | none |
14
|=======================
15
 
16 68 zero_gravi
 
17 66 zero_gravi
**Theory of Operation**
18
 
19
The Bus Keeper is a fundamental component of the processor's internal bus system that ensures correct bus operations
20
to maintain execution safety. The Bus Keeper monitors every single bus transactions that is intimated by the CPU.
21
If an accessed device responds with an error condition or do not respond within a specific _access time window_,
22
the according bus access fault exception is raised. The following exceptions can be raised by the Bus Keeper
23
(see section <<_neorv32_trap_listing>> for all CPU exceptions):
24
 
25
* `TRAP_CODE_I_ACCESS`: error during instruction fetch bus access
26
* `TRAP_CODE_S_ACCESS`: error during data store bus access
27
* `TRAP_CODE_L_ACCESS`: error during data load bus access
28
 
29
The **access time window**, in which an accessed device has to respond, is defined by the `max_proc_int_response_time_c`
30
constant from the processor's VHDL package file (`rtl/neorv32_package.vhd`). The default value is **15 clock cycles**.
31
 
32
In case of a bus access fault exception application software can evaluate the Bus Keeper's control register
33
`NEORV32_BUSKEEPER.CTRL` to retrieve further details of the bus exception. The _BUSKEEPER_ERR_FLAG_ bit indicates
34 68 zero_gravi
that an actual bus access fault has occurred. The bit is sticky once set and is automatically cleared when reading or
35 70 zero_gravi
writing the `NEORV32_BUSKEEPER.CTRL` register. The _BUSKEEPER_ERR_TYPE_ bit defines the type of the bus fault:
36 66 zero_gravi
 
37 70 zero_gravi
* `0` - "Device Error": The bus access exception was cause by the memory-mapped device that
38 66 zero_gravi
has been accessed (the device asserted it's `err_o`).
39 70 zero_gravi
* `1` - "Timeout Error": The bus access exception was caused by the Bus Keeper because the
40 68 zero_gravi
accessed memory-mapped device did not respond within the access time window. Note that this error type can also be raised
41
by the optional timeout feature of the <<_processor_external_memory_interface_wishbone_axi4_lite>>).
42 66 zero_gravi
 
43
[NOTE]
44 70 zero_gravi
Bus access fault exceptions are also raised if a physical memory protection (PMP) rule is violated. In this case
45
the _BUSKEEPER_ERR_FLAG_ bit remains zero (since the error signal is not triggered by the BUSKEEPER but by
46
the CPU's PMP logic).
47 66 zero_gravi
 
48
 
49
.BUSKEEPER register map (`struct NEORV32_BUSKEEPER`)
50
[cols="<2,<2,<4,^1,<4"]
51
[options="header",grid="all"]
52
|=======================
53
| Address | Name [C] | Bit(s), Name [C] | R/W | Function
54 73 zero_gravi
.2+<| `0xffffff7C` .2+<| `NEORV32_BUSKEEPER.CTRL` <|`0`  _BUSKEEPER_ERR_TYPE_ ^| r/- <| Bus error type, valid if _BUSKEEPER_ERR_FLAG_
55
                                                  <|`31` _BUSKEEPER_ERR_FLAG_ ^| r/c <| Sticky error flag, clears after read or write access
56 66 zero_gravi
|=======================

powered by: WebSVN 2.1.0

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