Skip to content

Commit

Permalink
integration: fix CSR group Rust declarations
Browse files Browse the repository at this point in the history
sbourdeauducq committed Jul 17, 2017
1 parent 4d9d232 commit d6f86c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misoc/integration/cpu_interface.py
Original file line number Diff line number Diff line change
@@ -244,12 +244,12 @@ def get_csr_rust(regions, groups, constants):
for csr in csrs:
nwords = (csr.size + busword - 1)//busword
rstype = _get_rstype(nwords*busword)
r += " pub " + csr.name + "_read: fn() -> " + rstype + ",\n"
r += " pub " + csr.name + "_read: unsafe fn() -> " + rstype + ",\n"
if not is_readonly(csr):
r += " pub " + csr.name + "_write: fn(" + rstype + "),\n";
r += " pub " + csr.name + "_write: unsafe fn(" + rstype + "),\n";
r += " }\n\n"

r += (" pub static " + group_name.upper() +
r += (" pub const " + group_name.upper() +
": [" + struct_name + "; " + str(len(group_members)) + "] = [\n")
for member in group_members:
r += " " + struct_name + " {\n"

0 comments on commit d6f86c0

Please sign in to comment.