pub struct Design { /* private fields */ }Expand description
Sea of Cells.
Implementations§
Source§impl Design
impl Design
pub fn new() -> Design
pub fn with_target(target: Option<Arc<dyn Target>>) -> Design
pub fn add_io(&self, name: impl Into<String>, width: usize) -> IoValue
pub fn get_io(&self, name: impl AsRef<str>) -> Option<IoValue>
pub fn find_io(&self, io_net: IoNet) -> Option<(&str, usize)>
pub fn iter_ios(&self) -> impl Iterator<Item = (&str, IoValue)>
pub fn add_cell_with_metadata_id( &self, cell: Cell, metadata: MetaItemId, ) -> Value
pub fn add_cell_with_metadata(&self, cell: Cell, metadata: &MetaItem) -> Value
pub fn use_metadata(&self, item: MetaItemId) -> WithMetadataGuard<'_>
pub fn use_metadata_from(&self, cell_ids: &[CellId]) -> WithMetadataGuard<'_>
pub fn get_use_metadata(&self) -> MetaItemId
pub fn add_cell(&self, cell: Cell) -> Value
pub fn add_void(&self, width: usize) -> Value
pub fn cell(&self, id: CellId) -> Cow<'_, Cell>
pub fn cell_metadata(&self, id: CellId) -> MetaItemId
pub fn cell_output_len(&self, id: CellId) -> usize
pub fn cell_output(&self, id: CellId) -> Value
pub fn cell_visit(&self, id: CellId, f: impl FnMut(ValueBit))
pub fn cell_replace(&self, cell: CellId, to_cell: Cell)
pub fn cell_append_metadata(&self, cell: CellId, metadata: MetaItemId)
pub fn cell_unalive(&self, cell: CellId)
pub fn find_cell(&self, net: ValueBit) -> (CellId, usize)
pub fn map_net_new(&self, net: impl Into<ValueBit>) -> ValueBit
pub fn find_new_cell(&self, net: ValueBit) -> (Cow<'_, Cell>, MetaItemId, usize)
pub fn append_metadata_by_net(&self, net: ValueBit, metadata: MetaItemId)
pub fn iter_cells(&self) -> CellIter<'_>
pub fn add_metadata_string(&self, string: &str) -> MetaStringId
pub fn ref_metadata_string(&self, index: MetaStringId) -> Ref<'_, str>
pub fn add_metadata_item(&self, item: &MetaItem) -> MetaItemId
pub fn ref_metadata_item(&self, index: MetaItemId) -> Ref<'_, MetaItem>
pub fn iter_metadata_item( &self, item: MetaItemId, ) -> impl Iterator<Item = MetaItemId> + use<'_>
pub fn meta_from_iter( &self, iter: impl IntoIterator<Item = MetaItemId>, ) -> MetaItemId
pub fn meta_from_merge( &self, iter: impl IntoIterator<Item = MetaItemId>, ) -> MetaItemId
pub fn replace_net( &self, from_net: impl Into<ValueBit>, to_net: impl Into<ValueBit>, )
pub fn replace_value( &self, from_value: impl AsRef<ValueSlice>, to_value: impl AsRef<ValueSlice>, )
pub fn map_net(&self, net: impl Into<ValueBit>) -> ValueBit
pub fn map_value(&self, value: impl Into<Value>) -> Value
pub fn is_empty(&self) -> bool
pub fn is_changed(&self) -> bool
pub fn verify<SMT: SmtEngine>(&self, engine: SMT) -> Result<(), SMT::Error>
pub fn apply(&mut self) -> bool
pub fn target(&self) -> Option<Arc<dyn Target>>
pub fn target_prototype(&self, target_cell: &TargetCell) -> &TargetPrototype
Source§impl Design
impl Design
pub fn add_buf(&self, arg: impl Into<Value>) -> Value
pub fn add_buf1(&self, arg: impl Into<ValueBit>) -> ValueBit
pub fn add_not(&self, arg: impl Into<Value>) -> Value
pub fn add_not1(&self, arg: impl Into<ValueBit>) -> ValueBit
pub fn add_and(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> Value
pub fn add_and1( &self, arg1: impl Into<ValueBit>, arg2: impl Into<ValueBit>, ) -> ValueBit
pub fn add_or(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> Value
pub fn add_or1( &self, arg1: impl Into<ValueBit>, arg2: impl Into<ValueBit>, ) -> ValueBit
pub fn add_xor(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> Value
pub fn add_xor1( &self, arg1: impl Into<ValueBit>, arg2: impl Into<ValueBit>, ) -> ValueBit
pub fn add_adc( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, arg3: impl Into<ValueBit>, ) -> Value
pub fn add_aig( &self, arg1: impl Into<ControlNet>, arg2: impl Into<ControlNet>, ) -> ValueBit
pub fn add_eq(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> ValueBit
pub fn add_ult( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, ) -> ValueBit
pub fn add_slt( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, ) -> ValueBit
pub fn add_shl( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, stride: u32, ) -> Value
pub fn add_ushr( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, stride: u32, ) -> Value
pub fn add_sshr( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, stride: u32, ) -> Value
pub fn add_xshr( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, stride: u32, ) -> Value
pub fn add_mul(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> Value
pub fn add_udiv(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> Value
pub fn add_umod(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> Value
pub fn add_sdiv_trunc( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, ) -> Value
pub fn add_sdiv_floor( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, ) -> Value
pub fn add_smod_trunc( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, ) -> Value
pub fn add_smod_floor( &self, arg1: impl Into<Value>, arg2: impl Into<Value>, ) -> Value
pub fn add_match(&self, arg: impl Into<MatchCell>) -> Value
pub fn add_assign(&self, arg: impl Into<AssignCell>) -> Value
pub fn add_dff(&self, arg: impl Into<FlipFlop>) -> Value
pub fn add_memory(&self, arg: impl Into<Memory>) -> Value
pub fn add_iobuf(&self, arg: impl Into<IoBuffer>) -> Value
pub fn add_other(&self, arg: impl Into<Instance>) -> Value
pub fn add_target(&self, arg: impl Into<TargetCell>) -> Value
pub fn add_input(&self, name: impl Into<String>, width: usize) -> Value
pub fn add_input1(&self, name: impl Into<String>) -> ValueBit
pub fn add_output(&self, name: impl Into<String>, value: impl Into<Value>)
pub fn add_name(&self, name: impl Into<String>, value: impl Into<Value>)
pub fn add_debug(&self, name: impl Into<String>, value: impl Into<Value>)
pub fn add_mux( &self, sel: impl Into<ControlNet>, args: [impl Into<Value>; 2], ) -> Value
pub fn add_mux1( &self, sel: impl Into<ControlNet>, args: [impl Into<ValueBit>; 2], ) -> ValueBit
pub fn add_ne(&self, arg1: impl Into<Value>, arg2: impl Into<Value>) -> ValueBit
Source§impl Design
impl Design
pub fn topo_sort(&self) -> Vec<TopoSortItem>
pub fn iter_cells_topo(&self) -> impl DoubleEndedIterator<Item = CellId>
pub fn compact(&mut self) -> bool
pub fn statistics(&self) -> BTreeMap<String, usize>
Source§impl Design
impl Design
pub fn display_net(&self, net: impl Into<ValueBit>) -> impl Display + '_
pub fn display_control_net( &self, net: impl Into<ControlNet>, ) -> impl Display + '_
pub fn display_value<'a>( &'a self, value: impl AsRef<ValueSlice> + 'a, ) -> impl Display + 'a
pub fn display_cell<'a>(&'a self, cell_id: CellId) -> impl Display + 'a
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Design
impl !RefUnwindSafe for Design
impl !Send for Design
impl !Sync for Design
impl !UnwindSafe for Design
impl Unpin for Design
impl UnsafeUnpin for Design
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