Open xphoniex opened 3 years ago
So inside tcsh
running:
> /usr/local/share/qflow/bin/yosys -s mkCPU.ys
.
.
.
.
.
Note: Assuming pure combinatorial block at mkMMU_Cache.v:4692 in
compliance with IEC 62142(E):2005 / IEEE Std. 1364.1(E):2002. Recommending
use of @* instead of @(...) for better match of synthesis and simulation.
ERROR: Module `\mkFBox_Core' referenced in module `\mkFBox_Top' in cell `\fbox_core' is not part of the design.
but somehow grep
modifies it a bit:
> /usr/local/share/qflow/bin/yosys -s mkCPU.ys | & grep ERROR
use of @* instead of @(...) for better match of ERROR: Module `\mkFBox_Core' referenced in module `\mkFBox_Top' in cell `\fbox_core' is not part of the design.
(where did the synthesis and simulation.
part go?)
Anyway I kinda cheated by removing anything extra before 'ERROR' and it works now:
set yerrors = `eval ${bindir}/yosys -s ${modulename}.ys |& sed -e "/\\/s#\\#/#g" \
-e "/\[/s/\[//g" -e "/\]/s/\]//g" | grep ERROR | sed 's/^.*\(ERROR.*\).*$/\1/'`
Can you please take a look @RTimothyEdwards to make sure this doesn't break anything else? I can make a patch.
Honestly, I think the answer to annoying issues with tcsh and other annoying issue with bash is to stop using shell scripts altogether and rewrite everything in python.
The problem here is that "|&" does not, as I would like, direct only stderr to the pipe; you can only either redirect stdout or both stdout and stderr together. Because they are output together but buffered separately, there is no guarantee that stderr and stdout won't be interleaved. Really, the best solution is to do it in python, where one can call subprocess() and then handle the stdout and stderr streams separately.
Your solution seems reasonable, so I'll adopt it for now.
I'm trying to synthesize this processor, specifically this build.
My flow is failing right at Synthesis with message:
After diving into
yosys.sh
, the culprit seems to be yosys.sh#L379. If I add this line before that:and run my script again, my output becomes:
This seems a problem on part of
tcsh
and can(?) be solved if we stop piping stderr so|&
becomes|
, yet I'm still not able to synthesize because_mapped.v
file does not exist. Full output after change:Any help would be appreciated.