Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in templates when instantiating module from file #12

Open
gmlarumbe opened this issue Dec 21, 2023 · 1 comment
Open

Error in templates when instantiating module from file #12

gmlarumbe opened this issue Dec 21, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@gmlarumbe
Copy link
Owner

The following error shows up if running verilog-ext-template-inst-auto-from-file with verilog-ts-mode:

  • Internal problem; use of syntax-ppss when cache may be corrupt

This is caused by the behaviour of verilog-auto, used by the AUTO_TEMPLATE construct for the instance template:

        ;; Snippet from `verilog-auto`:
        ;; ...
        ;; If we're not in verilog-mode, change syntax table so parsing works right
        (unless (eq major-mode 'verilog-mode) (verilog-mode))

verilog-auto will switch from verilog-ts-mode to verilog-mode which should not be the intended behaviour for template instantiation.

@gmlarumbe gmlarumbe changed the title Error in templates when instantiating instance from file Error in templates when instantiating module from file Dec 21, 2023
@gmlarumbe gmlarumbe added the bug Something isn't working label Dec 21, 2023
@gmlarumbe
Copy link
Owner Author

Current error can be worked around by switching to verilog-mode before running verilog-auto and then switching back to verilog-ts-mode:

    (if (eq major-mode 'verilog-ts-mode)
        (progn
          (verilog-mode)
          (verilog-auto)
          (verilog-ts-mode))
      (verilog-auto))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant