scsc 0 Report post 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. Share this post Link to post Share on other sites
Eyck 26 Report post 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 Share this post Link to post Share on other sites
scsc 0 Report post Posted November 14, 2018 Thanks for pointing the binding process out. I do see slave_port is being used. Share this post Link to post Share on other sites