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

panic by passing modport interface to function #1128

Closed
nananapo opened this issue Dec 7, 2024 · 0 comments · Fixed by #1130
Closed

panic by passing modport interface to function #1128

nananapo opened this issue Dec 7, 2024 · 0 comments · Fixed by #1130
Labels
bug Something isn't working

Comments

@nananapo
Copy link
Contributor

nananapo commented Dec 7, 2024

interface InterfaceA {
    var _a: logic;
    modport master {
        _a: input,
    }
}

module Top (
    a: modport InterfaceA::master,
) {
    function myfunc (
        c: input logic,
    ) -> logic {
        return 1;
    }
    let _b: logic = myfunc(a);
}
thread 'main' panicked at crates/analyzer/src/handlers/check_var_ref.rs:187:34:
internal error: entered unreachable code
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: <veryl_analyzer::handlers::check_var_ref::CheckVarRef as veryl_parser::generated::veryl_grammar_trait::VerylGrammarTrait>::expression_identifier
   4: veryl_parser::veryl_walker::VerylWalker::expression_identifier
   5: veryl_parser::veryl_walker::VerylWalker::expression11
   6: veryl_parser::veryl_walker::VerylWalker::expression10
   7: veryl_parser::veryl_walker::VerylWalker::expression09
   8: veryl_parser::veryl_walker::VerylWalker::expression08
   9: veryl_parser::veryl_walker::VerylWalker::expression07
  10: veryl_parser::veryl_walker::VerylWalker::expression06
  11: veryl_parser::veryl_walker::VerylWalker::expression05
  12: veryl_parser::veryl_walker::VerylWalker::expression04
  13: veryl_parser::veryl_walker::VerylWalker::expression03
  14: veryl_parser::veryl_walker::VerylWalker::expression02
  15: veryl_parser::veryl_walker::VerylWalker::expression01
  16: veryl_parser::veryl_walker::VerylWalker::expression
  17: veryl_parser::veryl_walker::VerylWalker::argument_item
  18: veryl_parser::veryl_walker::VerylWalker::function_call
  19: veryl_parser::veryl_walker::VerylWalker::expression11
  20: veryl_parser::veryl_walker::VerylWalker::expression10
  21: veryl_parser::veryl_walker::VerylWalker::expression09
  22: veryl_parser::veryl_walker::VerylWalker::expression08
  23: veryl_parser::veryl_walker::VerylWalker::expression07
  24: veryl_parser::veryl_walker::VerylWalker::expression06
  25: veryl_parser::veryl_walker::VerylWalker::expression05
  26: veryl_parser::veryl_walker::VerylWalker::expression04
  27: veryl_parser::veryl_walker::VerylWalker::expression03
  28: veryl_parser::veryl_walker::VerylWalker::expression02
  29: veryl_parser::veryl_walker::VerylWalker::expression01
  30: veryl_parser::veryl_walker::VerylWalker::expression
  31: veryl_parser::veryl_walker::VerylWalker::generate_item
  32: veryl_parser::veryl_walker::VerylWalker::module_group
  33: veryl_parser::veryl_walker::VerylWalker::description_item
  34: veryl_parser::veryl_walker::VerylWalker::description_group
  35: veryl_analyzer::analyzer::Analyzer::analyze_pass2
  36: veryl::cmd_build::CmdBuild::exec
  37: veryl::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@dalance dalance added the bug Something isn't working label Dec 9, 2024
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

Successfully merging a pull request may close this issue.

2 participants