Skip to content
Snippets Groups Projects
Commit f1e06874 authored by Martin's avatar Martin
Browse files

merge

parents 81b85b36 0da8baff
No related branches found
No related tags found
1 merge request!40started to seperate state and parameters, ended up doing more work on keeping private variables private
......@@ -86,7 +86,7 @@ class Module:
Returns
-------
dict[str, Any]
Parameter of the module represented as a dictionary with one key for
Parameters of the module represented as a dictionary with one key for
each parameter variable.
"""
param_dict = dict()
......
......@@ -87,10 +87,10 @@ class Mux(Module):
return state
def get_parameter(self) -> dict[str, Any]:
paramter = super().get_state()
paramter["bit_length"] = self._bit_length
parameter = super().get_state()
parameter["bit_length"] = self._bit_length
return paramter
return parameter
def save_state_to_file(self, file_path: str) -> bool:
content = self.name + ":\nvalue: " + str(self._value) + "\n\n"
......
......@@ -115,7 +115,7 @@ class IntegerRegister(Register):
name: str | None = None,
) -> None:
# set the registers name
# set the register name
if name is None:
name = f"{bit_length}-bit register"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment