Skip to content

Commit d6f86c0

Browse files
committedJul 17, 2017
integration: fix CSR group Rust declarations
1 parent 4d9d232 commit d6f86c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎misoc/integration/cpu_interface.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ def get_csr_rust(regions, groups, constants):
244244
for csr in csrs:
245245
nwords = (csr.size + busword - 1)//busword
246246
rstype = _get_rstype(nwords*busword)
247-
r += " pub " + csr.name + "_read: fn() -> " + rstype + ",\n"
247+
r += " pub " + csr.name + "_read: unsafe fn() -> " + rstype + ",\n"
248248
if not is_readonly(csr):
249-
r += " pub " + csr.name + "_write: fn(" + rstype + "),\n";
249+
r += " pub " + csr.name + "_write: unsafe fn(" + rstype + "),\n";
250250
r += " }\n\n"
251251

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

0 commit comments

Comments
 (0)
Please sign in to comment.