Skip to content

Commit

Permalink
remove nondeterminism of router
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanku committed Jan 2, 2024
1 parent 6ccab18 commit 76d8396
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libs/atoll/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ tracing = "0.1"
num = "0.4.1"
serde = { version = "1.0.192", features = ["derive"] }
pathfinding = "4.8.0"
indexmap = "2"
7 changes: 4 additions & 3 deletions libs/atoll/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ use std::any::Any;
use std::collections::HashMap;
use std::ops::Deref;

use indexmap::IndexMap;
use std::sync::Arc;
use substrate::arcstr::ArcStr;
use substrate::block::Block;
Expand Down Expand Up @@ -443,7 +444,7 @@ impl<T: ExportsNestedData + ExportsLayoutData> Instance<T> {

/// A builder for ATOLL tiles.
pub struct TileBuilder<'a, PDK: Pdk + Schema> {
nodes: HashMap<Node, NodeInfo>,
nodes: IndexMap<Node, NodeInfo>,
connections: ena::unify::InPlaceUnificationTable<NodeKey>,
schematic: &'a mut schematic::CellBuilder<PDK>,
layout: &'a mut layout::CellBuilder<PDK>,
Expand Down Expand Up @@ -472,7 +473,7 @@ impl<'a, PDK: Pdk + Schema> TileBuilder<'a, PDK> {
schematic: &'a mut schematic::CellBuilder<PDK>,
layout: &'a mut layout::CellBuilder<PDK>,
) -> Self {
let mut nodes = HashMap::new();
let mut nodes = IndexMap::new();
let mut connections = ena::unify::InPlaceUnificationTable::new();
// todo: fix how layer is provided
let layer_stack = layout
Expand Down Expand Up @@ -749,7 +750,7 @@ where
let abs = InstanceAbstract::merge(cell.abs, cell.top_layer);

if let Some(router) = cell.router {
let mut to_connect = HashMap::new();
let mut to_connect = IndexMap::new();
for (_, info) in cell.nodes {
to_connect
.entry(cell.connections.find(info.key))
Expand Down

0 comments on commit 76d8396

Please sign in to comment.