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

Subversion Repositories neorv32

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

Go to most recent revision | 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
| Software driver file(s): | none | explicitly used
10
| 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
**Theory of Operation**
17
 
18
The Bus Keeper is a fundamental component of the processor's internal bus system that ensures correct bus operations
19
to maintain execution safety. The Bus Keeper monitors every single bus transactions that is intimated by the CPU.
20
If an accessed device responds with an error condition or do not respond within a specific _access time window_,
21
the according bus access fault exception is raised. The following exceptions can be raised by the Bus Keeper
22
(see section <<_neorv32_trap_listing>> for all CPU exceptions):
23
 
24
* `TRAP_CODE_I_ACCESS`: error during instruction fetch bus access
25
* `TRAP_CODE_S_ACCESS`: error during data store bus access
26
* `TRAP_CODE_L_ACCESS`: error during data load bus access
27
 
28
The **access time window**, in which an accessed device has to respond, is defined by the `max_proc_int_response_time_c`
29
constant from the processor's VHDL package file (`rtl/neorv32_package.vhd`). The default value is **15 clock cycles**.
30
 
31
In case of a bus access fault exception application software can evaluate the Bus Keeper's control register
32
`NEORV32_BUSKEEPER.CTRL` to retrieve further details of the bus exception. The _BUSKEEPER_ERR_FLAG_ bit indicates
33
that an actual bus access fault has occurred. The bit is sticky once set is automatically cleared when reading the
34
`NEORV32_BUSKEEPER.CTRL` register. The _BUSKEEPER_ERR_TYPE_ indicated the tape or bus fault:
35
 
36
* _BUSKEEPER_ERR_TYPE_ = `0` - "Device Error": The bus access exception was cause by the memory-mapped device that
37
has been accessed (the device asserted it's `err_o`).
38
* _BUSKEEPER_ERR_TYPE_ = `1` - "Timeout Error": The bus access exception was caused by the Bus Keeper because the
39
accessed memory-mapped device did not respond within the access time window.
40
 
41
[NOTE]
42
Bus access fault exceptions are also raised if a physical memory protection rule is violated. In this case
43
the _BUSKEEPER_ERR_FLAG_ bit remains zero.
44
 
45
Furthermore, application software can determine the source of the bus access fault via the _BUSKEEPER_ERR_SRC_ bit:
46
 
47
* _BUSKEEPER_ERR_SRC_ = `0`: The error was cause during access via the <<_processor_external_memory_interface_wishbone_axi4_lite>>).
48
* _BUSKEEPER_ERR_SRC_ = `1`: The error was cause during access to an processor-internal module.
49
 
50
[NOTE]
51
The Bus Keeper does not track **timeout errors** of processor-external accesses via the external memory bus interface.
52
However, the external memory bus interface also provides an _optional_ and independent bus timeout feature
53
(see section <<_processor_external_memory_interface_wishbone_axi4_lite>>).
54
 
55
 
56
.BUSKEEPER register map (`struct NEORV32_BUSKEEPER`)
57
[cols="<2,<2,<4,^1,<4"]
58
[options="header",grid="all"]
59
|=======================
60
| Address | Name [C] | Bit(s), Name [C] | R/W | Function
61
.3+<| `0xffffff7C` .3+<| `NEORV32_BUSKEEPER.CTRL` <|`0`  _BUSKEEPER_ERR_TYPE_ ^| r/- <| Bus error type, valid if _BUSKEEPER_ERR_FLAG_ is set: `0`=device error, `1`=access timeout
62
                                                  <|`1`  _BUSKEEPER_ERR_SRC_  ^| r/- <| Error source: `0`=processor-internal, `1`=processor-external (via Wishbone bus interface)
63
                                                  <|`31` _BUSKEEPER_ERR_FLAG_ ^| r/- <| Sticky error flag, clears after read
64
|=======================

powered by: WebSVN 2.1.0

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