Winnie Posted November 15 Report Share Posted November 15 Let's say I have the following structured port in my component. How do I reuse this structured port in the same component (i.e., with a different name)? <!-- apb structured port --> <ipxact:port> <ipxact:name>apb</ipxact:name> <ipxact:structured packed="true"> <ipxact:struct direction="out"/> <ipxact:subPorts> <ipxact:subPort> <ipxact:name>addr</ipxact:name> <ipxact:wire> <ipxact:direction>in</ipxact:direction> <ipxact:vectors> <ipxact:vector> <ipxact:left>clog2(RANGE_id)-1</ipxact:left> <ipxact:right>0</ipxact:right> </ipxact:vector> </ipxact:vectors> </ipxact:wire> </ipxact:subPort> <ipxact:subPort> <ipxact:name>prot</ipxact:name> <ipxact:wire> <ipxact:direction>in</ipxact:direction> <ipxact:vectors> <ipxact:vector> <ipxact:left>2</ipxact:left> <ipxact:right>0</ipxact:right> </ipxact:vector> </ipxact:vectors> </ipxact:wire> </ipxact:subPort> </ipxact:subPorts> </ipxact:structured> </ipxact:port> Quote Link to comment Share on other sites More sharing options...
kock Posted November 16 Report Share Posted November 16 Hi Winnie, You cannot reuse it; you have to repeat it. Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Winnie Posted November 16 Author Report Share Posted November 16 Hi Erwin, Thanks for the reply. In that case, may I know what's the use of the typeName in structPortTypeDef? There isn't much detail to how it's used in the IPXACT User Guide Quote Link to comment Share on other sites More sharing options...
kock Posted November 17 Report Share Posted November 17 Hi Winnie, I agree that we need to provide more explanation. I have some examples in pseudo XML fragments from our IP-XACT what's new presentation from DVCon Europe 2022. Example 1: SV structure: typedef struct packed { logic [11:0] mySubPort1; logic [3:0] mySubPort2; } myStruct; module m(output myStruct myPort); endmodule Example 1: IP-XACT fragment for structured port myPort: name=myPort structured, packed=true struct, direction=out subPort name=mySubPort1 wire direction=out vector=[11:0] subPort name=mySubPort2 wire direction=out vector=[3:0] structPortTypeDef typeName=myStruct Example 2: SV interface: interface itr( input clk ); logic x,y; modport mod1( input x, clk ); modport mod2( output y ); endinterface module ip( itr.mod1 z ); endmodule Example 2: IP-XACT fragment for structured port z: name=z structured interface subPort, isIO=true name=clk wire direction=in subPort name=x wire direction=inout structPortTypeDef typeName=itr role=mod1 Hence, the typeName element in structured port has exactly the same purpose as the typeName elements in wire and transactional port elements: it describes the HDL-specific type of the port. The role element is only used for SV interface modports. Best regards, Erwin 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.