vasg issueshttp://opensource.ieee.org/groups/vasg/-/issues2020-11-26T22:32:37Zhttp://opensource.ieee.org/vasg/Packages/-/issues/1Wrong object class and mode for to_string(call_path ...)2020-11-26T22:32:37ZPatrick LehmannWrong object class and mode for to_string(call_path ...)As reported by Abhijit Chakrabarty via email/reflector on 26.11.2020:
> Hi Team,
> We are facing this issue while implementing vhdl-19. Please help us.
>
> Regards,
> Abhijit
>
> Package std.env in Vhdl 2019 has following subprog...As reported by Abhijit Chakrabarty via email/reflector on 26.11.2020:
> Hi Team,
> We are facing this issue while implementing vhdl-19. Please help us.
>
> Regards,
> Abhijit
>
> Package std.env in Vhdl 2019 has following subprogram specification:
> ```vhdl
> type CALL_PATH_VECTOR_PTR is access CALL_PATH_VECTOR;
> impure function TO_STRING (call_path : CALL_PATH_VECTOR_PTR; Separator : STRING := "" & LF ) return STRING;
> ```
>
> For the first argument, `call_path`, both the object class
> (signal/variable/constant) and the mode (in/out/inout) are not
> specified. We take class `constant` and mode `in`.
>
> 1076-2019 Section 4.2.2 describes the formal parameters for subprograms.
>
> Section 4.2.2.1 NOTE1 says:
> > NOTE 1 — Variable class parameters of access and protected types are
> > allowed for procedures and impure functions.
>
> So it is only allowed when object class is variable. As `call_path` is
> `constant`, we error out.
>
> `env.vhdl(255): ERROR: formal constant 'call_path' cannot be of an access type`
>
>
> To infer the object class and mode:
> > **Section 4.2.2.1:**
> > For those parameters with modes, the only modes that are allowed for
> > formal parameters of a procedure or an impure function are in, inout,
> > and out. If the mode is in and no object class is explicitly
> > specified, constant is assumed.
> >
> > For those parameters with modes, the only mode that is allowed for
> > formal parameters of a pure function is the mode in (whether this mode
> > is specified explicitly or implicitly). The object class shall be
> > constant, signal, or file. If no object class is explicitly given,
> > constant is assumed.
>
> It does not explicitly mention the default mode and object class for
> impure function. We take mode `in` and class `constant`.http://opensource.ieee.org/vasg/Packages/-/issues/2Delete abandoned branch 'master'2021-05-13T20:40:30ZPatrick LehmannDelete abandoned branch 'master'@jgay branch 'master' is abandoned. Please delete it.
-------------
/cc @jim@jgay branch 'master' is abandoned. Please delete it.
-------------
/cc @jimJosh Gayj.gay@ieee.orgJosh Gayj.gay@ieee.org