pub struct TargetPrototype {
pub purity: TargetCellPurity,
pub params: Vec<TargetParam>,
pub params_by_name: BTreeMap<String, usize>,
pub inputs: Vec<TargetInput>,
pub inputs_by_name: BTreeMap<String, usize>,
pub input_len: usize,
pub outputs: Vec<TargetOutput>,
pub outputs_by_name: BTreeMap<String, usize>,
pub output_len: usize,
pub ios: Vec<TargetIo>,
pub ios_by_name: BTreeMap<String, usize>,
pub io_len: usize,
}
Fields§
§purity: TargetCellPurity
§params: Vec<TargetParam>
§params_by_name: BTreeMap<String, usize>
§inputs: Vec<TargetInput>
§inputs_by_name: BTreeMap<String, usize>
§input_len: usize
§outputs: Vec<TargetOutput>
§outputs_by_name: BTreeMap<String, usize>
§output_len: usize
§ios: Vec<TargetIo>
§ios_by_name: BTreeMap<String, usize>
§io_len: usize
Implementations§
Source§impl TargetPrototype
impl TargetPrototype
pub fn new_pure() -> TargetPrototype
pub fn new_has_state() -> TargetPrototype
pub fn new_has_effects() -> TargetPrototype
pub fn add_param_bits( self, name: impl Into<String>, default: impl Into<Const>, ) -> Self
pub fn add_param_bool(self, name: impl Into<String>, default: bool) -> Self
pub fn add_param_int_enum( self, name: impl Into<String>, variants: &[i64], ) -> Self
pub fn add_param_string_enum( self, name: impl Into<String>, variants: &[impl AsRef<str>], ) -> Self
pub fn add_input( self, name: impl Into<String>, default: impl Into<Const>, ) -> Self
pub fn add_input_invertible( self, name: impl Into<String>, default: impl Into<Const>, invert_param: impl AsRef<str>, ) -> Self
pub fn add_output(self, name: impl Into<String>, width: usize) -> Self
pub fn add_io(self, name: impl Into<String>, width: usize) -> Self
pub fn get_param(&self, name: &str) -> Option<&TargetParam>
pub fn get_input(&self, name: &str) -> Option<&TargetInput>
pub fn get_output(&self, name: &str) -> Option<&TargetOutput>
pub fn get_io(&self, name: &str) -> Option<&TargetIo>
pub fn apply_param( &self, target_cell: &mut TargetCell, name: impl AsRef<str>, value: impl Into<ParamValue>, )
pub fn apply_input<'a>( &self, target_cell: &mut TargetCell, name: impl AsRef<str>, value: impl Into<Cow<'a, Value>>, )
pub fn apply_io<'a>( &self, target_cell: &mut TargetCell, name: impl AsRef<str>, value: impl Into<Cow<'a, IoValue>>, )
pub fn extract_param<'a>( &self, target_cell: &'a TargetCell, name: impl AsRef<str>, ) -> &'a ParamValue
pub fn extract_param_bool( &self, target_cell: &TargetCell, name: impl AsRef<str>, ) -> bool
pub fn extract_input( &self, target_cell: &TargetCell, name: impl AsRef<str>, ) -> Value
pub fn extract_output( &self, target_cell_output: &Value, name: impl AsRef<str>, ) -> Value
pub fn target_cell_to_instance(&self, cell: &TargetCell) -> Instance
pub fn instance_to_target_cell( &self, design: &Design, instance: &Instance, instance_output: Value, ) -> Result<(TargetCell, Value), TargetCellImportError>
Trait Implementations§
Source§impl Clone for TargetPrototype
impl Clone for TargetPrototype
Source§fn clone(&self) -> TargetPrototype
fn clone(&self) -> TargetPrototype
Returns a copy of the value. Read more
1.0.0 · 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 TargetPrototype
impl Debug for TargetPrototype
Source§impl PartialEq for TargetPrototype
impl PartialEq for TargetPrototype
impl Eq for TargetPrototype
impl StructuralPartialEq for TargetPrototype
Auto Trait Implementations§
impl Freeze for TargetPrototype
impl RefUnwindSafe for TargetPrototype
impl Send for TargetPrototype
impl Sync for TargetPrototype
impl Unpin for TargetPrototype
impl UnwindSafe for TargetPrototype
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.