Fix kasli_soc-demo compilation error with cfg #250
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#250
Loading…
Reference in New Issue
No description provided.
Delete Branch "morgan/artiq-zynq:bugfix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add
cfg(has_virtual_leds)
to fixkasli_soc-demo
compiling error due to PR #244.nix build .#kasli_soc-demo-jtag -L
and built successfully.Related PR
#244 kasli_soc-demo compiling error
@ -482,6 +483,7 @@ class GenericSatellite(SoCCore):
self.add_csr_group("grabber", self.grabber_csr_group)
# no RTIO CRG here
self.rustc_cfg["has_virtual_leds"] = None
IIRC misoc does that by default for all CSR cores and those lines are not necessary?
Running
python src/gateware/kasli_soc.py -r build/pl.rs -c build/rustc-cfg -m build/mem.rs kasli-soc-satellite.json
with the line omitted, thebuild/rust-cfg
don't have thehas_virtual_leds
linebuild/rust-cfg
https://github.com/m-labs/misoc/blob/master/misoc/integration/cpu_interface.py#L305
Please find out what is going on.
You may want to check migen-axi as well - it might not share this code with misoc.
Difference between artiq and artiq-zynq
In artiq repo, the rust-cfg is generated by calling
f.write(cpu_interface.get_rust_cfg(soc.get_csr_regions(), soc.get_constants()))
in themisoc/integration/build.py
.get_rust_cfg
analyze the content ofsoc.get_csr_regions()
andsoc.get_constants()
to carefully obtain the useful string and output it to the rust-cfg fileWhile in artiq-zynq, the
write_rustc_cfg_file(soc, filename)
is called to generated rust-cfg insrc/gateware/kasli_soc.py
soc.rustc_cfg = dict()
directly to rust-cfg filerust cfg difference if using
get_rust_cfg
write_rustc_cfg_file(soc, filename)
was modified to followget_rust_cfg
python src/gateware/kasli_soc.py -c build/rustc-cfg kasli-soc-satellite.json
rustc-cfg before modification
rustc-cfg after modification
Relevant code snippet
kasli_soc.py before modification
kasli_soc.py after modification
Yeah we should try to avoid divergence with misoc.