Skip to content

Commit

Permalink
Revert "Added hw parameters to package based on addrmap parameters. (#3
Browse files Browse the repository at this point in the history
…)"

This reverts commit dbcec9e.
  • Loading branch information
benoitdenkinger committed Jun 3, 2024
1 parent 771eea4 commit e01cd38
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
3 changes: 0 additions & 3 deletions src/peakrdl_regblock/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ def __init__(self, top_node: AddrmapNode, kwargs: Any) -> None:
# Track any referenced enums
self.user_enums = [] # type: List[Type[UserEnum]]

# HW parameters added to the package
self.hw_params = {}

# Scan the design to fill in above variables
DesignScanner(self).do_scan()

Expand Down
3 changes: 0 additions & 3 deletions src/peakrdl_regblock/hwif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ def get_package_contents(self) -> str:
"""
lines = []

for key in self.ds.hw_params:
lines.append(f"localparam int {key} = {self.ds.hw_params[key]};")

gen_in = self._gen_in_cls(self)
structs_in = gen_in.get_struct(
self.top_node,
Expand Down
11 changes: 0 additions & 11 deletions src/peakrdl_regblock/scan_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,6 @@ def enter_AddressableComponent(self, node: 'AddressableNode') -> None:
if not isinstance(node, RegNode):
self.ds.has_external_block = True

def enter_Addrmap(self, node: 'AddrmapNode') -> None:
# Extract addrmap integer parameters to convert them to HW parameters
for param in node.inst.parameters:
if isinstance(param.get_value(), int):
if param.name not in self.ds.hw_params:
self.ds.hw_params[param.name] = param.get_value()
else:
# This simple solution does not allow multiple parameters to have the same name
# over different addrmap components
self.msg.warning(f"Parameter {param.name} already defined")

def enter_Reg(self, node: 'RegNode') -> None:
# The CPUIF's bus width is sized according to the largest accesswidth in the design
accesswidth = node.get_property('accesswidth')
Expand Down

0 comments on commit e01cd38

Please sign in to comment.