ext/bridge.c in origen_sim-0.13.0 vs ext/bridge.c in origen_sim-0.14.0
- old
+ new
@@ -220,11 +220,11 @@
(*wave).active_pin_count += 1;
}
static void bridge_disable_drive_wave(Pin * pin) {
- Wave *wave = &compare_waves[(*pin).drive_wave];
+ Wave *wave = &drive_waves[(*pin).drive_wave];
if ((*wave).active_pin_count == 0) {
vpi_printf("Wanted to disable drive on pin %i, but its drive wave has no active pins!\n", (*pin).index);
end_simulation();
}
@@ -350,10 +350,12 @@
// If it is already comparing the wave will already be setup
if ((*pin).previous_state != 2) {
bridge_enable_compare_wave(pin);
if ((*pin).previous_state == 1) {
- bridge_disable_drive_wave(pin);
+ if (!bridge_is_drive_whole_cycle(pin)) {
+ bridge_disable_drive_wave(pin);
+ }
}
(*pin).previous_state = 2;
}
}
}