rename some variables and begin compiled sim c code

This commit is contained in:
Redo0
2021-05-25 21:23:51 -05:00
parent 09e65faec4
commit 968613a3fc
6 changed files with 25 additions and 45 deletions

View File

@@ -3,34 +3,7 @@ local ffi = FFI or require("ffi")
Simulation = Simulation or {}
ffi.cdef[[
struct Wire {
int objref;
int layer;
struct Net* group;
int bounds[6];
};
struct Port {
bool state;
char type;
struct Gate* gate;
struct Net* group;
};
struct Gate {
int logic_ref;
bool in_queue;
struct Port ports[?];
};
struct Net {
bool state;
bool in_queue;
int updatetick;
int state_num;
int num_gates_update;
struct Gate* gates_update[?];
};
]]
function Simulation.compile(sim)