pub struct GeneratorHtml {
pub core: GeneratorCore,
/* private fields */
}Fields§
§core: GeneratorCoreImplementations§
Source§impl GeneratorHtml
impl GeneratorHtml
pub fn new(setting: GeneratorBaseSetting, cfg: CfgHtml) -> Self
Trait Implementations§
Source§impl GeneratorBase for GeneratorHtml
impl GeneratorBase for GeneratorHtml
Source§fn core(&self) -> &GeneratorCore
fn core(&self) -> &GeneratorCore
Get reference to the core generator
Source§fn core_mut(&mut self) -> &mut GeneratorCore
fn core_mut(&mut self) -> &mut GeneratorCore
Get reference to the core generator
Source§fn setting(&self) -> &GeneratorBaseSetting
fn setting(&self) -> &GeneratorBaseSetting
Get reference to the core generator
Source§fn set_comp(&mut self, comp: CompInfo, top_is_rifmux: bool)
fn set_comp(&mut self, comp: CompInfo, top_is_rifmux: bool)
Get reference to the core generator
Source§fn addr_width(&self) -> u8
fn addr_width(&self) -> u8
Return address width of current compoment
Source§fn set_addr_width(&mut self, width: u8)
fn set_addr_width(&mut self, width: u8)
Return address width of current compoment
Source§fn data_width(&self) -> u8
fn data_width(&self) -> u8
Return data width of current compoment
Source§fn push_stash(&mut self, idx: usize, txt: &str)
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)
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)
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
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>>
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
fn filename_rif(&self, rif: &RifInst) -> String
fn filename_rifmux(&self, rifmux: &RifmuxInst) -> String
Source§impl GeneratorDoc for GeneratorHtml
impl GeneratorDoc for GeneratorHtml
Source§fn write_table_cell_top(
&mut self,
kind: (TableKind, CellKind),
_span: usize,
txt: &str,
_id: &str,
)
fn write_table_cell_top( &mut self, kind: (TableKind, CellKind), _span: usize, txt: &str, _id: &str, )
Write a table cell header
Source§const HAS_LAYOUT: bool = true
const HAS_LAYOUT: bool = true
Display register layout table
Source§const SHOW_RESET: bool = true
const SHOW_RESET: bool = true
Show register reset in top summary
Source§const SHOW_SINGLE_REG: bool = true
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)
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)
fn write_header(&mut self, name: &str)
Write file header
No header by default
Source§fn write_page_title(
&mut self,
idx_rif: (&str, usize),
idx_page: (&str, usize),
desc: (String, Option<String>),
)
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>,
)
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
Write a table header
Source§fn write_table_row_header(&mut self, id: Option<&str>)
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>,
)
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
fn enum_def_desc(&mut self, def: &EnumDef) -> String
Write description of an enum field
Source§fn sanitize(&self, raw: &str) -> String
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)
fn write_info(&mut self, info: &str)
Write component/page information
Source§const SHOW_UNUSED: bool = false
const SHOW_UNUSED: bool = false
Show unused part of a register
Source§fn add_rifmux_entry(
&mut self,
comp: &CompInst,
w: usize,
offset: u64,
top_name: Option<&str>,
groups: &[RifmuxGroupInst],
)
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
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>
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])
fn add_reg_summary(&mut self, rif: &RifInst, info: &[RifInstInfo])
Add register summary
fn write_reg_summary_header(&mut self, rif: &RifInst)
Source§fn add_rif_summary(&mut self, rif: &RifInst, infos: &[RifInstInfo])
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>
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)
fn write_reg_detail_header(&mut self, rif: &RifInst)
Write header for the register detail tables
Source§fn access_str(kind: &FieldSwKind) -> &str
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)
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§
impl Freeze for GeneratorHtml
impl RefUnwindSafe for GeneratorHtml
impl Send for GeneratorHtml
impl Sync for GeneratorHtml
impl Unpin for GeneratorHtml
impl UnsafeUnpin for GeneratorHtml
impl UnwindSafe for GeneratorHtml
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more