mirror of https://codeberg.org/topola/topola.git
dsn: add loading of assignments of pins to nets
This commit is contained in:
parent
bf7d89e7bd
commit
786953787f
|
|
@ -611,7 +611,12 @@ impl<'de, 'a> SeqAccess<'de> for StructFields<'a, 'de> {
|
|||
// TODO explain this part of empty option detection
|
||||
if let Some(lookahead) = self.de.next_name_lookahead() {
|
||||
if lookahead != self.fields[self.current_field] {
|
||||
if lookahead + "s" != self.fields[self.current_field] {
|
||||
self.de.next_option_empty_hint = true;
|
||||
}
|
||||
else {
|
||||
self.de.next_option_empty_hint = false;
|
||||
}
|
||||
} else {
|
||||
self.de.next_option_empty_hint = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,9 +171,24 @@ pub struct Attach(pub bool);
|
|||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename = "network")]
|
||||
pub struct Network {
|
||||
pub nets: Option<Vec<NetPinAssignments>>,
|
||||
pub classes: Vec<Class>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename = "net")]
|
||||
// dsn names this "net", but it's a structure unrelated to "net" in wiring or elsewhere
|
||||
pub struct NetPinAssignments {
|
||||
pub net: String,
|
||||
pub pins: Vec<Pins>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename = "pins")]
|
||||
pub struct Pins {
|
||||
pub ids: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(rename = "class")]
|
||||
pub struct Class {
|
||||
|
|
|
|||
Loading…
Reference in New Issue