-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The API has no way to differentiate between the two behaviors, making it hard to insert gates in place.
See
Lines 82 to 96 in 5561f90
| fn test_replace2() { | |
| let netlist = get_simple_example(); | |
| let input = netlist.inputs().next().unwrap(); | |
| let inverter = Gate::new_logical("INV".into(), vec!["I".into()], "O".into()); | |
| let inverted = netlist | |
| .insert_gate_disconnected(inverter, "inst_0".into()) | |
| .unwrap(); | |
| // This errors, because input is not safe to delete. No replace is done. | |
| assert!( | |
| netlist | |
| .replace_net_uses(input.clone().unwrap(), &inverted) | |
| .is_err() | |
| ); | |
| inverted.find_input(&"I".into()).unwrap().connect(input); | |
| assert_verilog_eq!( |
Metadata
Metadata
Assignees
Labels
No labels