peakrdl-python 3.1.1__py3-none-any.whl → 3.1.3__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.
@@ -17,4 +17,4 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
 
18
18
  Variables that describes the peakrdl-python Package
19
19
  """
20
- __version__ = "3.1.1"
20
+ __version__ = "3.1.3"
@@ -33,7 +33,7 @@ from systemrdl.node import AddrmapNode
33
33
  from systemrdl.node import MemNode
34
34
  from systemrdl.node import SignalNode
35
35
  from systemrdl.rdltypes.user_enum import UserEnumMeta, UserEnum
36
- from systemrdl.rdltypes import AccessType
36
+ from systemrdl.rdltypes import AccessType, UserStruct
37
37
 
38
38
  from .systemrdl_node_utility_functions import get_properties_to_include
39
39
  from .systemrdl_node_utility_functions import HideNodeCallback
@@ -171,6 +171,10 @@ def __node_hash_components(node: Node,
171
171
  if isinstance(item, list):
172
172
  for child_udp_value in item:
173
173
  udp_replace_for_hashing(child_udp_value)
174
+ elif issubclass(type(item), UserStruct):
175
+ for key, value in item.members.items():
176
+ value_to_hash.append(key)
177
+ udp_replace_for_hashing(value)
174
178
  elif isinstance(item, Node):
175
179
  value_to_hash.append('.'.join(item.get_path_segments()))
176
180
  else:
@@ -145,7 +145,7 @@ class {{node.python_class_name}}({% if asyncoutput %}Async{% endif %}RegFile):
145
145
  {{get_table_block(node.instance) | indent}}
146
146
  """
147
147
 
148
- __slots__ : list[str] = [{%- for child_node in node.instance.children(unroll=False) -%}'__{{child_node.inst_name}}'{% if not loop.last %}, {% endif %}{%- endfor %}]
148
+ __slots__ : list[str] = [{%- for child_node in node.children(unroll=False) -%}'__{{child_node.inst_name}}'{% if not loop.last %}, {% endif %}{%- endfor %}]
149
149
 
150
150
  def __init__(self,
151
151
  address: int,
@@ -159,7 +159,7 @@ class {{node.python_class_name}}({% if asyncoutput %}Async{% endif %}RegFile):
159
159
  parent=parent)
160
160
 
161
161
  # instance of objects within the class
162
- {% for child_node in node.instance.children(unroll=False) -%}
162
+ {% for child_node in node.children(unroll=False) -%}
163
163
  {{ regfile_or_addr_instance(child_node) | indent }}
164
164
  {% endfor %}
165
165
 
@@ -214,7 +214,7 @@ class {{node.python_class_name}}({% if asyncoutput %}Async{% endif %}AddressMap)
214
214
  {{get_table_block(node.instance) | indent}}
215
215
  """
216
216
 
217
- __slots__ : list[str] = [{%- for child_node in node.instance.children(unroll=False) -%}{%- if isinstance(child_node, systemrdlRegNode) or isinstance(child_node, systemrdlRegfileNode) or isinstance(child_node, systemrdlAddrmapNode) or isinstance(child_node, systemrdlMemNode) -%}'__{{child_node.inst_name}}'{% if not loop.last %}, {% endif %}{% endif %}{%- endfor %}]
217
+ __slots__ : list[str] = [{%- for child_node in node.children(unroll=False) -%}{%- if isinstance(child_node, systemrdlRegNode) or isinstance(child_node, systemrdlRegfileNode) or isinstance(child_node, systemrdlAddrmapNode) or isinstance(child_node, systemrdlMemNode) -%}'__{{child_node.inst_name}}'{% if not loop.last %}, {% endif %}{% endif %}{%- endfor %}]
218
218
 
219
219
  def __init__(self, *,
220
220
  address:int {%- if node.instance == top_node -%}={{top_node.absolute_address}}{%- endif -%},
@@ -233,7 +233,7 @@ class {{node.python_class_name}}({% if asyncoutput %}Async{% endif %}AddressMap)
233
233
  inst_name=inst_name,
234
234
  parent=parent)
235
235
 
236
- {% for child_node in node.instance.children(unroll=False) -%}
236
+ {% for child_node in node.children(unroll=False) -%}
237
237
  {{ regfile_or_addr_instance(child_node) | indent }}
238
238
  {% endfor %}
239
239
 
@@ -82,7 +82,7 @@ class {{node.python_class_name}}({{node.base_class(asyncoutput)}}):
82
82
  {{get_table_block(node.instance) | indent}}
83
83
  """
84
84
 
