bnx_cal/lib.rs
1
2
3//! # Bnx Core Abstraction Layer
4//!
5//! **C**ore **A**bstraction library abstracts a core.
6//! It provides interfaces to HAL layer above such that
7//! HAL layer above is void of any core and system specific information and core and
8//! system agnostic. However RISC-V standard specific core details that are common acrosss all RISC-V cores
9//! aret part of **C**ommon **C**ore **A**bstraction **L**ayer .
10//! System Abstraction Layer abstracts a system and Core Abstraction Layer abstracts a core.
11//!
12//! # Example
13//! **E31** - a core and its abstracted in Core Abstraction Layer. <br>
14//! **FE310** - a system with E31 core and peripherals is abstracted in System Abstraction Layer. <br>
15//! <br>
16//! SAL dont cover that are abstracted in CAL instead might use them.
17//! In software architecture, CAL & SAL are beside each other as below.
18//!
19//! ```
20//! ---------------- Hardware Abstraction Layer --------------------------
21//! ----------------------------------------------------------------------
22//! | System Abstraction Layer | Core Abstraction Layer
23//! ----------------------------------------------------------------------
24//! ```
25//!
26//! CAL abstracts: <br>
27//! > **C**ore Clock <br>
28//! > **C**ore Boot <br>
29//!
30//! Whereas SAL abstracts: <br>
31//! > **G**pio <br>
32//! > **U**art <br>
33//! > **S**pi <br>
34//! > **I**2c <br>
35pub mod e31;
36
37#[cfg(test)]
38mod tests {
39 #[test]
40 fn it_works() {
41 let result = 2 + 2;
42 assert_eq!(result, 4);
43 }
44}