scsc Posted November 13, 2018 Report Share Posted November 13, 2018 sc_port<simple_bus_slave_if, 0> slave_port; In the above snippet, how many slave_port copies of simple_bus_slave_if are initialized, given N=0? The default of sc_port is N=1. Quote Link to comment Share on other sites More sharing options...
Eyck Posted November 13, 2018 Report Share Posted November 13, 2018 There will only be one copy initialized: slave_port, simple_bus_slave_if will not be instantiated (which usually is even not possible as those are in the common case pure virtual classes). N just defines how many interface can be bound at most, 0 means unlimited. Internally there is a vector holding pointers to the simple_bus_slave_if , no copies. The vector will be resized as soon as you bind an interface. Best regards Quote Link to comment Share on other sites More sharing options...
scsc Posted November 14, 2018 Author Report Share Posted November 14, 2018 Thanks for pointing the binding process out. I do see slave_port is being used. 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.