TerosTechnology / vscode-terosHDL

VHDL and Verilog/SV IDE: state machine viewer, linter, documentation, snippets... and more!
https://terostechnology.github.io/terosHDLdoc/
536 stars 44 forks source link

FuseSoC Support [Enhancement Draft] #212

Open saw235 opened 2 years ago

saw235 commented 2 years ago

Add support for FuseSoC HDL package manager.

olofk commented 2 years ago

Would love this as well. Happy to assist from the FuseSoC side when I can

qarlosalberto commented 2 years ago

It would be really nice. First I need to play with FuseSoC, so I can imagine how to do the graphical interface.

olofk commented 2 years ago

Sounds like a good plan to think of the user experience first. Just let me know if you need anything from me

qarlosalberto commented 2 years ago

@olofk could be possible to transform from .core project to array of EDAM projects, or will we lost any functionality? Maybe the generators? (I need to play with them)

olofk commented 2 years ago

Well, technically FuseSoC is pretty much only a .core to EDAM converter :) There are similarities but also some notable differences between .core files and EDAM files. Generators, as you mention, is one of those. To give some more background, .core files were intended as human-writable input files while EDAM files were intended more like tool-to-tool files that were generated from something else. Some of the things in both file formats are very similar like parameters or files, but perhaps the biggest difference (and the main complexity of FuseSoC) is the dependency handling. FuseSoC is a package manager like apt, rpm or npm and has a built-in sat solver for handling complex dependencies.

qarlosalberto commented 2 years ago

I certainly haven't thought of all the aspects... :sweat_smile: :sweat_smile:

I'm trying to imagine how integrate FuseSoC in TerosHDL. For blinky example (https://github.com/fusesoc/blinky/blob/master/blinky.core) TerosHDL could create one FuseSoC project. The FuseSoc project will contain N sub projects, based on the targets. Each sub project will have tool options and file list.

But, what happen with generators and other complex features? Could you describe a possible workflow from the point of view of the user? How would be the GUI?

A nice feature could be to have a menu (under TerosHDL project manager) with the FuseSoC libraries. Similar to a common package manager.

smgl9 commented 2 years ago

I like the idea of TerosHDL subprojects. One project (based on .core file) could be unfolded into several subprojects.

From user perspective each project could be executed independently and the top project would include the files of each subproject. These projects could be nested in TerosHDL project manager view.

Regarding to configurations, the top project would include the tool options, and after the dependencies are solved, each subproject would have the configurations of the top project. After that any subproject could be executed with different configurations, like any other project.

This would give us the possibility to nest other projects that are not related in the beginning, and maybe create a .core file from the configuration of nested projects.

Of course there are many challenges to get there. But from system and usability perspective makes sense for me.

What do you think?

WisniewskiP commented 1 year ago

I'm using FuseSoc to build our project for a few months it works great. At this moment I'm searching for better IDE support. we are using VSCode for many different project with different technologies and your extension would be great.

I have suggestion regarding "loading" FuseSoc project. I think you could use two steps approach:

  1. run fusesoc --setup to generate EDAM files
  2. read generated EDAM files

you could observer .core files to rerun setup when one of those changes.

Similar approach is used by cmake plugin that we are using for c++ projects.

this would help with building top projects, discovering sub-cores may need some extra effort.