cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
msaideroglu
Observer
Observer
771 Views
Registered: ‎11-19-2018

[8-6038] can not resolve hierarchical name

Jump to solution

There is a very simple use of strcuts but I'm getting this error. Why any idea?

 

package my_pkg;

typedef struct packed{
}struct1;

typedef struct packed{
struct1 s;
}struct2;

endpackage

module my_module();
input struct2 in_s;

in_s.s = ...

endmodule

 

0 Kudos
1 Solution

Accepted Solutions
aher
Xilinx Employee
Xilinx Employee
759 Views
Registered: ‎07-21-2014
Hi @msaideroglu

You need to import the package into module "my_module1" to use it.
eg-
module my_module1 import my_pkg::*;
(input struct2..
);

Also what are the variables of structure struct1?

-Shreyas
----------------------------------------------------------------------------------------------
Try to search answer for your issue in forums or xilinx user guides before you post a new thread.

Kindly note- Please mark the Answer as "Accept as solution" if information provided solves your query.
Give Kudos (star provided in right) to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

View solution in original post

3 Replies
aher
Xilinx Employee
Xilinx Employee
760 Views
Registered: ‎07-21-2014
Hi @msaideroglu

You need to import the package into module "my_module1" to use it.
eg-
module my_module1 import my_pkg::*;
(input struct2..
);

Also what are the variables of structure struct1?

-Shreyas
----------------------------------------------------------------------------------------------
Try to search answer for your issue in forums or xilinx user guides before you post a new thread.

Kindly note- Please mark the Answer as "Accept as solution" if information provided solves your query.
Give Kudos (star provided in right) to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

View solution in original post

markcurry
Scholar
Scholar
714 Views
Registered: ‎09-16-2009

You can also call out the package name explicitly:

package my_pkg;
typedef struct packed{
} struct1;

typedef struct packed{
  struct1 s;
} struct2;
endpackage

module my_module
(
  input my_pkg::struct2 in_s
);

  in_s.s = ...
endmodule

Regards,

Mark

anusheel
Moderator
Moderator
662 Views
Registered: ‎07-21-2014

@msaideroglu 

Do you have any further queries on this issue? Importing the package definition should resolve the issue.
Please feel free to close the thread by marking any of the above answers if the issue is now resolved.

Thanks
Anusheel 

0 Kudos