Hdlmake issueshttps://ohwr.org/project/hdl-make/issues2021-02-10T13:34:39Zhttps://ohwr.org/project/hdl-make/issues/102hdlmake\manifest_parser\configparser.py:29: SyntaxWarning: "is not" with a li...2021-02-10T13:34:39ZPeter Jansweijerhdlmake\manifest_parser\configparser.py:29: SyntaxWarning: "is not" with a literal. Did you mean "!="?configparser.py
line 29:
if not sys.version[0] is "2":
should be changed into:
if sys.version[0] != "2":https://ohwr.org/project/hdl-make/issues/120[Vivado] Support XCIX files2023-06-15T07:28:02ZTom Levens[Vivado] Support XCIX filesThese are "Core Container" files. They basically seem to be a zip file containing the core.https://ohwr.org/project/hdl-make/issues/119[Vivado] Support JSON format XCI files2023-06-15T07:28:02ZTom Levens[Vivado] Support JSON format XCI filesThe XCI parser expects an XML formatted file but:
> Note: Starting in Vivado Design Suite version 2018.3, the block design file format has changed from XML to JSON. When you open a block design that uses the older XML schema in Vivado 2018.3 or later, click Save to convert the format from XML to JSON. The following INFO message notifies you of the schema change.https://ohwr.org/project/hdl-make/issues/117Appending TCL_CREATE2022-01-12T15:15:27ZGrzegorz DanilukAppending TCL_CREATEIt would be a very nice feature if one could define in Manifest.py additional parameters to be appended to TCL_CREATE in generated Makefile. E.g. for LiberoSoC I would like to add `-adv_options {RESTRICTPROBEPINS:0}` parameter when project is created.https://ohwr.org/project/hdl-make/issues/116'Commands' object has no attribute 'generate_tree'2021-11-26T19:59:05ZAugusto Fraga Giachero'Commands' object has no attribute 'generate_tree'When executing ```hdlmake tree``` it fails with the message:
```
CRITICAL main.py:73: hdlmake() 'Commands' object has no attribute 'generate_tree'
```
But ```tree``` is listed as a valid command:
```
$ hdlmake -h
usage: hdlmake [-h] [-v] [-a] [--log LOG] [--logfile LOGFILE] [-p PREFIX_CODE] [-s SUFFIX_CODE] [--full-error] [--fetchto FETCHTO] {makefile,edalize,fetch,clean,list-mods,list-files,list-deps,tree,list-json,manifest-help} ...
A tool designed to help FPGA designers to manage and share their HDL code by automatically finding file dependencies, writing synthesis & simulation Makefiles, and fetching IP-Core libraries from remote repositories.
optional arguments:
-h, --help show this help message and exit
-v, --version print the version of this program
-a, --all use all the listed files, do not solve the fileset
--log LOG logging level: debug, info, warning, error, critical
--logfile LOGFILE path to the optional log file
-p PREFIX_CODE, --prefix PREFIX_CODE
Python code executed before every Manifest.py
-s SUFFIX_CODE, --suffix SUFFIX_CODE
Python code executed after every Manifest.py
--full-error display full error log with traceback
--fetchto FETCHTO overrides the fetchto variable
commands:
{makefile,edalize,fetch,clean,list-mods,list-files,list-deps,tree,list-json,manifest-help}
makefile write the Makefile (default action for hdlmake)
edalize write a run.py file based on edalize
fetch fetch and/or update all of the remote modules
clean clean all of the already fetched remote modules
list-mods list all modules together with their files
list-files list all of the files in the design hierarchy
list-deps print all dependencies
tree generate a module hierarchy tree graph
list-json list all the files using a JSON list
manifest-help print manifest file variables description
```
Was it supposed to call ```ActionTree.generate_tree()``` ?https://ohwr.org/project/hdl-make/issues/112[Vivado] Source files generated from IP customization files (xci) not include...2021-06-30T15:31:57ZAugusto Fraga Giachero[Vivado] Source files generated from IP customization files (xci) not included in library 'work'After 4e09765b5c581fd306f2fcbc16ab26532623af87 synthesis fails for projects that make use of IP generated from xci files. Changing `_XILINX_VHDL_PROPERTY` to `None` fixes this issue (at least for vhdl projects).
https://ohwr.org/project/hdl-make/blob/develop/hdlmake/tools/xilinx_prj.py#L38-39
Minimal reproducible example attached, execute:
```bash
$ hdlmake
$ make synthesize
```
Vivado version: 2018.3
Platform: Ubuntu Linux 20.04 x86-64
[xci-test-hdlmake.zip](/uploads/d3b84b45b50919fb740dabc6d236c324/xci-test-hdlmake.zip)https://ohwr.org/project/hdl-make/issues/111hdlmake-3.4.dev1. Error while parsing file witn UVN macros include2021-05-25T08:11:14ZVladislav Borshchhdlmake-3.4.dev1. Error while parsing file witn UVN macros includeHello all,
Win10, questasim2019.4, UVM 1.2
Faced with next problem:
When I trying compile file with next strings:
```
`import uvm_pkg::*;
`include <uvm_macros.svh> // <- error at this line
```
hdlmake gave me error:
```
hdlmake --log debug --full-error
...
Normal debug output
...
DEBUG new_dep_solver.py:86: parse_source_files() PARSING SOURCE FILE: <some_path>\src\top.sv
DEBUG vlog_parser.py:223: _preprocess_file() preprocess file C<some_path>\src\top.sv (of length 2600) in library work
CRITICAL main.py:73: hdlmake() join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
ERROR main.py:75: hdlmake() Trace:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\main.py", line 70, in hdlmake
_action_runner(action)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\main.py", line 86, in _action_runner
action.makefile()
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\action\commands.py", line 72, in makefile
self.solve_file_set()
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\action\action.py", line 161, in solve_file_set
dep_solver.parse_source_files(graph, self.parseable_fileset)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\sourcefiles\new_dep_solver.py", line 87, in parse_source_files
investigated_file.parser.parse(investigated_file, graph)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\sourcefiles\vlog_parser.py", line 494, in parse
buf = self.preprocessor.preprocess(dep_file)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\sourcefiles\vlog_parser.py", line 236, in preprocess
return self._preprocess_file(file_content=buf,
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\sourcefiles\vlog_parser.py", line 227, in _preprocess_file
return _handle_macros(buf)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\sourcefiles\vlog_parser.py", line 220, in _handle_macros
return re.sub(r'^\s*\n','', _proc_macros_layer(parts, vpp_macros)[0], flags=re.MULTILINE)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\sourcefiles\vlog_parser.py", line 189, in _proc_macros_layer
included_file_path = self._search_include(front.incfile, os.path.dirname(file_name))
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\hdlmake-3.4.dev1-py3.8.egg\hdlmake\sourcefiles\vlog_parser.py", line 72, in _search_include
possible_file = os.path.join(parent_dir, filename)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\ntpath.py", line 117, in join
genericpath._check_arg_types('join', path, *paths)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\genericpath.py", line 152, in _check_arg_types
raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
```
From my point, it's looks like some problems with finding file, included by <> symbols.https://ohwr.org/project/hdl-make/issues/110utf-8 decode exception (Vivado 2018.3)2021-06-29T12:21:10ZAugusto Fraga Giacheroutf-8 decode exception (Vivado 2018.3)Some verilog files generated by Vivado have encoding errors in the comments. In one of our projects the file `axi/mig_7series_v4_2_ddr_a_upsizer.v` was causing trouble (line 85):
```verilog
parameter integer C_AXI_SUPPORTS_USER_SIGNALS = 0,
// 1 = Propagate all USER signals, 0 = Don<92>t propagate.
```
Although the issue comes from the Vivado side, I think it is a good idea to make hdlmake more tolerant of such character encoding errors:
```diff
diff --git a/hdlmake/sourcefiles/vhdl_parser.py b/hdlmake/sourcefiles/vhdl_parser.py
index e89a2a7..ed35169 100644
--- a/hdlmake/sourcefiles/vhdl_parser.py
+++ b/hdlmake/sourcefiles/vhdl_parser.py
@@ -40,7 +40,7 @@ class VHDLParser(DepParser):
def _preprocess(vhdl_file):
"""Preprocess the supplied VHDL file instance"""
- buf = open(vhdl_file.path, "r").read()
+ buf = open(vhdl_file.path, "r", errors='replace').read()
logging.debug(
"preprocess file %s (of length %d) in library %s",
vhdl_file.path, len(buf), vhdl_file.library)
diff --git a/hdlmake/sourcefiles/vlog_parser.py b/hdlmake/sourcefiles/vlog_parser.py
index 5a728e3..986e031 100644
--- a/hdlmake/sourcefiles/vlog_parser.py
+++ b/hdlmake/sourcefiles/vlog_parser.py
@@ -232,7 +232,7 @@ class VerilogPreprocessor(object):
# assert isinstance(vlog_file, VerilogFile)
# assert isinstance(vlog_file, DepFile)
self.vlog_file = vlog_file
- buf = open(vlog_file.path, "r").read()
+ buf = open(vlog_file.path, "r", errors='replace').read()
return self._preprocess_file(file_content=buf,
file_name=vlog_file.path,
library=vlog_file.library)
```https://ohwr.org/project/hdl-make/issues/109missing space in generated makefile2021-02-09T16:06:35ZPascal Bosmissing space in generated makefileIn the generated Makefile, there is a space missing. Running this Makefile throws an error in the follwing line
/opt/Xilinx/Vivado/2020.2/bin/vivado -mode tcl -sourcesynthesize.tcl
changing the following lines in the Make containing:
"$(TCL_INTERPRETER)$@.tcl"
to
"$(TCL_INTERPRETER) $@.tcl"
solves the problem temporaryhttps://ohwr.org/project/hdl-make/issues/108Appending wrong string to Makefile for Quartus2021-05-25T07:29:07ZVladislav BorshchAppending wrong string to Makefile for QuartusWindows 10, Quartus 18.0, hdlmake 3.3
When I tried to find out in my previous bug report (#107) I found one more issue:
Exactly algorithm for issue repeating:
`cd .\tests\counter\syn\cyclone3_sk_quartus\verilog\`
Then comment out strings 11-12 with `quartus_preflow` and `quartus_postmodule`.
Then:
`hdlmake`
`make`
After ran `hdlmake` take a look to string 34 in Makefile. There is "empty" echo command:
```
@echo >> $@
```
But results of this command (after `make` command) in the `files.tcl` looks next:
```
ECHO is off.
set_global_assignment -name VERILOG_FILE ../../../modules/counter/verilog/counter.v -library work
set_global_assignment -name VERILOG_FILE ../../../top/cyclone3_sk/verilog/cyclone3_top.v -library work
```
The first string in files.tcl is "ECHO is off.". And it is mistake for Quartus too.
Maybe it is not a bug but a feature...https://ohwr.org/project/hdl-make/issues/107Two pairs of double quotes in Makefile for Quartus, Win102020-10-28T12:10:55ZVladislav BorshchTwo pairs of double quotes in Makefile for Quartus, Win10Windows 10, Quartus 18.0, hdlmake 3.3
Mistake with strings in the Makefile for Quartus.
Exactly algorithm for issue repeating:
`cd .\tests\counter\syn\cyclone3_sk_quartus\verilog\`
Then run `hdlmake` and take a look to strings 34-35 in Makefile. There is two pairs of double quotes in paths.
```
... ""quartus_sh:../../../top/cyclone3_sk/pinout.tcl"" ...
... ""quartus_sh:../../../top/cyclone3_sk/module.tcl"" ...
```
And it is mistake for Quartus:
```
Info: Command: quartus_sh -t project.tcl
------------------------------------------------
extra characters after close-quote
while executing
"set_global_assignment -name PRE_FLOW_SCRIPT_FILE ""q"
(file "files.tcl" line 1)
invoked from within
"source files.tcl "
(file "project.tcl" line 4)
------------------------------------------------
```
If I clear one layout of quotes - all will be fine.
I tried to find where this strings formed in source codes of hdlmake, but no luck at the moment.https://ohwr.org/project/hdl-make/issues/106ISE: syn_properties are not escaped properly in Makefile2021-06-30T15:32:48ZIlia SlepnevISE: syn_properties are not escaped properly in Makefilehdlmake-3.3 does not handle syn_properties with round brackets correctly
Manifest.py:
```
syn_properties = [
[ "Configuration Rate", "40" ],
...
[ "Extra Effort (Highest PAR level only)", "Normal" ],
]
```
produced Makefile fragment:
```
echo project set \"Configuration Rate\" \"40\" >> $@
echo project set \"Extra Effort (Highest PAR level only)\" \"Normal\" >> $@
```
> bash: syntax error near unexpected token ('
Expected Makefile fragment:
```
echo project set '"Configuration Rate" "40"' >> $@
echo project set '"Extra Effort (Highest PAR level only)" "Normal'"' >> $@
```
make command output:
```
...
echo project set \"Extra Effort (Highest PAR level only)\" \"Normal\" >> project.tcl
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `echo project set \"Extra Effort (Highest PAR level only)\" \"Normal\" >> project.tcl'
make: *** [Makefile:132: project.tcl] Error 1
```https://ohwr.org/project/hdl-make/issues/105extra_modules is ignored2021-06-30T15:33:43ZSam de Jongextra_modules is ignoredI'm using hdlmake for a project, and I'd like to force add some files.
It seems that the `extra_modules` variable is ignored. Do I need to do something to enable it? Is there another way of force adding some files without going to the `-a` option?
Thanks.https://ohwr.org/project/hdl-make/issues/103charactermap coded fails in windows2021-06-30T15:34:18ZPeter Jansweijercharactermap coded fails in windowsInstalled hdl-make-3.3 under windows 10 (python 3.8.1; python setup.py install)
Parsing manifest files:
```
INFO action.py:143: build_file_set() Detected 343 supported files that can be parsed
ERROR main.py:71: hdlmake() 'charmap' codec can't decode byte 0x9d in position 1689: character maps to <undefined>
```
There seems to be an issue with the read encodinghttps://ohwr.org/project/hdl-make/issues/101Windows support2019-10-31T10:33:11ZEvangelia GousiouWindows supportSeveral issues faced when trying to run on Windows projects like [fmc-tdc](https://ohwr.org/project/fmc-tdc-1ns-5cha-gw), [wrtd](https://ohwr.org/project/wrtd); basic commands like pwd, touch etc missing from gnuwin.
Using cygwin manages at least to make project; Windows support and installation instructions need to be revised.https://ohwr.org/project/hdl-make/issues/100Invalid installation instructions in the develop branch2019-10-31T10:04:17ZDimitris LampridisInvalid installation instructions in the develop branchThe documentation for the current development branch in:
https://hdlmake.readthedocs.io/en/develop/#installing-hdlmake
States that one can run hdlmake directly from the cloned repository using:
```
#!/usr/bin/env bash
PYTHONPATH=/path_to_hdlmake_sources/hdl-make python2.7 -m hdlmake $@
```
However, this is not valid anymore, as it produces:
```
No module named hdlmake.__main__; 'hdlmake' is a package and cannot be directly executed
```https://ohwr.org/project/hdl-make/issues/97Add test to check validity of parameters in manifests2019-10-31T08:06:38ZNicolas ChevillotAdd test to check validity of parameters in manifestsFollowing
https://ohwr.org/project/hdl-make/issues/91Nicolas ChevillotNicolas Chevillothttps://ohwr.org/project/hdl-make/issues/92quit functions should not be called except in main function2019-06-03T06:51:51ZNicolas Chevillotquit functions should not be called except in main functionIn some parts of the code, we can find:
```
logging.error("...")
quit(1)
```
it should be converted into an exception in order to be caught at the top-level and therefore traceback shown.
Actually the quit function should be called only from the main function and never anywhere else as this will break any kind of debug feature using try/except.Nicolas ChevillotNicolas Chevillothttps://ohwr.org/project/hdl-make/issues/91In case an option in a Manifest uses a type which is not allowed, the error m...2019-06-03T14:15:22ZNicolas ChevillotIn case an option in a Manifest uses a type which is not allowed, the error message is highly cryptic and doesn't help to solve the issueFor example, sim_pre_cmd is set to a list:
```
sim_pre_cmd = ['make registers', 'python $PROJECT_ROOT_PATH/projects/lib/register_check/generate_registers_tb.py']
```
By default this is not supported. The error message given is:
```
python -m hdlmake.__main__ --log warning list-mods
ERROR __main__.py:62: main() Given option (<type 'list'>) doesn't match specified types: ([<type 'str'>])
```Nicolas ChevillotNicolas Chevillothttps://ohwr.org/project/hdl-make/issues/90--sufix command is a typo => rename to --suffix for proper english2019-06-03T06:48:08ZNicolas Chevillot--sufix command is a typo => rename to --suffix for proper englishNicolas ChevillotNicolas Chevillot