remove some error prints

This commit is contained in:
Redo0 2021-06-05 17:05:22 -05:00
parent 7157957d71
commit bdcf2b384a
4 changed files with 9 additions and 6 deletions

View File

@ -18,13 +18,13 @@ function Gate.addport(gate, port)
Port.setgate(port, gate)
end
-- Logic Critical
function Gate.getportstate(gate, index)
return gate.port_nets[index].state
end
-- Logic Critical
function Gate.setportstate(gate, index, state)
if type(state)~="number" then error("invalid state type - must be number (gate "..gate.objref..")") end
local port = gate.ports[index]
if state ~= port.state then
local group = port.group

View File

@ -170,8 +170,8 @@ function Group.mergeinto(group, group2)
Simulation.dequeuegroup(GSim, group)
end
-- Logic Critical
function Group.setstate(group, state)
if type(state)~="number" then error("group state type must be number") end
if state ~= group.state then
local sim = GSim

View File

@ -328,8 +328,8 @@ while 1 do
Simulation.tickinit(sim)
Simulation.tickinput(sim)
for i = 1, OPT_TICK_MULT, 100 do
local ticksthis = math.min(OPT_TICK_MULT-i+1, 100)
for i = 1, OPT_TICK_MULT, 97 do
local ticksthis = math.min(OPT_TICK_MULT-i+1, 97)
for j = 1, ticksthis do
Simulation.ticklogic(sim)
end

View File

@ -235,6 +235,7 @@ function Simulation.connectport(sim, port)
end
end
-- Logic Critical
function Simulation.queuegate(sim, gate)
if not gate.in_queue then
table.insert(sim.gatequeue, gate)
@ -260,6 +261,7 @@ function Simulation.queuegateinit(sim, gate)
sim.initqueue[gate] = gate
end
-- Logic Critical
function Simulation.queuegroup(sim, group)
if not group.in_queue then
table.insert(sim.groupqueue, group)
@ -294,6 +296,7 @@ function Simulation.queuecallback(sim, gate, ...)
sim.callbacks[gate.objref] = {...}
end
-- Logic Critical
function Simulation.ticklogic(sim)
for k, group in ipairs(sim.groupqueue) do
Group.update(group)
@ -309,7 +312,7 @@ function Simulation.ticklogic(sim)
end
for k, gate in ipairs(sim.gatequeue) do
Gate.logic(gate)
gate.logic(gate)
gate.in_queue = false
end
sim.gatequeue = {}