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

Infer tool options from EDAM file

Open olofk opened this issue 4 years ago • 3 comments

When opening an EDAM file, TerosHDL should be able to set the toplevel and tool options from that file.

(Still new, so haven't yet figured out if TerosHDL supports setting toplevel parameters/generics/plusargs/defines, but if so, these could be picked up from the EDAM as well)

olofk avatar Sep 30 '21 13:09 olofk

Currently when you add a EDAM file TerosHDL sets: file list, project name and top level. When you save a project as EDAM TerosHDL saves: file list, project name, top level and the tool configuration.

There is an architecture problem. The tool configuration is global. When you set a tool configuration in TerosHDL you are setting that configuration for all the projects.

My idea for the next major version is to do the configuration local for each project. Then when you set the tool configuration it will save for the selected project. I also want to add support for parameters/generics/plusargs/defines.

qarlosalberto avatar Oct 09 '21 12:10 qarlosalberto

Ah sorry. My bad. I saw later that toplevel was already handled.

Project-specific tool configurations and parameterization would be nice. I tried to get familiar with the codebase myself hoping to contribute but I haven't got far enough to be of help yet. Especially for parameters my first question would be what the UI should look like to set those things

olofk avatar Oct 09 '21 13:10 olofk

The configuration HTML page is built from a python script, so it's very easy to add new parameters:

  • Configuration declaration: https://github.com/TerosTechnology/vscode-terosHDL/blob/master/resources/project_manager/config_general.yml and https://github.com/TerosTechnology/vscode-terosHDL/blob/master/resources/project_manager/config_tool.yml
  • Python script: https://github.com/TerosTechnology/vscode-terosHDL/blob/master/resources/project_manager/generate_html.py
  • It's called from: https://github.com/TerosTechnology/vscode-terosHDL/blob/master/package.json#L787

I plan to do a complete refactoring of the TerosHDL project manager, so it will be more flexible to add FuseSoC projects.

Currently the missing parameters are: "hooks", "parameters" and "vpi". To start I could create a configuration tab (called General tools parameters?) with the fields: "Hooks", "Parameters" and "VPI". To make it easier it could be a input text field where the parameters are inserted comma separated, e.g: parameter_a=9,parameter_b="RAM".

qarlosalberto avatar Oct 11 '21 14:10 qarlosalberto