Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    patgro1
    @patgro1
    it still does not detect any dependencies though ...
    Andre Souto
    @suoto
    For systemverilog, dependencies are package use clauses, definition of virtual classes or includes. Includes won't show up on the dependencies because they're not compile before, they're added via an "include" parameter of the compiler
    patgro1
    @patgro1
    module instantiated won't be part of the dependencies?
    Andre Souto
    @suoto
    Right now that's supported only when using ModelSim/Questa btw
    I'm not that familiar with SV but afaik, you don't need to compile them before like you do on VHDL
    In VHDL if you declare a component, you don't need to compile the actual entity either -- it gets delayed to before starting a sim. I'm guessing Verilog works this way as well because compilation does not fail
    patgro1
    @patgro1
    Yeah
    But you don’t need to declare the entity in advance in sv
    You just intantiate it
    Instantiate*
    TJ Wiegman
    @tjwieg
    I'm having trouble getting the VS Code extension to do actually do anything my VHDL files
    Can someone point me in the right direction?
    I'm fairly sure that ghdl, ghdl-ls, and hdl_checker are all installed correctly on my machine. None of them throw errors when I call them from the terminal, so I believe they're in my path properly, too.
    But when I load up a simple VHDL program (see image linked above), I can't even get it to do syntax highlighting. Is there another config I need to set up, or something?
    TJ Wiegman
    @tjwieg
    I'm on:
    hdl_checker version 0.6.13
    Python version 3.6.9
    Ubuntu 18.04 LTS
    and ghdl --version outputs the following
    GHDL 0.37-dev (v0.36-1576-g76e2f6b3) [Dunoon edition]
    Compiled with GNAT Version: 7.4.0
    llvm code generator
    @suoto I'd appreciate a helping hand whenever you next get a few free moments :)
    Andre Souto
    @suoto

    Hi @tjwieg , just a heads up: HDL Checker doesn't provide syntax highlighting, only linting. :)

    From your screenshot, I can tell that HDL Checker is installed correctly. The message shown is related to HDL Checker's config file and it means one of:

    1) you have a config file but this file doesn't include the file you're currently editing
    2) you didn't specify a config file, so HDL Checker created one for you and the file you're editing is not there. When no config file is specified, HDL Checker will search the folder you opened on VS Code for RTL files and generated one for you, so this message will appear whenever the file has been added after HDL Checker searched or if the file is outside the VS Code folder (if any)

    (There should some info pop ups showing what happened)

    Besides that, it seems to be working as expected (when HDL Checker can't find any compiler, it should complain that it failed to resolve use ieee.std_logic_1164.all to a path).
    If you deliberately insert an error, do you see that being flagged?

    Also, HDL Checker only needs ghdl itself, not ghdl-ls. GHDL is a simulator which ghdl-ls is based on, but both HDL Checker and ghdl-ls are language servers (hopefully I didn´t make things even more confusing :) )
    TJ Wiegman
    @tjwieg
    Ah, thanks for clarifying. I must have misread the docs, going back and looking at them, you only mention ghdl itself, not ghdl-ls. I guess I picked that up by overthinking the ghld docs. (Oops!)
    To add a file to the config, do I just add the filename to the sources array in the json? E.g. "sources" = ["design.vhdl"]
    Andre Souto
    @suoto
    Yes. Relative paths will have the path to the config file prepended
    TJ Wiegman
    @tjwieg
    Strike that. I restarted vs code and it seems that cache.json automatically populated with my file. Do I just need to restart the project each time I add a new file? Or is there a command to tell the extension to re-search for new RTL files?
    Thanks so much for your help! :)
    Andre Souto
    @suoto

    No worries, sometimes I might take a bit to get back, but it's the best place to ask, make suggestions etc. Thanks for tying out HDL Checker :)

    So, closing a reopening should usually do the trick, I normally just delete the folder that has the cache.json file to trigger a rebuild without restarting the editor

    Adding a command to do this sounds a good idea though
    TJ Wiegman
    @tjwieg
    Maybe a "refresh" button on the editor bar?
    Where the "run" button from the Code Runner extension is (if you're familiar with that one)
    Andre Souto
    @suoto
    I was thinking something like ctrl+shit+p to access the command pallete and then select a command. Search is fuzzy, so typing hdlres should ideally match a command name HDL Checker restart
    The UI is too personal I think, I rather not mess with that
    Rafael Pereira
    @rafaelnp
    I am trying to add verilator to the ci, and added linux: VERILATOR_PATH = {env:VERILATOR_PATH:{env:HOME}/usr/bin/} to tox.ini and when I run the ci I get the following error: FileNotFoundError: [Errno 2] No such file or directory: 'verilator_bin': 'verilator_bin'. However when I run hdl_checker + neovim the verilator binary is found. Did I forget something? Any thoughts?
    Rafael Pereira
    @rafaelnp
    @rafaelnp I was able to saolve it here :)
    Andre Souto
    @suoto
    cool! you'll need to build a new docker image that includes verilator. Best would be to build with a separate Dockerfile (just because of Vivado not being included in the docker build scripts):
    FROM suoto/hdl_checker_test
    
    RUN apt-get update -qq            && \
        apt-get install -qq verilator && \
        apt-get clean                 && \
        rm -rf /var/lib/apt/lists/*
    Benajmin
    @Baldur42
    Really nice to see a alternative to Sigasi :) Installing under python 3.8.2 package six was missing. I did not get xvhdl (Vivado 2019.2) working. However installed GHDL and that works fine. I'm running windows 10. Great initiative @suoto I really appreciate it !
    Andre Souto
    @suoto
    Glad to hear it's working! Will add six to the required packages, thanks for the info!
    Benajmin
    @Baldur42

    Env:
    centOS 7.7
    hdl-checker 0.6.13
    python 3.6.8.
    vivado 2019.2
    modelsim 10.6c

    Having some trouble. It picks up xvhdl even though vcom and vlog is pressent.

    Trying to add flags in _hdl_checker.config "-2008" does not seem to proppagate.

    • The file gave no syntax errors when runing xvhdl -2008 <myfile>.
    • I have tried to set the flag both under "vhdl" and "sources".
    • Modified copy paste of .json from the wiki
    Benajmin
    @Baldur42
    Moving from Linux to windows made me use _hdl_checker.config. Changed to proper linux name .hdl_checker.config and it works. Still choses xvhdl though. Would be nice to set prefered simulator
    Andre Souto
    @suoto
    Hi @Baldur42, you can use "builder" : "[msim|ghdl|xvhdl]"in the config file to force the backend tool. This is not on the wiki yet, I didn't have the time yet to think through all the implications to support that properly. Compiler specific flags is the most obvious one, but it could be anything really.
    Benajmin
    @Baldur42
    @suoto confirmed that "builder": "msim" works. I did get aloot of errors about vunit paths not found, rm -rf .hdl_checker to let it refresh fixed this issue.
    Andre Souto
    @suoto
    yes, switching the builder without cleaning the cache will confuse the database indeed. At the moment the server will not clear cached data when that happens but that should be easy to add really
    glad it worked :-)
    Benajmin
    @Baldur42
    @suoto such a cache clean would be a really neat ease of use feature later on :)
    Benajmin
    @Baldur42
    @suoto Hi again :) for the VSC implementation of HDL checker. Would it be possible to add a Json schema to help out with the config file? Created a smal git to show it off Here
    Christian Birk Sørensen
    @chrbirks
    Hi. Is there a reason why errors encountered in runShellCommand in utils.py is logged with debug severity instead of error? It took me a while to find since normal logging severity is info.
    Andre Souto
    @suoto
    Hi @chrbirks, that function is only used to run the builders and some of them actually write to stderr when a compilation fails, so it's not a real issue in the edit/fix/save cycle. Ideally a builder's output should either be parsed (and dealt with appropriately) or it should be logged as either info or warning
    Vitaly Konovalov
    @arnfol
    Hi everyone!

    I am new here and trying to use hdl_checker in VSCode attached to WSL. Simulator xsim on Vivado 2018.3, environment: Win10 WSL2 (Ubuntu 18.04). Getting the following error in vscode output:

    [Error - 1:32:23 PM] Request textDocument/hover failed.
      Message: TypeError: expected string or bytes-like object
      Code: -32602 
    {'traceback': ['  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/pygls/protocol.py", line 324, in _handle_request\n    self._execute_request(msg_id, handler, params)\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/pygls/protocol.py", line 249, in _execute_request\n    self._send_response(msg_id, handler(params))\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/lsp.py", line 581, in onHover\n    return self.hover(params)\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/lsp.py", line 451, in hover\n    element = self.getElementAtPosition(path, params.position)\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/lsp.py", line 435, in getElementAtPosition\n    self.checker.database.getDesignUnitsByPath,\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/core.py", line 138, in database\n    self._updateConfigIfNeeded()\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/core.py", line 209, in _updateConfigIfNeeded\n    self.configure(config)\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/core.py", line 236, in configure\n    for path, library, flags in getVunitSources(self._builder):\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/builder_utils.py", line 140, in getVunitSources\n    sources += _getSourcesFromVUnitModule(VUnit_VHDL)\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/hdl_checker/builder_utils.py", line 198, in _getSourcesFromVUnitModule\n    vunit_project.add_com()\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/vunit_hdl-4.4.1rc0-py3.8.egg/vunit/ui/__init__.py", line 1010, in add_com\n    self._builtins.add("com")\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/vunit_hdl-4.4.1rc0-py3.8.egg/vunit/builtins.py", line 46, in add\n    self._builtins_adder.add(name, args)\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/vunit_hdl-4.4.1rc0-py3.8.egg/vunit/builtins.py", line 355, in add\n    function(**args)\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/vunit_hdl-4.4.1rc0-py3.8.egg/vunit/builtins.py", line 193, in _add_com\n    self._add_files(VHDL_PATH / "com" / "src" / "*.vhd")\n', '  File "/home/arnfol/anaconda3/lib/python3.8/site-packages/vunit_hdl-4.4.1rc0-py3.8.egg/vunit/builtins.py", line 57, in _add_files\n    for file_name in glob(pattern):\n', '  File "/home/arnfol/anaconda3/lib/python3.8/glob.py", line 21, in glob\n    return list(iglob(pathname, recursive=recursive))\n', '  File "/home/arnfol/anaconda3/lib/python3.8/glob.py", line 43, in _iglob\n    if not has_magic(pathname):\n', '  File "/home/arnfol/anaconda3/lib/python3.8/glob.py", line 151, in has_magic\n    match = magic_check.search(s)\n']}

    No syntax highlighting in vhdl files and extension seem to be dead.

    Installed extension & python module according to installation instructions. Could anyone guide me what I am doing wrong?

    Seth Gower
    @SethGower

    Hi Suoto. I was wondering if you could offer some support on something. First, I absolutely love hdl_checker, it's fantastic. I use it for work, it's so nice to see errors in my vhdl before I do the long compilation process (large project). Not sure if this is possible, or if I am just doing something incorrectly. Our code is stored in multiple reposititories that are all cloned side by side. Something like:

    ./
    ├── a
    ├── b
    └── c
    
    3 directories, 0 files

    where a, b, and c are their own repos with VHDL code (and importantly a .git directory). It seems that hdl_checker stops looking for the .hdl_checker.config when it finds the git repo root, is that true? Can I toggle this? So currently I need something like

    .
    ├── a
    │   └── .hdl_checker.config
    ├── b
    │   └── .hdl_checker.config
    └── c
        └── .hdl_checker.config
    
    3 directories, 3 files

    but I want something like

    .
    ├── a
    ├── b
    ├── c
    └── .hdl_checker.config
    
    3 directories, 1 file

    Is this possible? Can I toggle the searching to not stop at .git?

    Seth Gower
    @SethGower
    if it's relevent, I am using NeoVim with CoC
    Seth Gower
    @SethGower

    Nevermind. I got it working. Turns out it was CoC's root detection. Made my coc config this

            "hdlChecker": {
                "command": "hdl_checker",
                "args": [
                    "--lsp"
                ],
                "filetypes": [
                    "vhdl"
                ],
                "rootPatterns": [".hdl_checker.config"]
            }

    and that did it