You are not logged in.
Hi, I'm running into an issue with ghdl-mcode-git.
The final tests fail (they use pyunit) due to the following error:
=========================================================== FAILURES ============================================================
___________________________________________________ CompileOrder.test_Encoder ___________________________________________________
self = <pyunit.dom.StopWatch.CompileOrder testMethod=test_Encoder>
def test_Encoder(self):
print()
design = Design()
design.LoadDefaultLibraries()
t1 = time_perf_counter()
for lib, file in self._stopwatchFiles:
library = design.GetLibrary(lib)
document = Document(self._sourceDirectory / file)
design.AddDocument(document, library)
print(dedent("""\
file: {}
libghdl processing time: {:5.3f} us
DOM translation time: {:5.3f} us
"""
).format(
document.Path,
document.LibGHDLProcessingTime * 10**6,
document.DOMTranslationTime * 10**6,
)
)
pyGHDLTime = time_perf_counter() - t1
design.Analyze()
toplevel = [root.Value.Identifier for root in design.HierarchyGraph.IterateRoots()]
print(dedent("""
pyGHDL:
sum: {:5.3f} us
Analysis:
default library load time: {:5.3f} us
dependency analysis time: {:5.3f} us
Toplevel: {toplevel}
Compile order:\
"""
).format(
pyGHDLTime * 10**6,
design._loadDefaultLibraryTime * 10**6,
design._analyzeTime * 10**6,
toplevel=", ".join(toplevel)
)
)
for i, vertex in enumerate(design.IterateDocumentsInCompileOrder()):
> print(f" {i:<2}: {vertex.Value.Path.relative_to(Path.cwd())}")
E AttributeError: 'Document' object has no attribute 'Value'
pyunit/dom/StopWatch.py:160: AttributeError
I'm not very familiar with the unit test part of ghdl nor with pyunit, but I suspect a dependency issue, but I can't pinpoint it.
Any help would be welcome!
Offline
OK I narrowed it down to the latest git revision of ghdl not being fully compatible with the latest git revision of python-pyvhdlmodel (0.26) built using the python-pyvhdlmodel-git AUR package - which is the combination you get if you do a new build of ghdl-mcode-git on a machine that has neither packages installed yet. (Which is my case as I'm installing on a new machine.)
With python-pyvhdlmodel 0.25, the final tests during the ghdl build complete successfully (with the latest git revision of ghdl ). I've seen some mention of ghdl updating for python-pyvhdlmodel 0.26 on ghdl's github repo, but apparently this is not fully working yet.
So I'll handle it there and will keep you posted when I have some news about that. If anyone's interested.
Offline