make net states pointers

This commit is contained in:
Redo
2022-11-04 15:39:08 -06:00
parent 20b05812df
commit 9e0c196b63
6 changed files with 25 additions and 22 deletions

View File

@@ -27,11 +27,10 @@ end
function Gate.setportstate(gate, index, state)
if state ~= gate.port_states[index] then
local group = gate.port_nets[index]
-- local net_state_num = gate.port_net_state_nums[index]
group.state_num = group.state_num - gate.port_states[index] + state
group.state_num[0] = group.state_num[0] - gate.port_states[index] + state
gate.port_states[index] = state
if ((group.state_num>0) ~= (group.state==1)) and (group.in_queue[0]==0) then
if ((group.state_num[0]>0) ~= (group.state[0]==1)) and (group.in_queue[0]==0) then
Simulation.queuegroup(GSim, group)
end
end