Add registers in rust
This commit is contained in:
7
bench/programs_rust/fpga-lib/Cargo.toml
Normal file
7
bench/programs_rust/fpga-lib/Cargo.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "fpga-lib"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
fpga-lib-macros = { path = "../fpga-lib-macros" }
|
||||
13
bench/programs_rust/fpga-lib/src/lib.rs
Normal file
13
bench/programs_rust/fpga-lib/src/lib.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
#![no_std]
|
||||
|
||||
pub mod register;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! panic_handler {
|
||||
() => {
|
||||
#[panic_handler]
|
||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
};
|
||||
}
|
||||
3
bench/programs_rust/fpga-lib/src/register.rs
Normal file
3
bench/programs_rust/fpga-lib/src/register.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
pub struct Reg<const N: usize> {}
|
||||
|
||||
fpga_lib_macros::define_regs! {}
|
||||
Reference in New Issue
Block a user