#[derive(Debug)] pub struct Module { pub name: String, pub addr: u32, pub size: u32, pub amod: Option, pub r#type: Option, pub desc: Option, pub elements_bitstring: Vec, pub elements_other: Vec, } #[derive(Debug)] pub enum ModuleBlockElements { Block(Block), Register(Register), Memory(Memory), Fifo(Fifo), } #[derive(Debug)] pub struct BitString { pub name: String, pub size: Option, pub mask: Option, pub modf: Option, pub desc: Option, pub elements_field: Vec, } #[derive(Debug)] pub struct Block { pub name: String, /// Fill this with proper calc. pub addr: u32, /// Fill this with proper calc. pub r#type: DataType, /// Fill this with proper calc. pub modf: RwSpecifier, // TODO: should this be expanded? pub multiple: Option, // TODO pub decoder: String, pub size: u32, pub desc: Option, pub elements: Vec, } #[derive(Debug)] pub struct Register { pub name: String, /// Fill this with proper calc. pub addr: u32, pub mask: Option, /// Fill this with proper calc. pub modf: RwSpecifier, pub multiple: Option, pub default: Option, pub desc: Option, // BitString? pub elements: Vec, } #[derive(Debug)] pub struct Memory { pub name: String, /// Fill this with proper calc. pub addr: u32, pub mask: Option, /// Fill this with proper calc pub modf: RwSpecifier, pub dma: Option, pub multiple: Option, // BitString? pub desc: Option, pub elements: Vec, } #[derive(Debug)] pub struct Fifo { pub name: String, /// Fill this with proper calc. pub addr: u32, pub size: u32, pub mask: Option, /// Fill this with proper calc. pub modf: RwSpecifier, pub interface: Option, pub multiple: Option, // BitString? pub desc: String, pub elements: Vec, } // TODO #[derive(Debug)] pub struct Field { pub name: String, /// TODO: is this optional? pub mask: u32, /// Fill this with proper calc. pub modf: RwSpecifier, pub interface: Option, pub multiple: Option, pub default: Option, // TODO pub sclr: Option, pub desc: Option, pub elements: Vec, } #[derive(Debug)] pub struct Value { pub name: String, pub data: u32, pub desc: Option } #[derive(Debug)] pub enum AmodValues { A16, A24, A32, CRCSR, USER1, 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, Both, }