FPGA-Research-Manchester / FABulous

Fabric generator and CAD tools
https://fabulous.readthedocs.io/en/latest/
Apache License 2.0
148 stars 34 forks source link

VHDL generation broken #153

Open mole99 opened 9 months ago

mole99 commented 9 months ago

VHDL generation seems to be broken on current master. PR #152 now shows the proper error.

I ran the following commands:

python3 FABulous.py -c demo -w vhdl
python3 FABulous.py demo -w vhdl
load_fabric
run_FABulous_fabric

run_FABulous_fabric fails with:

[INFO]-2024-02-17 11:32:35,363 - Output file: demo/Tile/S_term_DSP/S_term_DSP.vhdl
Traceback (most recent call last):
  File "/home/leo/Repositories/FABulous/FABulous.py", line 276, in onecmd
    return super().onecmd(line)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/cmd.py", line 217, in onecmd
    return func(arg)
           ^^^^^^^^^
  File "/home/leo/Repositories/FABulous/FABulous.py", line 526, in do_run_FABulous_fabric
    self.do_gen_fabric()
  File "/home/leo/Repositories/FABulous/FABulous.py", line 458, in do_gen_fabric
    self.do_gen_all_tile()
  File "/home/leo/Repositories/FABulous/FABulous.py", line 452, in do_gen_all_tile
    self.do_gen_tile(self.allTile)
  File "/home/leo/Repositories/FABulous/FABulous.py", line 441, in do_gen_tile
    self.fabricGen.genTile(t)
  File "/home/leo/Repositories/FABulous/FABulous.py", line 140, in genTile
    self.fabricGenerator.generateTile(tile)
  File "/home/leo/Repositories/FABulous/fabric_generator/fabric_gen.py", line 788, in generateTile
    raise ValueError(
ValueError: Could not find S_term_DSP_switch_matrix.vhdl in Tile/S_term_DSP/./ Need to run matrix generation first

The issue seems to be that fabric_gen.py searches for the file Tile/S_term_DSP/S_term_DSP_switch_matrix.vhdl from the current working directory, which is: /home/leo/Repositories/FABulous. But the file is in /home/leo/Repositories/FABulous/demo/Tile/S_term_DSP/S_term_DSP_switch_matrix.vhdl.

Once this is fixed, it would be good to add a test case for VHDL to the CI.