rename some variables and begin compiled sim c code
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user