Skip to content

CGRA-Flow failing to generate Sverilog #104

@ErickOF

Description

@ErickOF

Hi there.

I'd played around with the CGRA-Flow tool a couple of months ago, and I found it very interesting and useful for my Master's Degree research.

I just came back to start generating the CGRA RTL, play more with the tool, and understand certain features. I realized that the UI has changed and now has multi-CGRA support, and that's actually pretty cool. Btw, when I try to generate the RTL using the basic configurations (without changing anything in the UI), it fails with the following error:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.11/tkinter/__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/WORK_REPO/venv/lib/python3.11/site-packages/customtkinter/windows/widgets/ctk_button.py", line 554, in _clicked
    self._command()
  File "/WORK_REPO/CGRA-Flow/build/../mode_dark_light.py", line 1108, in clickGenerateVerilog
    test_mesh_multi_cgra_universal(cmdline_opts, arch_file_path)
  File "/WORK_REPO/CGRA-Flow/VectorCGRA/multi_cgra/test/MeshMultiCgraTemplateRTL_test.py", line 375, in test_mesh_multi_cgra_universal
    th = config_model_with_cmdline_opts(th, cmdline_opts, duts = ['dut'])
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/stdlib/test_utils/test_helpers.py", line 129, in config_model_with_cmdline_opts
    top = VerilogTranslationImportPass()( top )
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/passes/backends/verilog/VerilogTranslationImportPass.py", line 37, in __call__
    return c.get_import_pass()()( top )
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/passes/backends/verilog/import_/VerilogVerilatorImportPass.py", line 262, in __call__
    ret = s.traverse_hierarchy( top )
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/passes/backends/verilog/import_/VerilogVerilatorImportPass.py", line 279, in traverse_hierarchy
    s.traverse_hierarchy( child )
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/passes/backends/verilog/import_/VerilogVerilatorImportPass.py", line 275, in traverse_hierarchy
    return s.do_import( m )
           ^^^^^^^^^^^^^^^^
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/passes/backends/verilog/import_/VerilogVerilatorImportPass.py", line 283, in do_import
    imp = s.get_imported_object( m )
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/passes/backends/verilog/import_/VerilogVerilatorImportPass.py", line 371, in get_imported_object
    s.create_verilator_model( m, ph_cfg, ip_cfg, cached )
  File "/WORK_REPO/venv/lib/python3.11/site-packages/pymtl3/passes/backends/verilog/import_/VerilogVerilatorImportPass.py", line 430, in create_verilator_model
    raise VerilogImportError(m, import_err_msg)
pymtl3.passes.backends.verilog.errors.VerilogImportError: 
Error trying to perform import on s.dut:
- Fail to verilate model MeshMultiCgraTemplateRTL__3244104ece010245
  Verilator command:
  verilator --cc --top-module MeshMultiCgraTemplateRTL__3244104ece010245 --Mdir obj_dir_MeshMultiCgraTemplateRTL__3244104ece010245 -I/WORK_REPO/CGRA-Flow/VectorCGRA/fu/pymtl3_hardfloat/HardFloat/source/ -I/WORK_REPO/CGRA-Flow/VectorCGRA/fu/single/ --assert -O3 --unroll-count 1000000 --unroll-stmts 1000000 --Wno-UNSIGNED --Wno-UNOPTFLAT --Wno-WIDTH --Wno-WIDTHCONCAT --Wno-ALWCOMBORDER MeshMultiCgraTemplateRTL__3244104ece010245__pickled.v

  Verilator output:
  %Error: Verilator threw signal 9. Suggest trying --debug --gdbbt
  %Error: Command Failed /WORK_REPO/verilator/bin/verilator_bin --cc --top-module MeshMultiCgraTemplateRTL__3244104ece010245 --Mdir obj_dir_MeshMultiCgraTemplateRTL__3244104ece010245 -I/WORK_REPO/CGRA-Flow/VectorCGRA/fu/pymtl3_hardfloat/HardFloat/source/ -I/WORK_REPO/CGRA-Flow/VectorCGRA/fu/single/ --assert
  -O3 --unroll-count 1000000 --unroll-stmts 1000000 --Wno-UNSIGNED --Wno-UNOPTFLAT --Wno-WIDTH --Wno-WIDTHCONCAT --Wno-ALWCOMBORDER MeshMultiCgraTemplateRTL__3244104ece010245__pickled.v

The design.sv is generated successfully. Do you know if this is a known issue? Is there any local fix that I can apply? I went through the open issues, and the most similar case that I found was #96. I can help with coding, try any fix and submit a pull request if that helps.

What I want to do is to generate the CGRA RTL and the Verilog/SystemVerilog testbench so I can reuse them for power-aware design and verification in another tool.

I will appreciate any guidance on this issue.

Thank you so much in advance.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions