Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions substrate/src/layout/routing/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,29 @@ impl GreedyRouter {
self.inner.block_span(span);
}

/// Makes `rect`'s grid points unavailable to every net except `net`.
///
/// Unlike [`Self::occupy`], this asserts no metal: the points do not join the
/// net's connectivity and nothing may be routed to them. It is for grid points
/// that a net's metal lies too close to for anything else to use legally, but
/// which that net's own metal does not cover.
///
/// Blocking a point that two different nets both claim leaves it blocked for
/// neither, which is the desired outcome - no net can route there without
/// violating spacing against one of them. Points that are already occupied are
/// left alone, as with [`Self::block`].
pub fn block_for_net(
&mut self,
layer: LayerKey,
rect: Rect,
net: &str,
) -> crate::error::Result<()> {
let net = self.get_net(net);
let span = self.expand_to_pos_span(layer, rect);
self.inner.block_span_for_net(span, net);
Ok(())
}

pub fn occupy(&mut self, layer: LayerKey, rect: Rect, net: &str) -> crate::error::Result<()> {
let net = self.get_net(net);
let span = self.expand_to_pos_span(layer, rect);
Expand Down
Loading