Sorry for disturbing you here. I am quite interested in this project, and when I reproduce the pipesynth project by running main.py vscale reads path, the output of ./benchmark is as follows:
Seemingly the pipesynth fail to synthesize the expected axiom. It would be much appreciated if any guidance could be provided.
I have made some attempts to figure out the underlying reason for the failure of pipesynth in this case. I debugged the project and observed that the grammer of edge_conjuncts in path_axiom of synth.py do not include the edge_exists (decode_execute i) (writeback i) and edge_exists (fetch i) (decode_execute i) template... Therefore, it fails to synthesize the reads axiom:
Axiom "Reads":
forall microops "i",
OnCore c i =>
IsAnyRead i =>
AddEdges [((i, (c, Fetch)), (i, (c, DecodeExecute)), "path");
((i, (c, DecodeExecute)), (i, (c, Writeback)), "path")].
I modified the synth.py file as follows:
(pipesynth) apr@apr:~/tools/PipeSynth-AEC$ git diff synth.py
diff --git a/synth.py b/synth.py
index 6f109df..55f103d 100644
--- a/synth.py
+++ b/synth.py
@@ -94,12 +94,12 @@ def conjunct(f, microop_t, arity, name):
if arity == 1:
def grammar(i: microop_t) -> bool:
def non_terminals(b: bool):
- return {b: [True] + [ff(i) for ff in f]}
+ return {b: [ff(i) for ff in f]}
return non_terminals
if arity == 2:
def grammar(i: microop_t, j: microop_t) -> bool:
def non_terminals(b: bool):
- return {b: [True] + [ff(i, j) for ff in f]}
+ return {b: [ff(i, j) for ff in f]}
return non_terminals
if arity == 3:
def grammar(i: microop_t, j: microop_t, k: microop_t) -> bool:
@@ -126,7 +126,7 @@ def edge_conjuncts(microop_t, allowed_edges, name, negated=False, unary=False):
{(lambda n, m: lambda i, j: ~add_edge(n(i), m(j)))(n, m), (lambda n, m: lambda i, j: ~add_edge(n(j), m(i
)))(n, m), (lambda n, m: lambda i, j: add_edge(n(i), m(j)))(n, m), (lambda n, m: lambda i, j: add_edge(n(j), m(i)))(n, m)}for n
, m in allowed_edges]]
else:
conjuncts = [conjunct(f, microop_t, 2, name) for f in
- [{(lambda n, m: lambda i, j: add_edge(n(i), m(j)))(n, m)}
+ [{(lambda n, m: lambda i, j: add_edge(n(i), m(j)))(n, m), (lambda n, m: lambda i, j: add_edge(n(i), m(i)))(n, m), (lambda n, m: lambda i, j: add_edge(n(j), m(j)))(n, m)}
if unary else {(lambda n, m: lambda i, j: add_edge(n(i), m(j)))(n, m), (lambda n, m: lambda i, j: add_edge(n(j), m(i)))(n, m)} for n, m in allowed_edges]]
return lambda a, b: forall(conjuncts, lambda i: i(a, b))
Hi,
Sorry for disturbing you here. I am quite interested in this project, and when I reproduce the pipesynth project by running
main.py vscale reads path
, the output of./benchmark
is as follows:Seemingly the pipesynth fail to synthesize the expected axiom. It would be much appreciated if any guidance could be provided.
I have made some attempts to figure out the underlying reason for the failure of pipesynth in this case. I debugged the project and observed that the grammer of
edge_conjuncts
inpath_axiom
ofsynth.py
do not include theedge_exists (decode_execute i) (writeback i)
andedge_exists (fetch i) (decode_execute i)
template... Therefore, it fails to synthesize thereads
axiom:I modified the
synth.py
file as follows:and the output turns into:
which is more similar to the
reads
axiom.Please kindly advise. Many thanks and wish you a great week.
Yours sincerely,
Deheng