PyHDI / Pyverilog

Python-based Hardware Design Processing Toolkit for Verilog HDL
Apache License 2.0
640 stars 180 forks source link

fix: unexpected keyword argument `reorder` #120

Open superpung opened 1 year ago

superpung commented 1 year ago

In the definition of the VerilogGraphGenerator class, one of the arguments of its generate method is do_reorder: https://github.com/PyHDI/Pyverilog/blob/81838bc463d17148ef6872af34eb27585ee349ba/pyverilog/dataflow/graphgen.py#L57 However, in the example_graphgen.py file, this argument is mistakenly referred to as reorder. https://github.com/PyHDI/Pyverilog/blob/81838bc463d17148ef6872af34eb27585ee349ba/examples/example_graphgen.py#L100-L101 So when running python3 pyverilog/examples/example_graphgen.py -t top -s top.led test.v, I encountered error messages that are as follows:

Generating LALR tables
WARNING: 183 shift/reduce conflicts
Traceback (most recent call last):
  File "/path/to/pyverilog-demo/pyverilog/examples/example_graphgen.py", line 107, in <module>
    main()
  File "/path/to/pyverilog-demo/pyverilog/examples/example_graphgen.py", line 100, in main
    graphgen.generate(target, walk=options.walk, identical=options.identical,
TypeError: VerilogGraphGenerator.generate() got an unexpected keyword argument 'reorder'
8ware commented 3 months ago

Fixes #97 and #117.

8ware commented 3 months ago

Bug has been introduced in commit 7086786a6f5f8ad965b097344a77b4b86d21a93c.

superpung commented 3 months ago

/cc @shtaxxx

barnard33-233 commented 2 months ago

@shtaxxx