Skip to main content

TargetPrototype

Struct TargetPrototype 

Source
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

Source

pub fn new_pure() -> TargetPrototype

Source

pub fn new_has_state() -> TargetPrototype

Source

pub fn new_has_effects() -> TargetPrototype

Source

pub fn add_param_bits( self, name: impl Into<String>, default: impl Into<Const>, ) -> Self

Source

pub fn add_param_bool(self, name: impl Into<String>, default: bool) -> Self

Source

pub fn add_param_int_enum( self, name: impl Into<String>, variants: &[i64], ) -> Self

Source

pub fn add_param_string_enum( self, name: impl Into<String>, variants: &[impl AsRef<str>], ) -> Self

Source

pub fn add_input( self, name: impl Into<String>, default: impl Into<Const>, ) -> Self

Source

pub fn add_input_invertible( self, name: impl Into<String>, default: impl Into<Const>, invert_param: impl AsRef<str>, ) -> Self

Source

pub fn add_output(self, name: impl Into<String>, width: usize) -> Self

Source

pub fn add_io(self, name: impl Into<String>, width: usize) -> Self

Source

pub fn get_param(&self, name: &str) -> Option<&TargetParam>

Source

pub fn get_input(&self, name: &str) -> Option<&TargetInput>

Source

pub fn get_output(&self, name: &str) -> Option<&TargetOutput>

Source

pub fn get_io(&self, name: &str) -> Option<&TargetIo>

Source

pub fn apply_param( &self, target_cell: &mut TargetCell, name: impl AsRef<str>, value: impl Into<ParamValue>, )

Source

pub fn apply_input( &self, target_cell: &mut TargetCell, name: impl AsRef<str>, value: impl AsRef<ValueSlice>, )

Source

pub fn apply_io<'a>( &self, target_cell: &mut TargetCell, name: impl AsRef<str>, value: impl Into<Cow<'a, IoValue>>, )

Source

pub fn extract_param<'a>( &self, target_cell: &'a TargetCell, name: impl AsRef<str>, ) -> &'a ParamValue

Source

pub fn extract_param_bool( &self, target_cell: &TargetCell, name: impl AsRef<str>, ) -> bool

Source

pub fn extract_input( &self, target_cell: &TargetCell, name: impl AsRef<str>, ) -> Value

Source

pub fn extract_output( &self, target_cell_output: &Value, name: impl AsRef<str>, ) -> Value

Source

pub fn target_cell_to_instance(&self, cell: &TargetCell) -> Instance

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TargetPrototype

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TargetPrototype

Source§

impl PartialEq for TargetPrototype

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TargetPrototype

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.