vscode-terosHDL icon indicating copy to clipboard operation
vscode-terosHDL copied to clipboard

Schematic viewer: cannot configure on windows.

Open sigmuha opened this issue 9 months ago β€’ 4 comments

Describe the bug When configuring the schematic viewer for vhdl (GHDL + Yosys) and adding a path to start the oss-cad-suite environment, the TerosHDL: Global terminal doesn't produce any output, and the schematic viewer doesn't work.

The command used to activate the environment is: C:\oss-cad-suite\start.bat &, which works fine (eg. yosysis found) in a CMD-shell. This command is run, as per the suggestion in the field description above: Extra options passed before to run yowasp-yosys or yosys. Eg: 'conda activate base & ' or 'C:/OSS-CAD-SUITE/oss-cad-suite/start.bat & '. This might be related to starting a background process with &, and the terminal output is piped somewhere else?

When removing said command, output is again produced, but initializing the schematic viewer naturally fails:

*************************************************
Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) 
❌ Some checks failed ❌
*************************************************
βŠ™ Selected backend: yosys_ghdl with installation path: "". 
  πŸ”Ž Searching for the binary "yosys_ghdl" in the system path
  ❌ yosys_ghdl not found in the system path. Search executed with: "yosys --version"
πŸ‘Ž The Schematic Backend installation path is not correctly configured. The binary could not be located in either the system path or the configured path. Please check the documentation.

This issue also doesn't occur when having ``C:\oss-cad-suite\environment.bat` in the same extra options field. However, the schematic viewer still isn't configured correctly:

*************************************************
Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) 
❌ Some checks failed ❌
*************************************************
βŠ™ Selected backend: yosys_ghdl with installation path: "". 
  πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat"
  βœ… yosys_ghdl found at "C:\oss-cad-suite\environment.bat" using the command: "C:\oss-cad-suite\environment.bat --version"
πŸ”§ Schematic Backend was found; however, the installation path is not correctly configured. Ensure the path points to the binary folder, not the specific binary. Found in: "C:\oss-cad-suite\environment.bat"

How do I configure the schematic viewer correctly? What is meant to be passed in the "extra options" field when using oss-cad-suite?

Please complete the following information:

  • OS: Windows 11
  • Extention version: 7.0.3

sigmuha avatar Apr 04 '25 11:04 sigmuha

Double check it. But I think that GHDL+Yosys doesn't work in Windows with oss-cad-suite. What is the output in the Schematic Viewer?

El vie, 4 abr 2025 a las 13:26, sigmuha @.***>) escribiΓ³:

Describe the bug When configuring the schematic viewer for vhdl (GHDL + Yosys) and adding a path to start the oss-cad-suite environment, the TerosHDL: Global terminal doesn't produce any output, and the schematic viewer doesn't work.

The command used to activate the environment is: C:\oss-cad-suite\start.bat &, which works fine (eg. yosysis found) in a CMD-shell. This command is run, as per the suggestion in the field description above: Extra options passed before to run yowasp-yosys or yosys. Eg: 'conda activate base & ' or 'C:/OSS-CAD-SUITE/oss-cad-suite/start.bat & '. This might be related to starting a background process with &, and the terminal output is piped somewhere else?

When removing said command, output is again produced, but initializing the schematic viewer naturally fails:


Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) ❌ Some checks failed ❌


βŠ™ Selected backend: yosys_ghdl with installation path: "". πŸ”Ž Searching for the binary "yosys_ghdl" in the system path ❌ yosys_ghdl not found in the system path. Search executed with: "yosys --version" πŸ‘Ž The Schematic Backend installation path is not correctly configured. The binary could not be located in either the system path or the configured path. Please check the documentation.

This issue also doesn't occur when having ``C:\oss-cad-suite\environment.bat` in the same extra options field. However, the schematic viewer still isn't configured correctly:


Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) ❌ Some checks failed ❌


βŠ™ Selected backend: yosys_ghdl with installation path: "". πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat" βœ… yosys_ghdl found at "C:\oss-cad-suite\environment.bat" using the command: "C:\oss-cad-suite\environment.bat --version" πŸ”§ Schematic Backend was found; however, the installation path is not correctly configured. Ensure the path points to the binary folder, not the specific binary. Found in: "C:\oss-cad-suite\environment.bat"

How do I configure the schematic viewer correctly? What is meant to be passed in the "extra options" field when using oss-cad-suite?

Please complete the following information:

  • OS: Windows 11
  • Extention version: 7.0.3

β€” Reply to this email directly, view it on GitHub https://github.com/TerosTechnology/vscode-terosHDL/issues/760, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNN4R3RXEHWLTZBPF7QR532XZT6FAVCNFSM6AAAAAB2OP5AJKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHE3TEMBYG4ZTENY . You are receiving this because you are subscribed to this thread.Message ID: @.***> [image: sigmuha]sigmuha created an issue (TerosTechnology/vscode-terosHDL#760) https://github.com/TerosTechnology/vscode-terosHDL/issues/760

Describe the bug When configuring the schematic viewer for vhdl (GHDL + Yosys) and adding a path to start the oss-cad-suite environment, the TerosHDL: Global terminal doesn't produce any output, and the schematic viewer doesn't work.

The command used to activate the environment is: C:\oss-cad-suite\start.bat &, which works fine (eg. yosysis found) in a CMD-shell. This command is run, as per the suggestion in the field description above: Extra options passed before to run yowasp-yosys or yosys. Eg: 'conda activate base & ' or 'C:/OSS-CAD-SUITE/oss-cad-suite/start.bat & '. This might be related to starting a background process with &, and the terminal output is piped somewhere else?

When removing said command, output is again produced, but initializing the schematic viewer naturally fails:


Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) ❌ Some checks failed ❌


βŠ™ Selected backend: yosys_ghdl with installation path: "". πŸ”Ž Searching for the binary "yosys_ghdl" in the system path ❌ yosys_ghdl not found in the system path. Search executed with: "yosys --version" πŸ‘Ž The Schematic Backend installation path is not correctly configured. The binary could not be located in either the system path or the configured path. Please check the documentation.

This issue also doesn't occur when having ``C:\oss-cad-suite\environment.bat` in the same extra options field. However, the schematic viewer still isn't configured correctly:


Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) ❌ Some checks failed ❌


βŠ™ Selected backend: yosys_ghdl with installation path: "". πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat" βœ… yosys_ghdl found at "C:\oss-cad-suite\environment.bat" using the command: "C:\oss-cad-suite\environment.bat --version" πŸ”§ Schematic Backend was found; however, the installation path is not correctly configured. Ensure the path points to the binary folder, not the specific binary. Found in: "C:\oss-cad-suite\environment.bat"

How do I configure the schematic viewer correctly? What is meant to be passed in the "extra options" field when using oss-cad-suite?

Please complete the following information:

  • OS: Windows 11
  • Extention version: 7.0.3

β€” Reply to this email directly, view it on GitHub https://github.com/TerosTechnology/vscode-terosHDL/issues/760, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNN4R3RXEHWLTZBPF7QR532XZT6FAVCNFSM6AAAAAB2OP5AJKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHE3TEMBYG4ZTENY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

qarlosalberto avatar Apr 04 '25 11:04 qarlosalberto

I see. If it doesn't work in windows, please make a clear comment on this in the settings. The schematic viewer window is always empty.

As I said, when using start.bat &, no output is produced, so we can't see the error of the schematic viewer.

I tested it with environment.bat instead: Either as a "normal" command, or as a background process.

Configuring it as environment.bat (normal command, not as a background process) we get this output when verifying the setup:

*************************************************
Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) 
❌ Some checks failed ❌
*************************************************
βŠ™ Selected backend: yosys_ghdl with installation path: "". 
  πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat"
  βœ… yosys_ghdl found at "C:\oss-cad-suite\environment.bat" using the command: "C:\oss-cad-suite\environment.bat --version"
πŸ”§ Schematic Backend was found; however, the installation path is not correctly configured. Ensure the path points to the binary folder, not the specific binary. Found in: "C:\oss-cad-suite\environment.bat"

I get this output when running the schematic viewer (anonymized):

2025-04-04 13:45:49.772 [info] Executing: C:\WINDOWS\system32\cmd.exe  C:\WINDOWS\system32\cmd.exe /d /s /c "C:\oss-cad-suite\environment.bat yosys.exe -m ghdl -p "ghdl --std=08 -fsynopsys  --work=work "c:\Users\sigmuh\projects\test\top.vhd"  --work=work -e top; hierarchy -top top; proc; write_json C:\Users\sigmuh\.teroshdl_r2Mp9; stat""

From the end of the command we can also see the reason for the issue presented in #759, where many empty files are produced.

When running environment.bat & (as a background process), we get this output when verifying the setup:

*************************************************
Checking Schematic configuration (https://terostechnology.github.io/terosHDLdoc/docs/guides/schematic_viewer/installation) 
❌ Some checks failed ❌
*************************************************
βŠ™ Selected backend: yosys_ghdl with installation path: "". 
  πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat &\yosys.exe"
  ❌ yosys_ghdl not found at "C:\oss-cad-suite\environment.bat &\yosys.exe". Search executed with: "C:\oss-cad-suite\environment.bat &\yosys.exe --version"
  πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat &\yosys"
  ❌ yosys_ghdl not found at "C:\oss-cad-suite\environment.bat &\yosys". Search executed with: "C:\oss-cad-suite\environment.bat &\yosys --version"
  πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat &.exe"
  ❌ yosys_ghdl not found at "C:\oss-cad-suite\environment.bat &.exe". Search executed with: "C:\oss-cad-suite\environment.bat &.exe --version"
  πŸ”Ž Searching for the binary yosys_ghdl at "C:\oss-cad-suite\environment.bat &"
  ❌ yosys_ghdl not found at "C:\oss-cad-suite\environment.bat &". Search executed with: "C:\oss-cad-suite\environment.bat & --version"
  πŸ”Ž Searching for the binary "yosys_ghdl" in the system path
  ❌ yosys_ghdl not found in the system path. Search executed with: "yosys --version"
πŸ‘Ž The Schematic Backend installation path is not correctly configured. The binary could not be located in either the system path or the configured path. Please check the documentation.

This is the output when running the schematic viewer:

2025-04-04 13:46:37.966 [info] Executing: C:\WINDOWS\system32\cmd.exe  C:\WINDOWS\system32\cmd.exe /d /s /c "C:\oss-cad-suite\environment.bat & yosys.exe  -p "ghdl --std=08 -fsynopsys  --work=work "c:\Users\sigmuh\projects\test\top.vhd"  --work=work -e top; hierarchy -top top; proc; write_json C:\Users\sigmuh\.teroshdl_33Ej9; stat""
2025-04-04 13:46:38.225 [info] ERROR: No such command: ghdl (type 'help' for a command overview)

2025-04-04 13:46:38.237 [info] 
 /----------------------------------------------------------------------------\
 |  yosys -- Yosys Open SYnthesis Suite                                       |
 |  Copyright (C) 2012 - 2025  Claire Xenia Wolf <[email protected]>         |
 |  Distributed under an ISC-like license, type "license" to see terms        |
 \----------------------------------------------------------------------------/
 Yosys 0.49+21 (git sha1 772b9c0cf, x86_64-w64-mingw32-g++ 13.2.1 -O3)

-- Running command `ghdl --std=08 -fsynopsys  --work=work c:\Users\sigmuh\projects\test\top.vhd  --work=work -e top; hierarchy -top top; proc; write_json C:\Users\sigmuh\.teroshdl_33Ej9; stat' --

2025-04-04 13:46:38.245 [error] Yosys failed.

sigmuha avatar Apr 04 '25 11:04 sigmuha

It seems that oss-cad-suite doesn't support GHDL plugin for Yosys. Try this: https://github.com/ghdl/ghdl-yosys-plugin?tab=readme-ov-file#pre-built-packages

qarlosalberto avatar Apr 04 '25 12:04 qarlosalberto

Even though this isn't supported, these issues (as I see it) are related to not being able to see terminal output when using the recommended command .../start.bat &. This comment needs to be considered changed.

It also seems as the .../environment.bat command works better, where it seems to find "yosys_ghdl". However the command "C:\oss-cad-suite\environment.bat --version" seems strange, so I don't know the validity on that.

sigmuha avatar Apr 04 '25 12:04 sigmuha