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

Adds class struct variable support. #212

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

QuantamHD
Copy link
Contributor

Signed-off-by: Ethan Mahintorabi [email protected]

Signed-off-by: Ethan Mahintorabi <[email protected]>
@hzeller hzeller requested a review from kbieganski February 4, 2022 22:07
@QuantamHD
Copy link
Contributor Author

QuantamHD commented Feb 4, 2022

Comes up in situations like the following

// mystruct::the_struct declaration omitted

function automatic mystruct::the_struct do_stuff_function;
  input mystruct::the_struct a;
  begin
    do_stuff_function = a;
  end
endfunction

@QuantamHD
Copy link
Contributor Author

The class_var was removed from our UHDM with this change in Surelog chipsalliance/Surelog#2539, that was found when I reported chipsalliance/Surelog#2537.

@kamilrakoczy
Copy link
Collaborator

kamilrakoczy commented Feb 8, 2022

Looks like this is issue in the Surelog itself. I've created issue in Surelog for this: chipsalliance/Surelog#2550

I've tested example that you reported in: chipsalliance/Surelog#2537, using typedefs directly from package gives vpiClassVar as variable type, but it should give vpiStructVar. When we import whole package, and then use typedefs, Surelog gives us correct vpiStructVar, e.g.:

package b;
  typedef struct packed {
    logic                one;
  } foo_bar_t;

endpackage : b

package aa;
  import b::*;
  function automatic foo_bar_t foo_bar;
    foo_bar_t y;

  endfunction : foo_bar
endpackage : aa

kbieganski
kbieganski previously approved these changes Feb 8, 2022
@kbieganski kbieganski dismissed their stale review February 8, 2022 11:09

We'll wait for the Surelog issue to be resolved and decide what to do next.

@hzeller
Copy link
Collaborator

hzeller commented Apr 26, 2023

Is this resolved ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants