Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
targets: Move common stuff in targets files to a common file.
- Loading branch information
Showing
7 changed files
with
29 additions
and
68 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
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,3 +1,4 @@ | ||
from targets.common import * | ||
from targets.atlys_hdmi2usb import * | ||
|
||
from misoclib.com.uart.phy import UARTPHY | ||
|
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,3 +1,4 @@ | ||
from targets.common import * | ||
from targets.atlys_base import * | ||
|
||
from liteeth.common import * | ||
|
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
def get_firmware_data(firmware_filename): | ||
data = [] | ||
try: | ||
with open(firmware_filename, "rb") as firmware_file: | ||
while True: | ||
w = firmware_file.read(4) | ||
if not w: | ||
break | ||
data.append(struct.unpack(">I", w)[0]) | ||
except: | ||
pass | ||
return data | ||
|
||
|
||
def csr_map_update(csr_map, csr_peripherals): | ||
csr_map.update(dict((n, v) for v, n in enumerate(csr_peripherals, start=max(csr_map.values()) + 1))) | ||
|
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