Struct libreda_pnr::util::buffer_removal::BufferRemover
source · pub struct BufferRemover {
non_inverting_buffer_cells: HashSet<String>,
inverting_buffer_cells: HashSet<String>,
}Expand description
Buffer removal engine. Removes non-inverting buffers and inverting buffers.
Buffer cells are identified by name. The names must be specified manually using add_non_inverting_buffer() and add_inverting_buffer().
Fields§
§non_inverting_buffer_cells: HashSet<String>§inverting_buffer_cells: HashSet<String>Implementations§
source§impl BufferRemover
impl BufferRemover
sourcepub fn register_non_inverting_buffer(&mut self, name: String)
pub fn register_non_inverting_buffer(&mut self, name: String)
Register the name of a non-inverting buffer cell.
sourcepub fn register_inverting_buffer(&mut self, name: String)
pub fn register_inverting_buffer(&mut self, name: String)
Register the name of a inverting buffer cell.
sourcefn get_valid_buffer_cells_by_names<N>(
&self,
netlist: &N,
names: &HashSet<String>
) -> HashMap<N::CellId, (N::PinId, N::PinId)>where
N: NetlistBase,
fn get_valid_buffer_cells_by_names<N>( &self, netlist: &N, names: &HashSet<String> ) -> HashMap<N::CellId, (N::PinId, N::PinId)>where N: NetlistBase,
Find buffer cells by their name. Take only cells which have exactly one input and one output. Return a hashmap with cell IDs as keys and (input pin, output pin) pairs as values.
sourcepub fn remove_non_inverting_buffers<N>(
&self,
netlist: &mut N,
top: &N::CellId
) -> usizewhere
N: NetlistEdit,
pub fn remove_non_inverting_buffers<N>( &self, netlist: &mut N, top: &N::CellId ) -> usizewhere N: NetlistEdit,
Remove all the non-inverting buffers from the top circuit.
They are found by the name which is specified using .add_non_inverting_buffer().
Return the number of removed buffer instances.
sourcefn remove_non_inverting_buffer<N>(
&self,
netlist: &mut N,
buffer_instance: &N::CellInstId,
input_pin: &N::PinId,
output_pin: &N::PinId
)where
N: NetlistEdit,
fn remove_non_inverting_buffer<N>( &self, netlist: &mut N, buffer_instance: &N::CellInstId, input_pin: &N::PinId, output_pin: &N::PinId )where N: NetlistEdit,
Remove a non-inverting buffer cell and merge the nets at the input and output.