cjdrake / seqlogic

Sequential Logic
1 stars 0 forks source link

Automate adding model coroutines to simulator #9

Closed cjdrake closed 7 months ago

cjdrake commented 8 months ago

Latest implementation is adding coroutines to the simulator manually. It looks something like this:

for node in top.iter_bfs():
    # TODO(cjdrake): Get rid of isinstance
    if isinstance(node, Module):
        for proc, r in node.procs:
            loop.add_proc(proc, Region(r))

Not quite sure what the correct API decision is, but this is a kludge.