digsim-logic-simulator 0.9.0__py3-none-any.whl → 0.11.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of digsim-logic-simulator might be problematic. Click here for more details.

@@ -27,7 +27,7 @@ class ModelSettings:
27
27
 
28
28
  def from_dict(self, circuit_dict):
29
29
  """Get settings from circuit dict"""
30
- for key, data in circuit_dict.get("settings", {}).items():
30
+ for key, data in circuit_dict.items():
31
31
  self._settings[key] = data
32
32
 
33
33
  def get(self, key):
@@ -77,10 +77,9 @@ class ModelShortcuts:
77
77
  shortcuts_dict[key] = component.name()
78
78
  return shortcuts_dict
79
79
 
80
- def from_dict(self, model_dict):
80
+ def from_dict(self, shortcuts_dict):
81
81
  """Generate shortcuts from dict"""
82
82
  self.clear()
83
- shortcuts_dict = model_dict.get("shortcuts")
84
83
  if shortcuts_dict is not None:
85
84
  for key, component_name in shortcuts_dict.items():
86
85
  component = self._app_model.objects.circuit.get_component(component_name)
@@ -88,11 +88,16 @@ class YosysModule:
88
88
 
89
89
  def is_same_interface(self, netlist):
90
90
  is_same = True
91
- for netlist_port_name, netlist_port in netlist.ports.items():
92
- module_port = self.ports.get(netlist_port_name)
93
- if module_port is None or not module_port.is_same(netlist_port):
94
- is_same = False
95
- break
91
+ if len(netlist.ports) == len(self.ports):
92
+ for netlist_port_name, netlist_port in netlist.ports.items():
93
+ module_port = self.ports.get(netlist_port_name)
94
+ if module_port is None or not module_port.is_same(netlist_port):
95
+ # Port does not exist or has a different bitwidth
96
+ is_same = False
97
+ break
98
+ else:
99
+ # The number of ports does not match
100
+ is_same = False
96
101
  return is_same
97
102
 
98
103
  def get_nets(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: digsim-logic-simulator
3
- Version: 0.9.0
3
+ Version: 0.11.0
4
4
  Summary: Interactive Digital Logic Simulator
5
5
  Author-email: Fredrik Andersson <freand@gmail.com>
6
6
  Maintainer-email: Fredrik Andersson <freand@gmail.com>
@@ -53,8 +53,8 @@ digsim/app/model/_model.py,sha256=JE9-iJMxzgcY0r-4s708gDtA-aadw_hFSuERjKNZlfE,64
53
53
  digsim/app/model/_model_components.py,sha256=Q2iztl7MlWv_7vaa7me-dp-gOx6-7Tg3LZmTUQNBPrw,6371
54
54
  digsim/app/model/_model_new_wire.py,sha256=5HnF5-gtKtB1Tp6ZIF7QuNo5zEHmsUpnBEmj6ZllLiA,1810
55
55
  digsim/app/model/_model_objects.py,sha256=lqOjNIygIHT6Dq_PPa-D0B5elC49dB0KshF0ATzJZ0s,5217
56
- digsim/app/model/_model_settings.py,sha256=FewI3hm1iwbjPwdN3IeixuINPtamDORrTh1ANGRNwX8,1035
57
- digsim/app/model/_model_shortcuts.py,sha256=TT4osN7-dMEgKXWHW9cJ0XILIIkUfRqBBfx6rvYT2JI,2488
56
+ digsim/app/model/_model_settings.py,sha256=BOwlwGT4h2R9tx7R5E1L4W0vli4GWh4RM77QBoqeKdw,1015
57
+ digsim/app/model/_model_shortcuts.py,sha256=xrUgs2Y18mSVun3sxzVscYTZ6n5DJTTZOnFhs4Jt_0M,2439
58
58
  digsim/app/settings/__init__.py,sha256=0tkoBSYeJFFiUI8c_FqvqqyM4-_SU9Xq7mXCwiew5Oo,308
59
59
  digsim/app/settings/_component_settings.py,sha256=88D9OuEcFIlaqZozomWHSYrl7opz4jZW2e8xGuUyTpg,16287
60
60
  digsim/app/settings/_gui_settings.py,sha256=sDi2POUsHvS7_4SO5qsTu_nN48HsTN4UfGPzdmECs9w,2764
@@ -97,9 +97,9 @@ digsim/synth/__init__.py,sha256=jhBHLOHf-vNa94Zg5q5dGcf0fgQTModfjUKtmUSffiw,180
97
97
  digsim/synth/__main__.py,sha256=wZWAzWsisoxA7hfqkKtu3H066uWyFajgPro2MEGlKbs,2173
98
98
  digsim/synth/_synthesis.py,sha256=ug9vSeTyZrvRCboNLL7dDIFVpGqH_ibr5fhOZJHpqUs,4271
99
99
  digsim/utils/__init__.py,sha256=MT9TNcpa7fNAqtBsmCcceKMrUSU_v9xeJ6Nox_TL7Lo,191
100
- digsim/utils/_yosys_netlist.py,sha256=TnEQc27NxPD96uGAF_wiijsZsX59vmDqzNP9rkMnLyc,3612
101
- digsim_logic_simulator-0.9.0.dist-info/licenses/LICENSE.md,sha256=FrvohZfyfpH4xrvKdXiQ5hD7dUB7w4DcsRA3p-pOmLw,1693
102
- digsim_logic_simulator-0.9.0.dist-info/METADATA,sha256=5NVelguEoPG3GlO78OlDNwfzX-NWC5Zqt1w8BD5yIVA,4557
103
- digsim_logic_simulator-0.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
104
- digsim_logic_simulator-0.9.0.dist-info/top_level.txt,sha256=qpCMzQKADZHVqZIoQgFrv3qJ3u7PPU73gTCXQglqLa8,7
105
- digsim_logic_simulator-0.9.0.dist-info/RECORD,,
100
+ digsim/utils/_yosys_netlist.py,sha256=Lcuo9seKcDu4O-NdBpJUpExvTT7Rx1STCBtF0xT8Nkc,3843
101
+ digsim_logic_simulator-0.11.0.dist-info/licenses/LICENSE.md,sha256=FrvohZfyfpH4xrvKdXiQ5hD7dUB7w4DcsRA3p-pOmLw,1693
102
+ digsim_logic_simulator-0.11.0.dist-info/METADATA,sha256=ccmh93aFlKMLF3YKGNRhnWKYgtIPkwykN_UJWP4taY8,4558
103
+ digsim_logic_simulator-0.11.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
104
+ digsim_logic_simulator-0.11.0.dist-info/top_level.txt,sha256=qpCMzQKADZHVqZIoQgFrv3qJ3u7PPU73gTCXQglqLa8,7
105
+ digsim_logic_simulator-0.11.0.dist-info/RECORD,,