85
- __slots__ : list[str] = [{%- for child_node in node.instance.children(unroll=False) -%}'__{{child_node.inst_name}}'{% if not loop.last %}, {% endif %}{%- endfor %}]
85
+ __slots__ : list[str] = [{%- for child_node in node.children(unroll=False) -%}'__{{child_node.inst_name}}'{% if not loop.last %}, {% endif %}{%- endfor %}]
86
86
 
87
87
  def __init__(self,
88
88
  address: int,
@@ -129,12 +129,12 @@ class {{node.python_class_name}}({{node.base_class(asyncoutput)}}):
129
129
 
130
130
  {% if node.write_only %}
131
131
  {# if the register has no readable components, all the fields must be writen as one #}
132
- {% if asyncoutput %}async {% endif %}def write_fields(self, {%- for child_node in node.instance.fields() -%} {{safe_node_name(child_node)}} : {{node.lookup_field_data_python_class(child_node)}}{%- if not loop.last -%},{%- endif -%}{%- endfor -%}) -> None: # type: ignore[override]
132
+ {% if asyncoutput %}async {% endif %}def write_fields(self, {%- for child_node in node.fields() -%} {{safe_node_name(child_node)}} : {{node.lookup_field_data_python_class(child_node)}}{%- if not loop.last -%},{%- endif -%}{%- endfor -%}) -> None: # type: ignore[override]
133
133
  """
134
134
  Do a write to the register, updating all fields
135
135
  """
136
136
  reg_value = 0
137
- {%- for child_node in node.instance.fields() %}
137
+ {%- for child_node in node.fields() %}
138
138
  reg_value &= self.{{safe_node_name(child_node)}}.inverse_bitmask
139
139
  reg_value |= self.{{safe_node_name(child_node)}}._encode_write_value({{safe_node_name(child_node)}})
140
140
  {% endfor %}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: peakrdl-python
3
- Version: 3.1.1
3
+ Version: 3.1.3
4
4
  Summary: Generate Python Register Access Layer (RAL) from SystemRDL
5
5
  Author: Keith Brady
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -1,5 +1,5 @@
1
1
  peakrdl_python/.coveragerc,sha256=cqEPbptqQbGePDaOVqk5PtT8jWKF6gj5AFrFnx-0BAE,526
2
- peakrdl_python/__about__.py,sha256=kixNgC0JZ_lA81c0x1JmC3X1V8ZNGtqhRz7yBcQqfCI,831
2
+ peakrdl_python/__about__.py,sha256=WZTdTVvMa6sjrWPyyPzfN5u0HbP20oj_9YhgQcDgST8,831
3
3
  peakrdl_python/__init__.py,sha256=nVSLwpSFOkH3FFXRcF9kNm8WzsA4d41ugmC0Q4Jq9N8,963
4
4
  peakrdl_python/__peakrdl__.py,sha256=KH3vfyWPoX_qW2fCmksIxmTp1tg4ODxDgk-EEtyS4Fg,12072
5
5
  peakrdl_python/_deploy_package.py,sha256=JJnZGAVbUtR2UMPAXUtow0UZlKb2maQ_ReMWJxfps78,7034
@@ -9,7 +9,7 @@ peakrdl_python/compiler_udp.py,sha256=nGcb1ovYazVSSqBfKtirlkqt8KEpEzWVKFACqTY0L-
9
9
  peakrdl_python/exporter.py,sha256=U2lT69Q8dxM3M8Wki1UcarOBu-1z21PsnvPThwrAdVM,61994
10
10
  peakrdl_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  peakrdl_python/safe_name_utility.py,sha256=eQqUH46ifyu4p2OcNSKsF2eCyk-FxCrIzyI4zdMAdjw,14047
12
- peakrdl_python/systemrdl_node_hashes.py,sha256=aVG-uVnq2jemV7-7duQ_1VA7TfCmmLmhe03A29QrV6g,23836
12
+ peakrdl_python/systemrdl_node_hashes.py,sha256=vGyir7fA-dyx77oGYQie9v9pv7zYcNkJbQXlRdhJtG8,24038
13
13
  peakrdl_python/systemrdl_node_utility_functions.py,sha256=a0eEZDQqqyRbPWFBYbXbZ6PG9yAOvvpR4Wsizm8YZhs,16157
14
14
  peakrdl_python/unique_component_iterator.py,sha256=5PsKAglV8gdsOm94V7NPr3L34M05ts027K_qQCcaJqc,21563
15
15
  peakrdl_python/lib/__init__.py,sha256=ECgTEXrOyfZPLA8dSPUj_iOXft7eDRwI0L3IjOinKY4,5374
@@ -48,10 +48,10 @@ peakrdl_python/sim_lib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
48
48
  peakrdl_python/sim_lib/register.py,sha256=dzSTv6G7mmJ6mb2_j0keNi_fHeEZeBr9yVoaQdlxoHI,7935
49
49
  peakrdl_python/sim_lib/simulator.py,sha256=eUA2jQjT3mQi9CdSQPqWGKN6kMJLEMN6bd-68TqINtI,19584
50
50
  peakrdl_python/templates/__init__.py,sha256=_jOa1f-I2uCdx4VUUJd-wuEBU924YSYZc4pSJXe8r7Q,819
51
- peakrdl_python/templates/addrmap.py.jinja,sha256=hv2VI7VdFZ9tHYGmKVqZDbM1iLooBOTTIkesI2Kwqbg,17723
51
+ peakrdl_python/templates/addrmap.py.jinja,sha256=JnWcRmJ9yB7ALhZ_pB-PLE7K3qICTh2n2ao-xjoh4dY,17687
52
52
  peakrdl_python/templates/addrmap_field.py.jinja,sha256=TDpgwJTeh8mkeTJhsfupe3b7Ysk1p9vcnhU4LjMVTls,2844
53
53
  peakrdl_python/templates/addrmap_memory.py.jinja,sha256=CEu3iQvGFwyqABOxLuF835li4buz-9ktprfKIzp6xoY,6690
54
- peakrdl_python/templates/addrmap_register.py.jinja,sha256=oPGLhgBN7ySr7cCrlPxNLZ0WzqVG7AP_jcAlgyax-n0,9572
54
+ peakrdl_python/templates/addrmap_register.py.jinja,sha256=vanKTfHXn2Tk1eGtJAU8qDX-Yp3VyhYNDMuSgM0cfg4,9545
55
55
  peakrdl_python/templates/addrmap_simulation.py.jinja,sha256=pwBuQFJRwVQQIT8p_f41czU9eOfOWi0LZZtRpVEcLFw,3967
56
56
  peakrdl_python/templates/addrmap_simulation_tb.py.jinja,sha256=KscFJHFKv7BGWnqo04abgGi76ybKpqCsWcbNsCFxr1A,6933
57
57
  peakrdl_python/templates/addrmap_system_rdl_name_mapping.py.jinja,sha256=4Jo9_UvzKKb1Kdtbs8x2Rc7a37Bop73Kk-4uj4BaMuk,3452
@@ -68,9 +68,9 @@ peakrdl_python/templates/header_tb.py.jinja,sha256=nGMyM_mDTLeQXv6g0rwplr_EaR_me
68
68
  peakrdl_python/templates/property_enums.py.jinja,sha256=5qKPoONCaDs4vff9DsE3h2DGJYMYzg7vGQ_a5FVn-iQ,2062
69
69
  peakrdl_python/templates/reg_definitions.py.jinja,sha256=mvj6L734h5RM6gxxEmjntNc7Du6FFX-WSi-Eti9wc8c,2013
70
70
  peakrdl_python/templates/template_ultilities.py.jinja,sha256=XjWRRXP4ZJcX-D0v16NQM3sNG77w9gJFusG9iT1mem0,1507
71
- peakrdl_python-3.1.1.dist-info/licenses/LICENSE,sha256=sOw0CAxjvEaaR0JFpz3SBbacPfJ0Nf0YiwdfG2HJJ1c,7645
72
- peakrdl_python-3.1.1.dist-info/METADATA,sha256=isuTt16NBHBXMGy77auMmQI-Zh_42M4NDC-PAZJLrA0,17541
73
- peakrdl_python-3.1.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
74
- peakrdl_python-3.1.1.dist-info/entry_points.txt,sha256=Cga9FurNiqcw8-RQ34y0oobVTx0F5iWv7ngEnWHROKU,65
75
- peakrdl_python-3.1.1.dist-info/top_level.txt,sha256=M80MHPa4R4_4TxnNqd9FO29LI0FiL5Qjk4rQErB1wec,15
76
- peakrdl_python-3.1.1.dist-info/RECORD,,
71
+ peakrdl_python-3.1.3.dist-info/licenses/LICENSE,sha256=sOw0CAxjvEaaR0JFpz3SBbacPfJ0Nf0YiwdfG2HJJ1c,7645
72
+ peakrdl_python-3.1.3.dist-info/METADATA,sha256=juN9EpV4l1-3fHbqpN6632vz21ib8YwaPNeJJzjV_vs,17541
73
+ peakrdl_python-3.1.3.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
74
+ peakrdl_python-3.1.3.dist-info/entry_points.txt,sha256=Cga9FurNiqcw8-RQ34y0oobVTx0F5iWv7ngEnWHROKU,65
75
+ peakrdl_python-3.1.3.dist-info/top_level.txt,sha256=M80MHPa4R4_4TxnNqd9FO29LI0FiL5Qjk4rQErB1wec,15
76
+ peakrdl_python-3.1.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5