Skip to main content

GeneratorHtml

Struct GeneratorHtml 

Source
pub struct GeneratorHtml {
    pub core: GeneratorCore,
    /* private fields */
}

Fields§

§core: GeneratorCore

Implementations§

Source§

impl GeneratorHtml

Source

pub fn new(setting: GeneratorBaseSetting, cfg: CfgHtml) -> Self

Trait Implementations§

Source§

impl GeneratorBase for GeneratorHtml

Source§

const EXT: &'static str = "html"

File extension
Source§

fn core(&self) -> &GeneratorCore

Get reference to the core generator
Source§

fn core_mut(&mut self) -> &mut GeneratorCore

Get reference to the core generator
Source§

fn setting(&self) -> &GeneratorBaseSetting

Get reference to the core generator
Source§

fn is_public(&self) -> bool

True when privacy setting is set to Public
Source§

fn set_comp(&mut self, comp: CompInfo, top_is_rifmux: bool)

Get reference to the core generator
Source§

fn comp(&self) -> &CompInfo

Return access to component info
Source§

fn addr_width(&self) -> u8

Return address width of current compoment
Source§

fn set_addr_width(&mut self, width: u8)

Return address width of current compoment
Source§

fn data_width(&self) -> u8

Return data width of current compoment
Source§

fn comp_name(&self) -> &str

Return data width of current compoment
Source§

fn write(&mut self, txt: &str)

Write a string in main buffer
Source§

fn push_stash(&mut self, idx: usize, txt: &str)

Save a string in one of the two stash
Source§

fn pop_stash(&mut self, idx: usize)

Write a stash content into main buffer and clear the stash
Source§

fn pop_stash_to(&mut self, from: usize, to: usize)

Write a stash content into main buffer and clear the stash
Source§

fn stash_is_empty(&mut self, idx: usize) -> bool

Write a stash content into main buffer and clear the stash
Source§

fn save(&mut self, filename: &str, is_top: bool) -> Result<(), Box<dyn Error>>

Save the main buffer into a file and clear buffer and stash
Source§

fn casing(&mut self, txt: &str) -> String

Write a string in main buffer
Source§

fn filename_rif(&self, rif: &RifInst) -> String

Source§

fn filename_rifmux(&self, rifmux: &RifmuxInst) -> String

Source§

impl GeneratorDoc for GeneratorHtml

Source§

fn write_table_cell_top( &mut self, kind: (TableKind, CellKind), _span: usize, txt: &str, _id: &str, )

Write a table cell header

Add a link to an ID of the document

Source§

const HAS_LAYOUT: bool = true

Display register layout table
Source§

const SHOW_RESET: bool = true

Show register reset in top summary
Source§

const SHOW_TYPE: bool = false

Show type name summary tables (top/register)
Source§

const SHOW_SINGLE_REG: bool = true

Show register instance even when there is only one instance
Source§

fn set_rif_info(&mut self, rif: &RifInst)

Set the width of address/data for current RIF
Source§

fn write_header(&mut self, name: &str)

Write file header No header by default
Source§

fn write_rif_title(&mut self, idx_rif: (&str, usize), desc: &str)

Write component title
Source§

fn write_page_title( &mut self, idx_rif: (&str, usize), idx_page: (&str, usize), desc: (String, Option<String>), )

Write page title
Source§

fn write_reg_title( &mut self, idx_rif: (&str, usize), idx_page: (&str, usize), idx_reg: (&str, usize), desc: &str, _base_addr: Option<u64>, )

Write register title
Source§

fn write_table_title(&mut self, kind: TableKind, title: &str, id: &str)

Write a table header
Write a table header
Source§

fn write_table_row_header(&mut self, id: Option<&str>)

Write a table row header
Write a table row footer
Source§

fn write_table_cell( &mut self, kind: (TableKind, CellKind), span: usize, txt: &str, id: &str, tip: Option<String>, )

Write a table column
Source§

fn enum_def_desc(&mut self, def: &EnumDef) -> String

Write description of an enum field
Source§

fn sanitize(&self, raw: &str) -> String

Sanitize a text from all special characters Default implementation provides a simple copy
Source§

fn write_info(&mut self, info: &str)

Write component/page information
Source§

const SHOW_UNUSED: bool = false

Show unused part of a register
Source§

fn gen_all(&mut self, obj: &Comp) -> Result<(), Box<dyn Error>>

Main generator function
Source§

fn add_rifmux_entry( &mut self, comp: &CompInst, w: usize, offset: u64, top_name: Option<&str>, groups: &[RifmuxGroupInst], )

Add rifmux row in a table composed of 4 column: Address, Type, Instance and short description
Source§

fn write_rifmux_entry( &mut self, inst_name: &str, type_name: &str, addr: (u64, usize), desc: &str, show_type: bool, )

Source§

fn add_rif( &mut self, rif: &RifInst, idx: usize, info: &[RifInstInfo], ) -> Result<(), String>

Add RIF description
Source§

fn add_reg_summary(&mut self, rif: &RifInst, info: &[RifInstInfo])

Add register summary
Source§

fn write_reg_summary_header(&mut self, rif: &RifInst)

Source§

fn add_rif_summary(&mut self, rif: &RifInst, infos: &[RifInstInfo])

Summary of RIF instances when there is more than one
Source§

fn add_reg_detail( &mut self, rif: &RifInst, idx_c: usize, base_addr: Option<u64>, ) -> Result<(), String>

Add register details: table with register instance followed by table with fields description
Source§

fn write_reg_detail_header(&mut self, rif: &RifInst)

Write header for the register detail tables
Source§

fn access_str(kind: &FieldSwKind) -> &str

Convert access to string
Write file footer (empty by default)
Source§

fn write_table_row_top_header(&mut self, kind: TableKind)

Write a table top row header
Write a table top row footer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.