Khushi Posted April 5, 2023 Report Share Posted April 5, 2023 For a Systemc port, sc_port<sc_signal_in_if<bool> > out, the IPxact definition is like <spirit:port> <spirit:name>out</spirit:name> <spirit:transactional> <spirit:transTypeDef> <spirit:typeName spirit:constrained="false">sc_port</spirit:typeName> </spirit:transTypeDef> <spirit:service> <spirit:initiative>requires</spirit:initiative> <spirit:serviceTypeDefs> <spirit:serviceTypeDef> <spirit:typeName spirit:constrained="false" spirit:implicit="true">sc_signal_in_if</spirit:typeName> <spirit:parameters> <spirit:parameter> <spirit:name>DATA_TYPE</spirit:name> <spirit:value>bool</spirit:value> </spirit:parameter> </spirit:parameters> </spirit:serviceTypeDef> </spirit:serviceTypeDefs> </spirit:service> </spirit:transactional> </spirit:port> But I am confused how to express sc_port<sc_signal_in_if<sc_uint<DATA_WIDTH> > out, where DATA_WIDTH is a module template parameter ? Thanks Khushi Quote Link to comment Share on other sites More sharing options...
kock Posted April 11, 2023 Report Share Posted April 11, 2023 Hi Kushi, the easy way is to use <spirit:typeName spirit:constrained="false" spirit:implicit="true">sc_signal_in_if<sc_uint<DATA_WIDTH> ></spirit:typeName> and skip the parameters section. You need to describe DATA_WIDTH as a module parameter also. Alternatively, instead of using < and >, you can nest 3 serviceTypeDef elements as describe in 6.12.20.2 in 1685-2014. In each of these 3 elements you describe sc_signal_in_if, sc_uint, and DATA_WIDTH. Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Khushi Posted May 8, 2023 Author Report Share Posted May 8, 2023 Hi Erwin Do you mean something like following <ipxact:port> <ipxact:name>out</ipxact:name> <ipxact:transactional> <ipxact:initiative>requires</ipxact:initiative> <ipxact:transTypeDefs> <ipxact:transTypeDef> <ipxact:typeName exact="true">sc_port</ipxact:typeName> <ipxact:typeParameters> <ipxact:serviceTypeDef> <ipxact:typeName implicit="false">sc_signal_in_if</ipxact:typeName> <ipxact:typeParameters> <ipxact:serviceTypeDef> <ipxact:typeName implicit="false">sc_uint</ipxact:typeName> <ipxact:typeParameters> <ipxact:typeParameter> <ipxact:name>param1</ipxact:name> <ipxact:value>DATA_WIDTH</ipxact:value> </ipxact:typeParameter> </ipxact:typeParameters> </ipxact:serviceTypeDef> </ipxact:typeParameters> </ipxact:serviceTypeDef> </ipxact:typeParameters> </ipxact:transTypeDef> </ipxact:transTypeDefs> </ipxact:transactional> </ipxact:port> Thanks Khushi Quote Link to comment Share on other sites More sharing options...
kock Posted May 9, 2023 Report Share Posted May 9, 2023 Indeed! 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.