Closed andrewpeck closed 2 years ago
It can be reproduced with the command from the README
./build_vhdl_packages.py -x example_xml/MEM_TEST.xml -o test/uHAL/ \
--mapTemplate templates/axi_generic/template_map_withbram.vhd MEM_TEST
This is uHAL library path issue. if you run it with LD_LIBRARY_PATH+=:/opt/cactus/lib/ in front, then it works. I guess we should fail if uHAL is requested and not found.
[dan@tesla regmap_helper]$ ./build_vhdl_packages.py -x example_xml/MEM_TEST.xml -o test/uHAL/ --mapTemplate templates/axi_generic/template_map_withbram.vhd MEM_TEST
Using uHAL parser
Traceback (most recent call last):
File "./build_vhdl_packages.py", line 191, in
[dan@tesla regmap_helper]$ LD_LIBRARY_PATH+=:/opt/cactus/lib/ ./build_vhdl_packages.py -x example_xml/MEM_TEST.xml -o test/uHAL/ --mapTemplate templates/axi_generic/template_map_withbram.vhd MEM_TEST Using uHAL parser
For me at least it doesn't work either way:
LD_LIBRARY_PATH+=:/opt/cactus/lib/ ./build_vhdl_packages.py -x example_xml/MEM_TEST.xml -o test/uHAL/ --mapTemplate templates/axi_generic/template_map_withbram.vhd MEM_TEST
Using uHAL parser
Traceback (most recent call last):
File "./build_vhdl_packages.py", line 195, in <module>
build_vhdl_packages(args.simple,
File "./build_vhdl_packages.py", line 173, in build_vhdl_packages
parse_xml(test_xml, outpath, mapTemplate, pkgTemplate, yml2hdl=yml2hdl,
File "./build_vhdl_packages.py", line 95, in parse_xml
func(test_xml, HDLPath, regMapTemplate, pkgTemplate,
File "./build_vhdl_packages.py", line 133, in useUhalParser
mytree = tree.tree(device.getNode(i), log, yml2hdl=yml2hdl)
File "/home/andrew/Downloads/uHAL_AXI_regmap/parsers/tree.py", line 61, in __init__
self.root = node.node(root, baseAddress=0, tree=self)
File "/home/andrew/Downloads/uHAL_AXI_regmap/parsers/node.py", line 45, in __init__
self.permission = self.readpermission(nodeObj.getPermission())
File "/home/andrew/Downloads/uHAL_AXI_regmap/parsers/node.py", line 230, in readpermission
if permission == uhal.NodePermission.READ:
NameError: name 'uhal' is not defined
And the first error that you posted is actually different from the one I am seeing, crashing in a different file :(
Fixed in merge #30
The method
readpermission
translates between uHAL permission classes and permission stringsRunning the program with the uHAL parser generates an error, however, since uHAL is unimported in this module
The import was commented out in commit c1376870f7 "Fixed possible uHAL dependency"
I don't see how this function can work without importing uhal unless e.g. we pass these objects into the
node
class at constructionDo you have any preferences for how to fix this @dgastler ? uncommented the import resolves it but maybe there is a better way to implement this