57 output_names = [output[0] for output in block_infos["outputs"]] |
57 output_names = [output[0] for output in block_infos["outputs"]] |
58 if block_infos["type"] == "function": |
58 if block_infos["type"] == "function": |
59 if not generator.ComputedBlocks.get(block, False) and not order: |
59 if not generator.ComputedBlocks.get(block, False) and not order: |
60 generator.ComputedBlocks[block] = True |
60 generator.ComputedBlocks[block] = True |
61 connected_vars = [] |
61 connected_vars = [] |
62 input_connected = dict([("EN", None)] + |
62 if not block_infos["extensible"]: |
63 [(input_name, None) for input_name in input_names]) |
63 input_connected = dict([("EN", None)] + |
64 for variable in input_variables: |
64 [(input_name, None) for input_name in input_names]) |
65 parameter = variable.getformalParameter() |
65 for variable in input_variables: |
66 if input_connected.has_key(parameter): |
66 parameter = variable.getformalParameter() |
67 input_connected[parameter] = variable |
67 if input_connected.has_key(parameter): |
68 if input_connected["EN"] is None: |
68 input_connected[parameter] = variable |
69 input_connected.pop("EN") |
69 if input_connected["EN"] is None: |
70 input_parameters = input_names |
70 input_connected.pop("EN") |
|
71 input_parameters = input_names |
|
72 else: |
|
73 input_parameters = ["EN"] + input_names |
71 else: |
74 else: |
72 input_parameters = ["EN"] + input_names |
75 input_connected = dict([(variable.getformalParameter(), variable) |
|
76 for variable in input_variables]) |
|
77 input_parameters = [variable.getformalParameter() |
|
78 for variable in input_variables] |
73 one_input_connected = False |
79 one_input_connected = False |
74 all_input_connected = True |
80 all_input_connected = True |
75 for i, parameter in enumerate(input_parameters): |
81 for i, parameter in enumerate(input_parameters): |
76 variable = input_connected.get(parameter) |
82 variable = input_connected.get(parameter) |
77 if variable is not None: |
83 if variable is not None: |