ghdl-language-server icon indicating copy to clipboard operation
ghdl-language-server copied to clipboard

Usage section missing details

Open dstadelm opened this issue 4 years ago • 1 comments

I'm very interested in ghdl_ls there are however some starting hurdles that I've got to overcome.

1. How does a project have to be setup for multiple libraries (not only work). Multiple sections?

{
    "options": {
        "ghdl_analysis": [
            "--workdir=lib1",
            "--ieee=synopsys",
            "-fexplicit"
        ]
    },
    "files": [
...
    ]
}
{
    "options": {
        "ghdl_analysis": [
            "--workdir=lib2",
            "--ieee=synopsys",
            "-fexplicit"
        ]
    },
    "files": [
...
    ]
}

2. Can patterns be used for "files"?

    "files": [
        { "file": "rtl/**/hdl/*.vhd",           "language": "vhdl" },
        { "file": "assembly/core_fpga.vhd", "language": "vhdl" },
        { "file": "sim/tb_core.vhd",        "language": "vhdl" }
    ]

3. What alternatives to "vhdl" are there for "language", doesn't ghdl only support vhdl anyway?

dstadelm avatar Jul 03 '20 07:07 dstadelm

  1. How does a project have to be setup for multiple libraries (not only work). Multiple sections? { "options": { "ghdl_analysis": [ "--workdir=lib1", "--ieee=synopsys", "-fexplicit" ] }, "files": [ ... ] } { "options": { "ghdl_analysis": [ "--workdir=lib2", "--ieee=synopsys", "-fexplicit" ] }, "files": [ ... ] }

Currently you cannot. You have to first analyze all the files not in the work library and create a project for the work library. For sure, that needs to be changed.

I propose to add a library attribute per file.

  1. Can patterns be used for "files"? "files": [ { "file": "rtl/**/hdl/*.vhd", "language": "vhdl" }, { "file": "assembly/core_fpga.vhd", "language": "vhdl" }, { "file": "sim/tb_core.vhd", "language": "vhdl" } ]

No. The project file is low-level and files must be explicit.

  1. What alternatives to "vhdl" are there for "language", doesn't ghdl only support vhdl anyway?

All the non-vhdl files are ignored.

tgingold avatar Jul 04 '20 02:07 tgingold