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

issue in compiling UDP with arrayed type #147

Closed
aveerubhotla-ventana opened this issue Jan 9, 2023 · 3 comments
Closed

issue in compiling UDP with arrayed type #147

aveerubhotla-ventana opened this issue Jan 9, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@aveerubhotla-ventana
Copy link

following is the sample UDP which was compiling fine on v.1.23.0, but not on v.1.25.2

property myudp {
type = string[];
component = reg | field;
};

addrmap top {
reg {
myudp = '{"hello"};
field { } f;
} regA;
};

error message:

if issubclass(self.valid_type, rdltypes.references.RefType):

TypeError: issubclass() arg 1 must be a class

@aveerubhotla-ventana aveerubhotla-ventana changed the title issue in compiling UDP with arrayed types issue in compiling UDP with arrayed type Jan 9, 2023
@mpriestleyidex
Copy link

I'm also seeing this. issubclass() is being passed an systemrdl.rdltypes.array.ArrayPlaceholder object, which (as the error message says) is an instance, not a class.

Error is coming from:

  File ".../systemrdl/properties/user_defined.py", line 42, in valid_types
    if issubclass(self.valid_type, rdltypes.references.RefType):

I don't know whether the check is wrong, or whether the thing passed to valid_type is wrong to start with.

@amykyta3
Copy link
Member

Thanks for reporting!
I refactored how UDPs are handled a few versions ago and must have missed something. Will look into it.

@amykyta3 amykyta3 added the bug Something isn't working label Jan 12, 2023
@amykyta3
Copy link
Member

Published fix in v1.25.3

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

No branches or pull requests

3 participants