Khushi Posted February 1, 2023 Report Share Posted February 1, 2023 For folllowing SystemC module template <typename T> // type parameter class testModule : public sc_module { public: testModule(sc_module_name modnamemodname, string portname) {} What is the correct representation of portname parameter in ipxact <ipxact:moduleParameter parameterId="ip_config" resolve="user" type="string"> <ipxact:name>portname</ipxact:name> <ipxact:value>ABC</ipxact:value> #without double quote </ipxact:moduleParameter> or <ipxact:moduleParameter parameterId="ip_config" resolve="user" type="string"> <ipxact:name>portname</ipxact:name> <ipxact:value>"ABC"</ipxact:value> #without double quote </ipxact:moduleParameter> If the correct way is without double quote(first option above) then how the tool decides wehther the value is actually "ABC" and not the another parameter value with parameter id ABC and vice versa Thanks Khushi Quote Link to comment Share on other sites More sharing options...
Khushi Posted March 1, 2023 Author Report Share Posted March 1, 2023 Hello Do the value need to be in quoted string for parameters with type="string". For example <ipxact:moduleParameter parameterId="ip_config" resolve="user" type="string"><ipxact:name>portname</ipxact:name><ipxact:value>"ABC"</ipxact:value> #without double quote</ipxact:moduleParameter> If no, then how the tool determine if the value (ABC) is actual value or an expression based on another parameter id(ABC) ? Thanks Quote Link to comment Share on other sites More sharing options...
Jason H Posted March 6, 2023 Report Share Posted March 6, 2023 Since moduleParameter values are expressions, then string literals must be quoted, so this version is correct: <ipxact:moduleParameter parameterId="ip_config" resolve="user" type="string"> <ipxact:name>portname</ipxact:name> <ipxact:value>"ABC"</ipxact:value> </ipxact:moduleParameter> Otherwise, as you mentioned, a tool would parse the value and see ABC as an identifier (parameterId reference) which is not what you want. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.