Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Error when used with VSCode and Teroshdl #24

Closed

Description

@BharathS11

Hi, When I use yowasp to generate netlist with Teroshdl and vscode I get the following error. Please take a look at the attached file. Thank you
netlist_error.log

Activity

  1. whitequark commented on Oct 5, 2021

    @whitequark
    Member

    Okay, there are several separate issues here:

  2. BharathS11 commented on Oct 7, 2021

    @BharathS11
    Author

    Hi, Thanks for responding. TerosHDL developers updated the tool to use relative path
    The following commands work

    yowasp-yosys -p "read_verilog -sv dsp\rtl\dsp_xcc_v2.v; proc; opt; write_json .teroshdl_yosys_output.json; stat"
    yowasp-yosys -p "read_verilog -sv .\dsp\rtl\dsp_xcc_v2.v; proc; opt; write_json .teroshdl_yosys_output.json; stat" 
    

    but this is what TerosHDL calls and doesn't work
    yowasp-yosys -p "read_verilog -sv ..\..\..\Documents\Projects\test\frontend\dsp\rtl\dsp_xcc_v2.v; proc; opt; write_json C:\Users\bhara\.teroshdl_yosys_output.json; stat"

    I think the doubles quotes cause the issue.

  3. whitequark commented on Oct 7, 2021

    @whitequark
    Member

    Can you ask TerosHDL developers to contact me directly regarding this issue? (In this GitHub issue, by email, whichever is more convenient.) Then we can work something out.

  4. whitequark commented on Oct 7, 2021

    @whitequark
    Member

    In commit 4ae03d9 I've changed the path handling so that on Windows, absolute and relative paths with any components would work. (It also improves relative path handling on *nix.) Note that on Windows, paths must be delimited by forward slashes, /, rather than backward slashes, \\; this is due to the way WASI implements path handling.

    You can install YoWASP Yosys built from this commit with:

    pip install -i https://test.pypi.org/simple/ yowasp-yosys==0.9.post5623.dev232
    
  5. whitequark commented on Oct 31, 2021

    @whitequark
    Member

    @BharathS11 Can you please confirm whether you were able to get the updated package to work?

  6. whitequark commented on Feb 6, 2023

    @whitequark
    Member

    yowasp-yosys -p "read_verilog -sv ..\..\..\Documents\Projects\test\frontend\dsp\rtl\dsp_xcc_v2.v; proc; opt; write_json C:\Users\bhara\.teroshdl_yosys_output.json; stat"

    Both of these paths should work since commit 4ae03d9, closing. Please comment if there are still any issues.

  7. qarlosalberto commented on May 20, 2024

    @qarlosalberto

    I'm improving the support for yowasp-yosys in TerosHDL. Currently, is it possible to use absolute paths in Windows and Linux? Thanks.

  8. whitequark commented on May 20, 2024

    @whitequark
    Member

    Sure. You have to use / instead of \ though.

  9. qarlosalberto commented on May 20, 2024

    @qarlosalberto

    Great!!

    I'm doing some tests. This command works fine:

    yowasp-yosys -p 'read_verilog -sv /home/carlos/repo/vscode-terosHDL/packages/colibri/tests/yosys/helpers/verilog/mylib/counter_logic.v; read_verilog -sv /home/carlos/repo/vscode-terosHDL/packages/colibri/tests/yosys/helpers/verilog/counter_top.v; ; hierarchy -top counter_top; proc; ; write_json /home/carlos/hola.json; stat'
    

    But not this command:

    yowasp-yosys -p 'read_verilog -sv /home/carlos/repo/vscode-terosHDL/packages/colibri/tests/yosys/helpers/verilog/mylib/counter_logic.v; read_verilog -sv /home/carlos/repo/vscode-terosHDL/packages/colibri/tests/yosys/helpers/verilog/counter_top.v; ; hierarchy -top counter_top; proc; ; write_json /tmp/hola.json; stat'
    

    There aren't errors. But in the second command yowasp-yosys doesn't create the file /tmp/hola.json. I am doing something wrong?

  10. whitequark commented on May 20, 2024

    @whitequark
    Member

    The /tmp subtree is internally mounted to a temporary directory created just for this purpose, as it is unconditionally used by Yosys for e.g. running abc. The /tmp directory is hardcoded in wasi-libc sources so you'll need to pick a different temporary location.

    The same is true of /share, for different reasons.

  11. qarlosalberto commented on May 20, 2024

    @qarlosalberto

    Ahh okok, thanks!! I will choose other path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions