edalize icon indicating copy to clipboard operation
edalize copied to clipboard

[Documentation] - Unable to Reproduce Minimal Test from README Instructions

Open rbrglez opened this issue 1 year ago • 1 comments

Description of the Issue:

I am encountering a NameError when running the script failing.py. The issue appears to be related to the way I am importing the edalize module. When importing the module as described in the README (from edalize import *), I get an error. However, when importing only the get_edatool function (from edalize.edatool import get_edatool), the script runs successfully.

failing.py

$ python failing.py
Traceback (most recent call last):
  File "<my_path>/issue/failing.py", line 31, in <module>
    backend = get_edatool(tool)(edam=edam,
NameError: name 'get_edatool' is not defined

working.py

$ python working.py
iverilog -sblinky_tb -c blinky_project.scr -o blinky_project 
vvp -n -M. -l icarus.log   blinky_project -fst +vcd=1
FST info: dumpfile testlog.vcd opened for output.
Pulse 1/5 OK!
Pulse 2/5 OK!
Pulse 3/5 OK!
Pulse 4/5 OK!
Pulse 5/5 OK!
Testbench finished OK
../blinky_tb.v:40: $finish called at 5999000000 (1ns)

Python Version:

$ python --version
Python 3.10.12

Dependencies:

The following Python packages are installed:

$ pip list
Package    Version
---------- -------
edalize    0.6.0
Jinja2     3.1.4
MarkupSafe 3.0.2
pip        22.0.2
setuptools 59.6.0

File Structure of the attached issue.zip:

The project includes the following files:

issue/
├── failing.py         # Script that produces an error
├── working.py         # Script that works correctly
├── blinky_tb.v        # Verilog testbench file
├── blinky.v           # Verilog design file
└── vlog_tb_utils.v    # Verilog utility file

issue.zip

rbrglez avatar Nov 20 '24 19:11 rbrglez

I see that the same issue was raised here: #379

Resolution was, that README.mdshould be changed

rbrglez avatar Nov 23 '24 17:11 rbrglez