-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(translation): correct values for x/y_address_width
- Loading branch information
Showing
6 changed files
with
104 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
from elasticai.creator.hdl.design_base.acceptor import Acceptor | ||
from dataclasses import dataclass | ||
|
||
|
||
class Signal(Acceptor): | ||
def __init__(self, name: str, width: int, accepted_names: list[str]): | ||
self._name = name | ||
self._width = width | ||
self._accepted_names = tuple(accepted_names) | ||
|
||
@property | ||
def name(self) -> str: | ||
return self._name | ||
|
||
@property | ||
def width(self) -> int: | ||
return self._width | ||
|
||
def __hash__(self): | ||
return hash((self.name, self.width, self._accepted_names)) | ||
|
||
def accepts(self, other: "Signal") -> bool: | ||
return other.name in self._accepted_names and self.width == other.width | ||
@dataclass(eq=True, frozen=True) | ||
class Signal: | ||
name: str | ||
width: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.