pub struct LibLibrary {Show 36 fields
pub name: String,
pub date: String,
pub revision: Option<String>,
pub comment: Option<String>,
pub delay_model: LibDelayModel,
pub time_unit: LibTimeUnit,
pub voltage_unit: LibVoltageUnit,
pub capacitive_load_unit: Option<LibCapacitiveLoadUnit>,
pub current_unit: Option<LibCurrentUnit>,
pub pulling_resistance_unit: Option<LibPullingResistanceUnit>,
pub leakage_power_unit: Option<LibLeakagePowerUnit>,
pub nom_process: Option<f64>,
pub nom_temperature: Option<f64>,
pub nom_voltage: Option<f64>,
pub default_operating_conditions: Option<String>,
pub slew_lower_threshold_pct_fall: f64,
pub slew_lower_threshold_pct_rise: f64,
pub slew_upper_threshold_pct_fall: f64,
pub slew_upper_threshold_pct_rise: f64,
pub slew_derate_from_library: f64,
pub input_threshold_pct_fall: f64,
pub input_threshold_pct_rise: f64,
pub output_threshold_pct_fall: f64,
pub output_threshold_pct_rise: f64,
pub default_leakage_power_density: f64,
pub default_cell_leakage_power: f64,
pub default_inout_pin_cap: Option<f64>,
pub default_input_pin_cap: Option<f64>,
pub default_output_pin_cap: Option<f64>,
pub default_fanout_load: Option<f64>,
pub default_max_transition: Option<f64>,
pub cells: Vec<LibCell>,
pub operating_conditions: Vec<LibOperatingConditions>,
pub lu_table_templates: Vec<LibLuTableTemplate>,
pub attrs: HashMap<String, LibValue>,
pub groups: Vec<LibGroup>,
}Fields§
§name: String§date: String§revision: Option<String>§comment: Option<String>§delay_model: LibDelayModel§time_unit: LibTimeUnit§voltage_unit: LibVoltageUnit§capacitive_load_unit: Option<LibCapacitiveLoadUnit>§current_unit: Option<LibCurrentUnit>§pulling_resistance_unit: Option<LibPullingResistanceUnit>§leakage_power_unit: Option<LibLeakagePowerUnit>§nom_process: Option<f64>§nom_temperature: Option<f64>§nom_voltage: Option<f64>§default_operating_conditions: Option<String>§slew_lower_threshold_pct_fall: f64§slew_lower_threshold_pct_rise: f64§slew_upper_threshold_pct_fall: f64§slew_upper_threshold_pct_rise: f64§slew_derate_from_library: f64§input_threshold_pct_fall: f64§input_threshold_pct_rise: f64§output_threshold_pct_fall: f64§output_threshold_pct_rise: f64§default_leakage_power_density: f64§default_cell_leakage_power: f64§default_inout_pin_cap: Option<f64>§default_input_pin_cap: Option<f64>§default_output_pin_cap: Option<f64>§default_fanout_load: Option<f64>§default_max_transition: Option<f64>§cells: Vec<LibCell>§operating_conditions: Vec<LibOperatingConditions>§lu_table_templates: Vec<LibLuTableTemplate>§attrs: HashMap<String, LibValue>§groups: Vec<LibGroup>Implementations§
Source§impl LibLibrary
impl LibLibrary
Source§impl LibLibrary
impl LibLibrary
Sourcepub fn load_file<P: AsRef<Path>>(path: P) -> Result<Self, LibError>
pub fn load_file<P: AsRef<Path>>(path: P) -> Result<Self, LibError>
Examples found in repository?
examples/ast_parse.rs (line 4)
3fn main_result() -> Result<(), Box<dyn std::error::Error>> {
4 let library = LibLibrary::load_file("./data/NangateOpenCellLibrary_typical.lib")?;
5 println!("{}", library.nom_process.unwrap());
6 println!("{}", library.name);
7 for cell in library.cells.iter().filter(|cell| cell.ff.is_some()) {
8 println!("{}", cell.name);
9 println!("{:?}", cell.ff.as_ref().unwrap());
10 }
11
12 for oc in library.operating_conditions.iter() {
13 println!("{:?}", oc);
14 }
15
16 for table in library.lu_table_templates.iter() {
17 println!("{}", table.name);
18 }
19
20 println!("{}", library.time_unit);
21 println!("{}", library.capacitive_load_unit.unwrap().value());
22 println!("{}", library.default_input_pin_cap.unwrap());
23
24 Ok(())
25}pub fn save_file<P: AsRef<Path>>(self, path: P) -> Result<(), LibError>
Trait Implementations§
Source§impl Clone for LibLibrary
impl Clone for LibLibrary
Source§fn clone(&self) -> LibLibrary
fn clone(&self) -> LibLibrary
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LibLibrary
impl Debug for LibLibrary
Source§impl Default for LibLibrary
impl Default for LibLibrary
Source§fn default() -> LibLibrary
fn default() -> LibLibrary
Returns the “default value” for a type. Read more
Source§impl FromLibGroup for LibLibrary
impl FromLibGroup for LibLibrary
Source§impl IntoLibGroup for LibLibrary
impl IntoLibGroup for LibLibrary
fn into_group(self) -> LibGroup
Source§impl Model for LibLibrary
impl Model for LibLibrary
Auto Trait Implementations§
impl Freeze for LibLibrary
impl RefUnwindSafe for LibLibrary
impl Send for LibLibrary
impl Sync for LibLibrary
impl Unpin for LibLibrary
impl UnsafeUnpin for LibLibrary
impl UnwindSafe for LibLibrary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
Source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
Source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
Source§impl<T> PipeRef for T
impl<T> PipeRef for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Provides immutable access for inspection. Read more
Source§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Calls
tap in debug builds, and does nothing in release builds.Source§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Provides mutable access for modification. Read more
Source§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Calls
tap_mut in debug builds, and does nothing in release builds.Source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
Source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
Provides immutable access to the reference for inspection.
Source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
Calls
tap_ref in debug builds, and does nothing in release builds.Source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Provides mutable access to the reference for modification.
Source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
Source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Provides immutable access to the borrow for inspection. Read more
Source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
Calls
tap_borrow in debug builds, and does nothing in release builds.Source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Provides mutable access to the borrow for modification.
Source§impl<T> TapDeref for T
impl<T> TapDeref for T
Source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
Calls
tap_deref in debug builds, and does nothing in release builds.Source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
Mutably dereferences
self for modification.