Information for the users of ISYP branch of hdlmake on how to get started with master
I was using the HDLmake ISYP branch. Below are some steps I needed to perform to have the new HDLmake working the same way the old one did. I am trying the new hdlmake on switch-hdl project.
1. No hdlmake binary in the repo
I had the old hdlmake, which was a compiled to a binary, added to $PATH
- for convenience. At the moment, there is no binary for the new HDLmake, in order to add the new HDLmake to $PATH as well:
1. I created script in /usr/sbin so that I can call new hdlmake (that has no binary) like I did the old one. I called the new script hdlmake-master
<code class="bash">
#!/usr/bin/env bash
python2.7 your/path/hdl-make/hdlmake $@
</code>
here:
hdl-make is the name of the folder created when you checked out the
repo
hdlmake is the subfolder of hdl-make (this is not binary or a file, this
is folder name)
2. I set proper rights:
<code class="bash">
chmod +x /usr/bin/hdlmake
</code>
2. Possible need to change Manifest which contain top module for simulation
Due to requirement from simulators (e.g. iverilog), it is now obligatory to state in the Manifest that contains the top simulation module more parameters, i.e.:
- the name of the top entity
- the name of the tool
So I needed to add to Manifest.py the following
<code class="bash">
top_module = "main"
sim_tool = "modelsim"
</code>
to this Manifest.py
3. Simulation includes
It was necessary to explicitly tell HDLmake where are the files stated as "includes" in the top level simulation file (main.sv) and which are not in the same directory as the file. I needed to add to top level simulation Manifest.py include_dirs:
<code class="bash">
include_dirs = ["../../sim", "../../sim/wr-hdl"]
</code>
it is not enough any more to have in the Manifest.py
<code class="bash">
vlog_opt = "+incdir+../../sim +incdir+../../sim/wr-hdl"
</code>
4. Error messages from Makefile in run.do script
If you run hdlmake-generated Makefile the way it is done in switch run.do so from run.do script:
<code class="bash">
make -f Makefile
</code>
you might find that it will not work with the new hdlmake. In my case, it turns out that when Makefile is executed it fails to copy modelsim.ini file, this gives error message from Makefile
<code class="bash">
# ** Error: cp /opt/modelsim_10/modelsim.ini .
</code>
This message was ignored by run.do script when executing Makefile
generated by the ISYP HDLmake. It is not ignored now so your run.do
script will fail.
A quickfix for me wast to send errors from Makefile to dev/null:
<code class="bash">
make -f Makefile 2>/dev/null
</code>
To be investigated where is the problem here (my side or HDLmake): the the file exists in the place where it is attempted to be copied from ...