mirror of https://codeberg.org/topola/topola.git
dsn,layout: store layer in weights
This commit is contained in:
parent
d8e128e81a
commit
45593c9e7a
20
src/draw.rs
20
src/draw.rs
|
|
@ -7,7 +7,7 @@ use crate::{
|
||||||
layout::{
|
layout::{
|
||||||
bend::{BendIndex, LooseBendWeight},
|
bend::{BendIndex, LooseBendWeight},
|
||||||
dot::{DotIndex, FixedDotIndex, LooseDotIndex, LooseDotWeight},
|
dot::{DotIndex, FixedDotIndex, LooseDotIndex, LooseDotWeight},
|
||||||
graph::{GetNet, MakePrimitive},
|
graph::{GetLayer, GetNet, MakePrimitive},
|
||||||
guide::{Guide, Head, HeadTrait, SegbendHead},
|
guide::{Guide, Head, HeadTrait, SegbendHead},
|
||||||
primitive::GetOtherJoint,
|
primitive::GetOtherJoint,
|
||||||
rules::RulesTrait,
|
rules::RulesTrait,
|
||||||
|
|
@ -58,17 +58,18 @@ impl<'a, R: RulesTrait> Draw<'a, R> {
|
||||||
let head = self
|
let head = self
|
||||||
.extend_head(head, tangent.start_point())
|
.extend_head(head, tangent.start_point())
|
||||||
.map_err(|err| DrawException::CannotFinishIn(into, err.into()))?;
|
.map_err(|err| DrawException::CannotFinishIn(into, err.into()))?;
|
||||||
|
let layer = head.face().primitive(self.board.layout()).layer();
|
||||||
let net = head.face().primitive(self.board.layout()).net();
|
let net = head.face().primitive(self.board.layout()).net();
|
||||||
|
|
||||||
match head.face() {
|
match head.face() {
|
||||||
DotIndex::Fixed(dot) => {
|
DotIndex::Fixed(dot) => {
|
||||||
self.board
|
self.board
|
||||||
.add_lone_loose_seg(dot, into.into(), LoneLooseSegWeight { net, width })
|
.add_lone_loose_seg(dot, into.into(), LoneLooseSegWeight { width, layer, net })
|
||||||
.map_err(|err| DrawException::CannotFinishIn(into, err.into()))?;
|
.map_err(|err| DrawException::CannotFinishIn(into, err.into()))?;
|
||||||
}
|
}
|
||||||
DotIndex::Loose(dot) => {
|
DotIndex::Loose(dot) => {
|
||||||
self.board
|
self.board
|
||||||
.add_seq_loose_seg(into.into(), dot, SeqLooseSegWeight { net, width })
|
.add_seq_loose_seg(into.into(), dot, SeqLooseSegWeight { width, layer, net })
|
||||||
.map_err(|err| DrawException::CannotFinishIn(into, err.into()))?;
|
.map_err(|err| DrawException::CannotFinishIn(into, err.into()))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -202,19 +203,26 @@ impl<'a, R: RulesTrait> Draw<'a, R> {
|
||||||
width: f64,
|
width: f64,
|
||||||
offset: f64,
|
offset: f64,
|
||||||
) -> Result<SegbendHead, LayoutException> {
|
) -> Result<SegbendHead, LayoutException> {
|
||||||
|
let layer = head.face().primitive(self.board.layout()).layer();
|
||||||
let net = head.face().primitive(self.board.layout()).net();
|
let net = head.face().primitive(self.board.layout()).net();
|
||||||
let segbend = self.board.insert_segbend(
|
let segbend = self.board.insert_segbend(
|
||||||
head.face(),
|
head.face(),
|
||||||
around,
|
around,
|
||||||
LooseDotWeight {
|
LooseDotWeight {
|
||||||
net,
|
|
||||||
circle: Circle {
|
circle: Circle {
|
||||||
pos: to,
|
pos: to,
|
||||||
r: width / 2.0,
|
r: width / 2.0,
|
||||||
},
|
},
|
||||||
|
layer,
|
||||||
|
net,
|
||||||
|
},
|
||||||
|
SeqLooseSegWeight { width, layer, net },
|
||||||
|
LooseBendWeight {
|
||||||
|
width,
|
||||||
|
offset,
|
||||||
|
layer,
|
||||||
|
net,
|
||||||
},
|
},
|
||||||
SeqLooseSegWeight { net, width },
|
|
||||||
LooseBendWeight { net, width, offset },
|
|
||||||
cw,
|
cw,
|
||||||
)?;
|
)?;
|
||||||
Ok::<SegbendHead, LayoutException>(SegbendHead {
|
Ok::<SegbendHead, LayoutException>(SegbendHead {
|
||||||
|
|
|
||||||
|
|
@ -85,75 +85,73 @@ impl DsnDesign {
|
||||||
.find(|padstack| padstack.name == pin.name)
|
.find(|padstack| padstack.name == pin.name)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// no layer support yet, pick the first one
|
for (layer, shape) in padstack.shape_vec.iter().enumerate() {
|
||||||
match &padstack.shape_vec[0] {
|
match shape {
|
||||||
Shape::Circle(circle) => {
|
Shape::Circle(circle) => {
|
||||||
let circle = Circle {
|
let circle = Circle {
|
||||||
pos: ((place.x + pin.x) as f64, -(place.y + pin.y) as f64).into(),
|
pos: ((place.x + pin.x) as f64, -(place.y + pin.y) as f64)
|
||||||
r: circle.diameter as f64 / 2.0,
|
.into(),
|
||||||
};
|
r: circle.diameter as f64 / 2.0,
|
||||||
|
};
|
||||||
|
|
||||||
layout
|
layout
|
||||||
.add_fixed_dot(FixedDotWeight {
|
.add_fixed_dot(FixedDotWeight {
|
||||||
net: *net_id as i64,
|
circle,
|
||||||
circle,
|
layer: layer as u64,
|
||||||
})
|
net: *net_id as i64,
|
||||||
.unwrap();
|
})
|
||||||
}
|
.unwrap();
|
||||||
Shape::Rect(_) => (),
|
}
|
||||||
Shape::Path(_) => (),
|
Shape::Rect(_) => (),
|
||||||
Shape::Polygon(_) => (),
|
Shape::Path(_) => (),
|
||||||
};
|
Shape::Polygon(_) => (),
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add vias to layout and save indices of dots in the order they appear in the file
|
for via in &self.pcb.wiring.via_vec {
|
||||||
let _dot_indices: Vec<_> = self
|
let net_id = *layout.rules().net_ids.get(&via.net).unwrap();
|
||||||
.pcb
|
|
||||||
.wiring
|
|
||||||
.via_vec
|
|
||||||
.iter()
|
|
||||||
.map(|via| {
|
|
||||||
let net_id = layout.rules().net_ids.get(&via.net).unwrap();
|
|
||||||
|
|
||||||
// find the padstack referenced by this via placement
|
// find the padstack referenced by this via placement
|
||||||
let padstack = &self
|
let padstack = &self
|
||||||
.pcb
|
.pcb
|
||||||
.library
|
.library
|
||||||
.padstack_vec
|
.padstack_vec
|
||||||
.iter()
|
.iter()
|
||||||
.find(|padstack| padstack.name == via.name)
|
.find(|padstack| padstack.name == via.name)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// no layer support yet, pick the first one
|
// no layer support yet, pick the first one
|
||||||
let circle = match &padstack.shape_vec[0] {
|
for shape in &padstack.shape_vec {
|
||||||
|
let circle = match shape {
|
||||||
Shape::Circle(circle) => circle,
|
Shape::Circle(circle) => circle,
|
||||||
Shape::Rect(_) => todo!(),
|
Shape::Rect(_) => todo!(),
|
||||||
Shape::Path(_) => todo!(),
|
Shape::Path(_) => todo!(),
|
||||||
Shape::Polygon(_) => todo!(),
|
Shape::Polygon(_) => todo!(),
|
||||||
};
|
};
|
||||||
|
let layer_id = *layout.rules().layer_ids.get(&circle.layer).unwrap();
|
||||||
let circle = Circle {
|
let circle = Circle {
|
||||||
pos: (via.x as f64, -via.y as f64).into(),
|
pos: (via.x as f64, -via.y as f64).into(),
|
||||||
r: circle.diameter as f64 / 2.0,
|
r: circle.diameter as f64 / 2.0,
|
||||||
};
|
};
|
||||||
|
|
||||||
layout
|
layout.add_fixed_dot(FixedDotWeight {
|
||||||
.add_fixed_dot(FixedDotWeight {
|
circle,
|
||||||
net: *net_id as i64,
|
layer: layer_id as u64,
|
||||||
circle,
|
net: net_id as i64,
|
||||||
})
|
});
|
||||||
.unwrap()
|
}
|
||||||
})
|
}
|
||||||
.collect();
|
|
||||||
|
|
||||||
for wire in self.pcb.wiring.wire_vec.iter() {
|
for wire in self.pcb.wiring.wire_vec.iter() {
|
||||||
|
let layer_id = *layout.rules().layer_ids.get(&wire.path.layer).unwrap();
|
||||||
let net_id = *layout.rules().net_ids.get(&wire.net).unwrap();
|
let net_id = *layout.rules().net_ids.get(&wire.net).unwrap();
|
||||||
|
|
||||||
// add the first coordinate in the wire path as a dot and save its index
|
// add the first coordinate in the wire path as a dot and save its index
|
||||||
let mut prev_index = layout
|
let mut prev_index = layout
|
||||||
.add_fixed_dot(FixedDotWeight {
|
.add_fixed_dot(FixedDotWeight {
|
||||||
net: net_id as i64,
|
|
||||||
circle: Circle {
|
circle: Circle {
|
||||||
pos: (
|
pos: (
|
||||||
wire.path.coord_vec[0].x as f64,
|
wire.path.coord_vec[0].x as f64,
|
||||||
|
|
@ -162,6 +160,8 @@ impl DsnDesign {
|
||||||
.into(),
|
.into(),
|
||||||
r: wire.path.width as f64 / 2.0,
|
r: wire.path.width as f64 / 2.0,
|
||||||
},
|
},
|
||||||
|
layer: layer_id as u64,
|
||||||
|
net: net_id as i64,
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
@ -169,11 +169,12 @@ impl DsnDesign {
|
||||||
for coord in wire.path.coord_vec.iter().skip(1) {
|
for coord in wire.path.coord_vec.iter().skip(1) {
|
||||||
let index = layout
|
let index = layout
|
||||||
.add_fixed_dot(FixedDotWeight {
|
.add_fixed_dot(FixedDotWeight {
|
||||||
net: net_id as i64,
|
|
||||||
circle: Circle {
|
circle: Circle {
|
||||||
pos: (coord.x as f64, -coord.y as f64).into(),
|
pos: (coord.x as f64, -coord.y as f64).into(),
|
||||||
r: wire.path.width as f64 / 2.0,
|
r: wire.path.width as f64 / 2.0,
|
||||||
},
|
},
|
||||||
|
layer: layer_id as u64,
|
||||||
|
net: net_id as i64,
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
@ -183,8 +184,9 @@ impl DsnDesign {
|
||||||
prev_index,
|
prev_index,
|
||||||
index,
|
index,
|
||||||
FixedSegWeight {
|
FixedSegWeight {
|
||||||
net: net_id as i64,
|
|
||||||
width: wire.path.width as f64,
|
width: wire.path.width as f64,
|
||||||
|
layer: layer_id as u64,
|
||||||
|
net: net_id as i64,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ pub struct DsnRules {
|
||||||
// net class name -> rule
|
// net class name -> rule
|
||||||
class_rules: HashMap<String, DsnRule>,
|
class_rules: HashMap<String, DsnRule>,
|
||||||
|
|
||||||
|
// layer names -> layer IDs for Layout
|
||||||
|
pub layer_ids: HashMap<String, u64>,
|
||||||
// net names -> net IDs for Layout
|
// net names -> net IDs for Layout
|
||||||
pub net_ids: HashMap<String, i64>,
|
pub net_ids: HashMap<String, i64>,
|
||||||
// net ID -> net class
|
// net ID -> net class
|
||||||
|
|
@ -33,6 +35,13 @@ pub struct DsnRules {
|
||||||
|
|
||||||
impl DsnRules {
|
impl DsnRules {
|
||||||
pub fn from_pcb(pcb: &Pcb) -> Self {
|
pub fn from_pcb(pcb: &Pcb) -> Self {
|
||||||
|
let layer_ids = HashMap::from_iter(
|
||||||
|
pcb.structure
|
||||||
|
.layer_vec
|
||||||
|
.iter()
|
||||||
|
.map(|layer| (layer.name.clone(), layer.property.index as u64)),
|
||||||
|
);
|
||||||
|
|
||||||
// keeping this as a separate iter pass because it might be moved into a different struct later?
|
// keeping this as a separate iter pass because it might be moved into a different struct later?
|
||||||
let net_ids = HashMap::from_iter(
|
let net_ids = HashMap::from_iter(
|
||||||
pcb.network
|
pcb.network
|
||||||
|
|
@ -60,6 +69,7 @@ impl DsnRules {
|
||||||
Self {
|
Self {
|
||||||
structure_rule: DsnRule::from_dsn(&pcb.structure.rule),
|
structure_rule: DsnRule::from_dsn(&pcb.structure.rule),
|
||||||
class_rules,
|
class_rules,
|
||||||
|
layer_ids,
|
||||||
net_ids,
|
net_ids,
|
||||||
net_id_classes,
|
net_id_classes,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use crate::{
|
||||||
geometry::{BendWeightTrait, GetOffset, GetWidth, SetOffset},
|
geometry::{BendWeightTrait, GetOffset, GetWidth, SetOffset},
|
||||||
graph::{GenericIndex, GetNodeIndex},
|
graph::{GenericIndex, GetNodeIndex},
|
||||||
layout::{
|
layout::{
|
||||||
graph::{GeometryIndex, GeometryWeight, GetNet, MakePrimitive, Retag},
|
graph::{GeometryIndex, GeometryWeight, GetLayer, GetNet, MakePrimitive, Retag},
|
||||||
primitive::{GenericPrimitive, Primitive},
|
primitive::{GenericPrimitive, Primitive},
|
||||||
rules::RulesTrait,
|
rules::RulesTrait,
|
||||||
Layout,
|
Layout,
|
||||||
|
|
@ -73,9 +73,10 @@ impl BendWeightTrait<GeometryWeight> for BendWeight {}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct FixedBendWeight {
|
pub struct FixedBendWeight {
|
||||||
pub net: i64,
|
|
||||||
pub width: f64,
|
pub width: f64,
|
||||||
pub offset: f64,
|
pub offset: f64,
|
||||||
|
pub layer: u64,
|
||||||
|
pub net: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_fixed_weight!(FixedBendWeight, FixedBend, FixedBendIndex);
|
impl_fixed_weight!(FixedBendWeight, FixedBend, FixedBendIndex);
|
||||||
|
|
@ -101,9 +102,10 @@ impl GetWidth for FixedBendWeight {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct LooseBendWeight {
|
pub struct LooseBendWeight {
|
||||||
pub net: i64,
|
|
||||||
pub width: f64,
|
pub width: f64,
|
||||||
pub offset: f64,
|
pub offset: f64,
|
||||||
|
pub layer: u64,
|
||||||
|
pub net: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GetOffset for LooseBendWeight {
|
impl GetOffset for LooseBendWeight {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ use crate::{
|
||||||
geometry::{DotWeightTrait, GetPos, GetWidth, SetPos},
|
geometry::{DotWeightTrait, GetPos, GetWidth, SetPos},
|
||||||
graph::{GenericIndex, GetNodeIndex},
|
graph::{GenericIndex, GetNodeIndex},
|
||||||
layout::{
|
layout::{
|
||||||
graph::{GeometryIndex, GeometryWeight, GetNet, MakePrimitive, Retag},
|
graph::{GeometryIndex, GeometryWeight, GetLayer, GetNet, MakePrimitive, Retag},
|
||||||
primitive::{GenericPrimitive, Primitive},
|
primitive::{GenericPrimitive, Primitive},
|
||||||
rules::RulesTrait,
|
rules::RulesTrait,
|
||||||
Layout,
|
Layout,
|
||||||
|
|
@ -75,8 +75,9 @@ impl DotWeightTrait<GeometryWeight> for DotWeight {}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct FixedDotWeight {
|
pub struct FixedDotWeight {
|
||||||
pub net: i64,
|
|
||||||
pub circle: Circle,
|
pub circle: Circle,
|
||||||
|
pub layer: u64,
|
||||||
|
pub net: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_fixed_weight!(FixedDotWeight, FixedDot, FixedDotIndex);
|
impl_fixed_weight!(FixedDotWeight, FixedDot, FixedDotIndex);
|
||||||
|
|
@ -102,8 +103,9 @@ impl GetWidth for FixedDotWeight {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct LooseDotWeight {
|
pub struct LooseDotWeight {
|
||||||
pub net: i64,
|
|
||||||
pub circle: Circle,
|
pub circle: Circle,
|
||||||
|
pub layer: u64,
|
||||||
|
pub net: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_loose_weight!(LooseDotWeight, LooseDot, LooseDotIndex);
|
impl_loose_weight!(LooseDotWeight, LooseDot, LooseDotIndex);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,11 @@ pub trait Retag<GeometryIndex> {
|
||||||
fn retag(&self, index: NodeIndex<usize>) -> GeometryIndex;
|
fn retag(&self, index: NodeIndex<usize>) -> GeometryIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[enum_dispatch]
|
||||||
|
pub trait GetLayer {
|
||||||
|
fn layer(&self) -> u64;
|
||||||
|
}
|
||||||
|
|
||||||
#[enum_dispatch]
|
#[enum_dispatch]
|
||||||
pub trait GetNet {
|
pub trait GetNet {
|
||||||
fn net(&self) -> i64;
|
fn net(&self) -> i64;
|
||||||
|
|
@ -42,6 +47,12 @@ macro_rules! impl_weight {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> GetLayer for $weight_struct {
|
||||||
|
fn layer(&self) -> u64 {
|
||||||
|
self.layer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a> GetNet for $weight_struct {
|
impl<'a> GetNet for $weight_struct {
|
||||||
fn net(&self) -> i64 {
|
fn net(&self) -> i64 {
|
||||||
self.net
|
self.net
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ use crate::geometry::{
|
||||||
use crate::graph::{GenericIndex, GetNodeIndex};
|
use crate::graph::{GenericIndex, GetNodeIndex};
|
||||||
use crate::layout::{
|
use crate::layout::{
|
||||||
bend::{BendIndex, FixedBendWeight, LooseBendIndex, LooseBendWeight},
|
bend::{BendIndex, FixedBendWeight, LooseBendIndex, LooseBendWeight},
|
||||||
dot::DotWeight,
|
dot::{DotIndex, DotWeight, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
||||||
dot::{DotIndex, FixedDotIndex, FixedDotWeight, LooseDotIndex, LooseDotWeight},
|
graph::{GeometryIndex, GeometryWeight, GetLayer, GetNet, Retag},
|
||||||
graph::{GeometryIndex, GeometryWeight, Retag},
|
|
||||||
loose::LooseIndex,
|
loose::LooseIndex,
|
||||||
|
rules::{Conditions, GetConditions, RulesTrait},
|
||||||
seg::{
|
seg::{
|
||||||
FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SegIndex, SeqLooseSegIndex,
|
FixedSegWeight, LoneLooseSegIndex, LoneLooseSegWeight, SegIndex, SeqLooseSegIndex,
|
||||||
SeqLooseSegWeight,
|
SeqLooseSegWeight,
|
||||||
|
|
@ -20,9 +20,6 @@ use crate::layout::{
|
||||||
Layout,
|
Layout,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::graph::GetNet;
|
|
||||||
use super::rules::{Conditions, GetConditions, RulesTrait};
|
|
||||||
|
|
||||||
#[enum_dispatch]
|
#[enum_dispatch]
|
||||||
pub trait GetLayout<'a, R: RulesTrait> {
|
pub trait GetLayout<'a, R: RulesTrait> {
|
||||||
fn layout(&self) -> &Layout<R>;
|
fn layout(&self) -> &Layout<R>;
|
||||||
|
|
@ -127,6 +124,12 @@ macro_rules! impl_primitive {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a, R: RulesTrait> GetLayer for $primitive_struct<'a, R> {
|
||||||
|
fn layer(&self) -> u64 {
|
||||||
|
self.weight().layer()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'a, R: RulesTrait> GetNet for $primitive_struct<'a, R> {
|
impl<'a, R: RulesTrait> GetNet for $primitive_struct<'a, R> {
|
||||||
fn net(&self) -> i64 {
|
fn net(&self) -> i64 {
|
||||||
self.weight().net()
|
self.weight().net()
|
||||||
|
|
@ -147,7 +150,15 @@ macro_rules! impl_loose_primitive {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[enum_dispatch(GetNet, GetWidth, GetLayout, MakeShape, GetLimbs, GetConditions)]
|
#[enum_dispatch(
|
||||||
|
GetLayer,
|
||||||
|
GetNet,
|
||||||
|
GetWidth,
|
||||||
|
GetLayout,
|
||||||
|
MakeShape,
|
||||||
|
GetLimbs,
|
||||||
|
GetConditions
|
||||||
|
)]
|
||||||
pub enum Primitive<'a, R: RulesTrait> {
|
pub enum Primitive<'a, R: RulesTrait> {
|
||||||
FixedDot(FixedDot<'a, R>),
|
FixedDot(FixedDot<'a, R>),
|
||||||
LooseDot(LooseDot<'a, R>),
|
LooseDot(LooseDot<'a, R>),
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use crate::{
|
||||||
geometry::{GetWidth, SegWeightTrait},
|
geometry::{GetWidth, SegWeightTrait},
|
||||||
graph::{GenericIndex, GetNodeIndex},
|
graph::{GenericIndex, GetNodeIndex},
|
||||||
layout::{
|
layout::{
|
||||||
graph::{GeometryIndex, GeometryWeight, GetNet, MakePrimitive, Retag},
|
graph::{GeometryIndex, GeometryWeight, GetLayer, GetNet, MakePrimitive, Retag},
|
||||||
primitive::{GenericPrimitive, Primitive},
|
primitive::{GenericPrimitive, Primitive},
|
||||||
rules::RulesTrait,
|
rules::RulesTrait,
|
||||||
Layout,
|
Layout,
|
||||||
|
|
@ -79,8 +79,9 @@ impl SegWeightTrait<GeometryWeight> for SegWeight {}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct FixedSegWeight {
|
pub struct FixedSegWeight {
|
||||||
pub net: i64,
|
|
||||||
pub width: f64,
|
pub width: f64,
|
||||||
|
pub layer: u64,
|
||||||
|
pub net: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_fixed_weight!(FixedSegWeight, FixedSeg, FixedSegIndex);
|
impl_fixed_weight!(FixedSegWeight, FixedSeg, FixedSegIndex);
|
||||||
|
|
@ -94,8 +95,9 @@ impl GetWidth for FixedSegWeight {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct LoneLooseSegWeight {
|
pub struct LoneLooseSegWeight {
|
||||||
pub net: i64,
|
|
||||||
pub width: f64,
|
pub width: f64,
|
||||||
|
pub layer: u64,
|
||||||
|
pub net: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_loose_weight!(LoneLooseSegWeight, LoneLooseSeg, LoneLooseSegIndex);
|
impl_loose_weight!(LoneLooseSegWeight, LoneLooseSeg, LoneLooseSegIndex);
|
||||||
|
|
@ -109,8 +111,9 @@ impl GetWidth for LoneLooseSegWeight {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub struct SeqLooseSegWeight {
|
pub struct SeqLooseSegWeight {
|
||||||
pub net: i64,
|
|
||||||
pub width: f64,
|
pub width: f64,
|
||||||
|
pub layer: u64,
|
||||||
|
pub net: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_loose_weight!(SeqLooseSegWeight, SeqLooseSeg, SeqLooseSegIndex);
|
impl_loose_weight!(SeqLooseSegWeight, SeqLooseSeg, SeqLooseSegIndex);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue