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

[feature] Specify the build directory in the current workspace.

Open hwhsu1231 opened this issue 3 years ago • 4 comments

Can TerosHDL provide the settings to let us specify the build directory? By default, it will be generated at C:\Users\<username>\.teroshdl\build. But I want to generate at ${workspaceFolder}/build.

hwhsu1231 avatar Feb 22 '22 06:02 hwhsu1231

It's a good idea.

qarlosalberto avatar Feb 22 '22 11:02 qarlosalberto

I think on top of allowing users to change the build location, TerosHDL should utilize the current working directory of the VSCode as a default directory for builds. Or use a build subfolder relative to the project.yml as a default for that specific project.

The second option requires this issue https://github.com/TerosTechnology/vscode-terosHDL/issues/312 to be solved. But, the benefits of a relative build directory is quite a lot.

If you make the project.yml path an environment or internal variable, people can pass it to the other linting tools (for example icarus -y $project_path). This then can be used to solve these: https://github.com/TerosTechnology/vscode-terosHDL/issues/325 types of issues.

This can also help the waveform viewer. Currently, vcd files are generated at .teroshdl/build directory. It's not possible to directly see the output files in VSCode if the directory is not open. You have to change your working directory. Hence, if the build folder is in a sub-directory, the problem is solved.

Not only that, currently, everything in the build directory is overwritten when a new build starts. So, to compare the waveforms of different runs, you have to manually backup the output files. This would be solved too.

I also occasionally run automated scripts to parse and compare the custom outputs of different testbenches. As you can understand, manually backing things up before the next build is the only option right now. That's why I still haven't completely switched to TerosHDL.

hakan-demirli avatar Aug 20 '22 17:08 hakan-demirli

Thanks for the long description. I will implement

qarlosalberto avatar Aug 21 '22 17:08 qarlosalberto