modify(types): add derive(Debug)

This commit is contained in:
Wataru Otsubo 2025-01-29 21:19:44 +09:00
parent 99e98c9320
commit f2a7a5a28b

View file

@ -1,3 +1,4 @@
#[derive(Debug)]
pub struct Module {
pub name: String,
pub addr: u32,
@ -9,6 +10,7 @@ pub struct Module {
pub elements_other: Vec<ModuleBlockElements>,
}
#[derive(Debug)]
pub enum ModuleBlockElements {
Block(Block),
Register(Register),
@ -16,6 +18,7 @@ pub enum ModuleBlockElements {
Fifo(Fifo),
}
#[derive(Debug)]
pub struct BitString {
pub name: String,
pub size: Option<u32>,
@ -25,6 +28,7 @@ pub struct BitString {
pub elements_field: Vec<Field>,
}
#[derive(Debug)]
pub struct Block {
pub name: String,
/// Fill this with proper calc.
@ -42,6 +46,7 @@ pub struct Block {
pub elements: Vec<ModuleBlockElements>,
}
#[derive(Debug)]
pub struct Register {
pub name: String,
/// Fill this with proper calc.
@ -56,6 +61,7 @@ pub struct Register {
pub elements: Vec<Field>,
}
#[derive(Debug)]
pub struct Memory {
pub name: String,
/// Fill this with proper calc.
@ -70,6 +76,7 @@ pub struct Memory {
pub elements: Vec<Field>,
}
#[derive(Debug)]
pub struct Fifo {
pub name: String,
/// Fill this with proper calc.
@ -86,6 +93,7 @@ pub struct Fifo {
}
// TODO
#[derive(Debug)]
pub struct Field {
pub name: String,
/// TODO: is this optional?
@ -101,12 +109,14 @@ pub struct Field {
pub elements: Vec<Value>,
}
#[derive(Debug)]
pub struct Value {
pub name: String,
pub data: u32,
pub desc: Option<String>
}
#[derive(Debug)]
pub enum AmodValues {
A16,
A24,
@ -116,21 +126,25 @@ pub enum AmodValues {
USER2,
}
#[derive(Debug)]
pub enum DataType {
D32,
}
#[derive(Debug)]
pub enum RwSpecifier {
R,
W,
RW,
}
#[derive(Debug)]
pub struct MultipleParams {
pub multiple: u32,
pub offset: u32,
}
#[derive(Debug)]
pub enum FieldFifoInterface {
Vector,
Block,