forked from M-Labs/artiq
wrpll.thls: fix make
This commit is contained in:
parent
b44b870452
commit
f6f6045f1a
|
@ -283,7 +283,7 @@ class Scheduler:
|
||||||
|
|
||||||
# Instruction can be scheduled
|
# Instruction can be scheduled
|
||||||
|
|
||||||
self.remaining.remove(isn)
|
self.remaining.remove(isn)
|
||||||
|
|
||||||
for inp, minp in zip(isn.inputs, mapped_inputs):
|
for inp, minp in zip(isn.inputs, mapped_inputs):
|
||||||
can_free = inp < 0 and all(inp != rinp for risn in self.remaining for rinp in risn.inputs)
|
can_free = inp < 0 and all(inp != rinp for risn in self.remaining for rinp in risn.inputs)
|
||||||
|
@ -354,7 +354,7 @@ def compile(processor, function):
|
||||||
assert len(node.args.args) == 1
|
assert len(node.args.args) == 1
|
||||||
arg = node.args.args[0].arg
|
arg = node.args.args[0].arg
|
||||||
body = node.body
|
body = node.body
|
||||||
|
|
||||||
astcompiler = ASTCompiler()
|
astcompiler = ASTCompiler()
|
||||||
for node in body:
|
for node in body:
|
||||||
if isinstance(node, ast.Global):
|
if isinstance(node, ast.Global):
|
||||||
|
@ -591,7 +591,7 @@ class ProcessorImpl(Module):
|
||||||
|
|
||||||
def make(function, **kwargs):
|
def make(function, **kwargs):
|
||||||
proc = Processor(**kwargs)
|
proc = Processor(**kwargs)
|
||||||
cp = compile(proc, simple_test)
|
cp = compile(proc, function)
|
||||||
cp.dimension_processor()
|
cp.dimension_processor()
|
||||||
return proc.implement(cp.encode(), cp.data)
|
return proc.implement(cp.encode(), cp.data)
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ def foo(x):
|
||||||
c = b
|
c = b
|
||||||
b = a
|
b = a
|
||||||
a = x
|
a = x
|
||||||
return 4748*a + 259*b - 155*c
|
return 4748*a + 259*b - 155*c
|
||||||
|
|
||||||
|
|
||||||
def simple_test(x):
|
def simple_test(x):
|
||||||
|
|
Loading…
Reference in New Issue