-
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.
feature: scripts: add JH7110 DMC peripherals
Adds function to generate register arrays using the `dim` and `dimIncrement` register attributes. Adds scripts to generate JH7110 DDR memory controller CTRL and PHY peripheral registers.
- Loading branch information
Showing
4 changed files
with
70 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
# Copyleft (c) 2023 cmsis-svd-generator developers | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from scripts.starfive_common import * | ||
|
||
""" | ||
This program generates CMSIS SVD xml for starfive JH7110 dmc ctrl | ||
""" | ||
|
||
def generate_registers_starfive_jh7110_dmc_ctrl(dts, peripheral): | ||
"""Generate xml string for registers for starfive_dmc_ctrl peripheral""" | ||
txt = """\ | ||
<registers> | ||
""" | ||
|
||
txt += generate_register_arr("csr", "DDR Memory Control CSR register", 0x0, 1024, 0x4) | ||
txt += generate_register_arr("sec", "DDR Memory Control SEC register", 0x1000, 1024, 0x4) | ||
|
||
return txt + """\ | ||
</registers> | ||
""" |
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,23 @@ | ||
#!/usr/bin/env python3 | ||
# Copyleft (c) 2023 cmsis-svd-generator developers | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from scripts.starfive_common import * | ||
|
||
""" | ||
This program generates CMSIS SVD xml for starfive JH7110 dmc phy | ||
""" | ||
|
||
def generate_registers_starfive_jh7110_dmc_phy(dts, peripheral): | ||
"""Generate xml string for registers for starfive_dmc_phy peripheral""" | ||
txt = """\ | ||
<registers> | ||
""" | ||
|
||
txt += generate_register_arr("csr", "DDR Memory Control PHY CSR", 0x0, 512, 0x4) | ||
txt += generate_register_arr("base", "DDR Memory Control PHY Base register", 0x800, 512, 0x4) | ||
txt += generate_register_arr("ac_base", "DDR Memory Control PHY AC Base register", 0x1000, 512, 0x4) | ||
|
||
return txt + """\ | ||
</registers> | ||
""" |