add debug prints to c logic
This commit is contained in:
parent
a2df8dbf96
commit
4bd4283929
@ -74,10 +74,11 @@ FAST void sim_dequeue_gate(const int i) {
|
|||||||
(*num_gate_queue)--;
|
(*num_gate_queue)--;
|
||||||
}
|
}
|
||||||
DLL void sim_update_gates() {
|
DLL void sim_update_gates() {
|
||||||
|
printf("gatequeue=%i\n", *num_gate_queue);
|
||||||
for(int i=0; i<*num_gate_queue; i++) {
|
for(int i=0; i<*num_gate_queue; i++) {
|
||||||
struct Gate* gate = gate_queue[i];
|
struct Gate* gate = gate_queue[i];
|
||||||
if(gate->logic_function != 0) {
|
if(gate->logic_function != 0) {
|
||||||
printf("gatelogic %i", gate->logic_function);
|
printf("gatelogic %i\n", gate->logic_function);
|
||||||
sim_dequeue_gate(i);
|
sim_dequeue_gate(i);
|
||||||
sim_logic_functions[gate->logic_function](gate);
|
sim_logic_functions[gate->logic_function](gate);
|
||||||
i--;
|
i--;
|
||||||
@ -129,7 +130,7 @@ FAST int sim_gate_get_port_falling(const struct Gate* const gate, const int port
|
|||||||
return (!*(gate->port_net_state[port])) && ((*(gate->port_nets_c[port]->update_tick) == *current_tick));
|
return (!*(gate->port_net_state[port])) && ((*(gate->port_nets_c[port]->update_tick) == *current_tick));
|
||||||
}
|
}
|
||||||
FAST void sim_gate_set_port(const struct Gate* const gate, const int port, const int state) {
|
FAST void sim_gate_set_port(const struct Gate* const gate, const int port, const int state) {
|
||||||
printf("setport %i=%i", port, state);
|
printf("setport %i=%i\n", port, state);
|
||||||
if(state != gate->port_states[port]) {
|
if(state != gate->port_states[port]) {
|
||||||
printf(" statediff\n");
|
printf(" statediff\n");
|
||||||
*(gate->port_net_state_num[port]) += state - gate->port_states[port];
|
*(gate->port_net_state_num[port]) += state - gate->port_states[port];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user