-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed lint error and updated version
Signed-off-by: Anderson Ignacio da Silva <[email protected]>
- Loading branch information
Showing
2 changed files
with
4 additions
and
3 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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# License : MIT license <Check LICENSE> | ||
# Author : Anderson I. da Silva (aignacio) <[email protected]> | ||
# Date : 16.10.2023 | ||
# Last Modified Date: 01.10.2024 | ||
# Last Modified Date: 26.12.2024 | ||
|
||
import cocotb | ||
import logging | ||
|
@@ -258,9 +258,10 @@ def _chk_wr(self, addr: int, size: AHBSize) -> bool: | |
def _get_addr_aligned(self, addr: int) -> int: | ||
def calc_addr_mask(addr_width: int, data_width: int) -> int: | ||
import math | ||
|
||
clog2 = lambda x: math.ceil(math.log2(x)) | ||
return ((1 << addr_width) - 1) - ((1 << clog2(data_width / 8)) - 1) | ||
|
||
return calc_addr_mask(self.bus._addr_width, self.bus._data_width) & addr | ||
|
||
def _rd(self, addr: int, size: AHBSize) -> 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.4.5" | ||
__version__ = "0.4.6" |