@@ -207,6 +207,7 @@ def EthernetControlPopulation(
207207 local_host : Optional [str ] = None , local_port : Optional [int ] = None ,
208208 database_notify_port_num : Optional [int ] = None ,
209209 database_ack_port_num : Optional [int ] = None ,
210+ n_synapse_cores : Optional [int ] = None ,
210211 ** additional_kwargs : Dict [str , Any ]) -> Population :
211212 # pylint: disable=invalid-name
212213 """
@@ -227,8 +228,13 @@ def EthernetControlPopulation(
227228 :param database_notify_port_num:
228229 The optional port to which notifications from the database
229230 notification protocol are to be sent
231+ :param n_synapse_cores: Typed semantic sugar for an additional_kwargs
230232 :param additional_kwargs:
231- A nicer way of allowing additional things to the Population
233+ Additional parameters to pass to the vertex creation function.
234+ See the Model's create_vertex method for more details.
235+ These will be ignored if the Model does not accept this parameter.
236+ These will raise an Exception if a Vertex is passed in
237+ There may be additional parameters not listed in this init.
232238 :return:
233239 A pyNN Population which can be used as the target of a Projection.
234240
@@ -237,9 +243,14 @@ def EthernetControlPopulation(
237243 Projection, but it might not send spikes.
238244 :raises TypeError: If an invalid model class is used.
239245 """
246+ additional : Dict [str , Any ] = dict ()
247+ if additional_kwargs :
248+ additional .update (additional_kwargs )
249+ if n_synapse_cores is not None :
250+ additional ['n_synapse_cores' ] = n_synapse_cores
240251 # pylint: disable=global-statement
241252 population = Population (n_neurons , model , label = label ,
242- ** additional_kwargs )
253+ additional_parameters = additional )
243254 vertex , aec , vertex_label = __vtx (population )
244255 translator = aec .get_message_translator ()
245256 live_packet_gather_label = "EthernetControlReceiver"
@@ -306,13 +317,13 @@ def EthernetSensorPopulation(
306317 if not isinstance (device , AbstractEthernetSensor ):
307318 raise TypeError (
308319 "Device must be an instance of AbstractEthernetSensor" )
309- injector_params = dict (device .get_injector_parameters ())
310-
320+ additional_parameters = dict (device .get_injector_parameters ())
321+ if additional_kwargs :
322+ additional_parameters .update (additional_kwargs )
311323 population = Population (
312324 device .get_n_neurons (), SpikeInjector (notify = False ),
313325 label = device .get_injector_label (),
314- additional_parameters = injector_params ,
315- ** additional_kwargs )
326+ additional_parameters = additional_parameters )
316327 if isinstance (device , AbstractSendMeMulticastCommandsVertex ):
317328 cmd_conn = EthernetCommandConnection (
318329 device .get_translator (), [device ], local_host ,
0 commit comments