diff --git a/sim/gate.lua b/sim/gate.lua index 5b11b8a..25d7821 100644 --- a/sim/gate.lua +++ b/sim/gate.lua @@ -5,6 +5,7 @@ Gate = {} function Gate.new(objref, definition) local o = { + -- Logic Critical in_queue = 0, logic = definition.logic, ports = {}, diff --git a/sim/group.lua b/sim/group.lua index e7c9c99..417c387 100644 --- a/sim/group.lua +++ b/sim/group.lua @@ -5,6 +5,7 @@ Group = {} function Group.new() local o = { + -- Logic Critical state = 0, state_num = 0, in_queue = 0, @@ -193,6 +194,7 @@ function Group.setstate(group, state) end end +-- Logic Critical function Group.update(group) Group.setstate(group, group.state_num>0 and 1 or 0) end diff --git a/sim/port.lua b/sim/port.lua index 59a724d..305c80a 100644 --- a/sim/port.lua +++ b/sim/port.lua @@ -20,7 +20,6 @@ Port = {} function Port.new(type, direction, position, causeupdate, idx, gate) local o = { group = nil, - type = type, direction = direction, position = position,