Fix kasli_soc-demo compilation error with cfg #250
|
@ -310,7 +310,6 @@ class GenericMaster(SoCCore):
|
|||
self.add_csr_group("grabber", self.grabber_csr_group)
|
||||
|
||||
|
||||
self.rustc_cfg["has_virtual_leds"] = None
|
||||
self.submodules.virtual_leds = virtual_leds.VirtualLeds()
|
||||
self.csr_devices.append("virtual_leds")
|
||||
|
||||
|
@ -483,7 +482,6 @@ class GenericSatellite(SoCCore):
|
|||
self.add_csr_group("grabber", self.grabber_csr_group)
|
||||
# no RTIO CRG here
|
||||
|
||||
self.rustc_cfg["has_virtual_leds"] = None
|
||||
self.submodules.virtual_leds = virtual_leds.VirtualLeds()
|
||||
self.csr_devices.append("virtual_leds")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
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.