satman main.rs: fix compiling error with has_rtio_moninj cfg #251

Merged
sb10q merged 1 commits from morgan/artiq-zynq:bugfix_moninj into master 2023-08-30 15:32:09 +08:00
  • fix compilation error when running nix build .#kasli_soc-satellite-jtag -L with has_rtio_moninj cfg
    • tested with self.rustc_cfg["has_rtio_moninj"] = None inserted in class GenericSatellite(SoCCore) at kasli_soc.py

Compiling error with has_rtio_moninj cfg before patch

...
firmware>    Compiling libboard_zynq v0.0.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#67dbb593)
kasli_soc-satellite-gateware> INFO: [Device 21-403] Loading part xc7z030ffg676-3
firmware>    Compiling libconfig v0.1.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#67dbb593)
firmware>    Compiling io v0.0.0 (/build/src/libio)
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:233:54
firmware>     |
firmware> 233 |                 csr::rtio_moninj::mon_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `probe` in this scope
firmware>    --> satman/src/main.rs:234:55
firmware>     |
firmware> 234 |                 csr::rtio_moninj::mon_probe_sel_write(probe);
firmware>     |                                                       ^^^^^ help: a local variable with a similar name exists: `_probe`
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:254:54
firmware>     |
firmware> 254 |                 csr::rtio_moninj::inj_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `overrd` in this scope
firmware>    --> satman/src/main.rs:255:58
firmware>     |
firmware> 255 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
firmware>     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
firmware> error[E0425]: cannot find value `value` in this scope
firmware>    --> satman/src/main.rs:256:51
firmware>     |
firmware> 256 |                 csr::rtio_moninj::inj_value_write(value);
firmware>     |                                                   ^^^^^ help: a local variable with a similar name exists: `_value`
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:269:54
firmware>     |
firmware> 269 |                 csr::rtio_moninj::inj_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `overrd` in this scope
firmware>    --> satman/src/main.rs:270:58
firmware>     |
firmware> 270 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
firmware>     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
firmware> error: aborting due to 7 previous errors
firmware> For more information about this error, try `rustc --explain E0425`.
firmware> error: could not compile `satman`
firmware> To learn more, run the command again with --verbose.
firmware> make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101
error: builder for '/nix/store/36bsac172sr23rmi9akisqf4wm5kjck1-firmware.drv' failed with exit code 2;
       last 10 log lines:
       > 270 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
       >     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
       >
       > error: aborting due to 7 previous errors
       >
       > For more information about this error, try `rustc --explain E0425`.
       > error: could not compile `satman`
       >
       > To learn more, run the command again with --verbose.
       > make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101
       For full logs, run 'nix log /nix/store/36bsac172sr23rmi9akisqf4wm5kjck1-firmware.drv'.
error: 1 dependencies of derivation '/nix/store/49k3aaiid6sh54jc828lb0cxj0p6nfdp-kasli_soc-satellite-jtag.drv' failed to build
- fix compilation error when running `nix build .#kasli_soc-satellite-jtag -L ` with `has_rtio_moninj` cfg - tested with `self.rustc_cfg["has_rtio_moninj"] = None` inserted in `class GenericSatellite(SoCCore)` at `kasli_soc.py` ## Compiling error with `has_rtio_moninj` cfg before patch ``` ... firmware> Compiling libboard_zynq v0.0.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#67dbb593) kasli_soc-satellite-gateware> INFO: [Device 21-403] Loading part xc7z030ffg676-3 firmware> Compiling libconfig v0.1.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#67dbb593) firmware> Compiling io v0.0.0 (/build/src/libio) firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:233:54 firmware> | firmware> 233 | csr::rtio_moninj::mon_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `probe` in this scope firmware> --> satman/src/main.rs:234:55 firmware> | firmware> 234 | csr::rtio_moninj::mon_probe_sel_write(probe); firmware> | ^^^^^ help: a local variable with a similar name exists: `_probe` firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:254:54 firmware> | firmware> 254 | csr::rtio_moninj::inj_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `overrd` in this scope firmware> --> satman/src/main.rs:255:58 firmware> | firmware> 255 | csr::rtio_moninj::inj_override_sel_write(overrd); firmware> | ^^^^^^ help: a local variable with a similar name exists: `_overrd` firmware> error[E0425]: cannot find value `value` in this scope firmware> --> satman/src/main.rs:256:51 firmware> | firmware> 256 | csr::rtio_moninj::inj_value_write(value); firmware> | ^^^^^ help: a local variable with a similar name exists: `_value` firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:269:54 firmware> | firmware> 269 | csr::rtio_moninj::inj_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `overrd` in this scope firmware> --> satman/src/main.rs:270:58 firmware> | firmware> 270 | csr::rtio_moninj::inj_override_sel_write(overrd); firmware> | ^^^^^^ help: a local variable with a similar name exists: `_overrd` firmware> error: aborting due to 7 previous errors firmware> For more information about this error, try `rustc --explain E0425`. firmware> error: could not compile `satman` firmware> To learn more, run the command again with --verbose. firmware> make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101 error: builder for '/nix/store/36bsac172sr23rmi9akisqf4wm5kjck1-firmware.drv' failed with exit code 2; last 10 log lines: > 270 | csr::rtio_moninj::inj_override_sel_write(overrd); > | ^^^^^^ help: a local variable with a similar name exists: `_overrd` > > error: aborting due to 7 previous errors > > For more information about this error, try `rustc --explain E0425`. > error: could not compile `satman` > > To learn more, run the command again with --verbose. > make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101 For full logs, run 'nix log /nix/store/36bsac172sr23rmi9akisqf4wm5kjck1-firmware.drv'. error: 1 dependencies of derivation '/nix/store/49k3aaiid6sh54jc828lb0cxj0p6nfdp-kasli_soc-satellite-jtag.drv' failed to build ```
morgan added 1 commit 2023-08-29 16:52:29 +08:00

Please give satellite moninj a test, and also determine if this patch also needs to be applied to release-7.

Please give satellite moninj a test, and also determine if this patch also needs to be applied to release-7.
Poster
Owner
  • Tested with master Kasli (release-7) & satellite Kasli-soc (PR#251 with has_rtio_moninj cfg active) that connected to a Urukul AD9912
    • Run artiq_session on the master Kasli and set Urukul frequency on dashboard
    • Verified the Urukul frequency is changed to the correct value with oscilloscope
- Tested with `master Kasli` (release-7) & `satellite Kasli-soc` (PR#251 with `has_rtio_moninj` cfg active) that connected to a `Urukul AD9912` - Run `artiq_session` on the `master Kasli` and set Urukul frequency on dashboard - Verified the Urukul frequency is changed to the correct value with oscilloscope
Poster
Owner

determine if this patch also needs to be applied to release-7.

Release-7 also has the same compilation issue when has_rtio_moninj is active

Error Snippet

morgan@hestia ~/d/artiq-zynq-release (release-7)> nix build .#kasli_soc-satellite-jtag -L     
...
firmware>    Compiling libconfig v0.1.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#605c8f73)
firmware>    Compiling io v0.0.0 (/build/src/libio)
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:214:54
firmware>     |
firmware> 214 |                 csr::rtio_moninj::mon_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `probe` in this scope
firmware>    --> satman/src/main.rs:215:55
firmware>     |
firmware> 215 |                 csr::rtio_moninj::mon_probe_sel_write(probe);
firmware>     |                                                       ^^^^^ help: a local variable with a similar name exists: `_probe`
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:231:54
firmware>     |
firmware> 231 |                 csr::rtio_moninj::inj_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `overrd` in this scope
firmware>    --> satman/src/main.rs:232:58
firmware>     |
firmware> 232 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
firmware>     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
firmware> error[E0425]: cannot find value `value` in this scope
firmware>    --> satman/src/main.rs:233:51
firmware>     |
firmware> 233 |                 csr::rtio_moninj::inj_value_write(value);
firmware>     |                                                   ^^^^^ help: a local variable with a similar name exists: `_value`
firmware> error[E0425]: cannot find value `channel` in this scope
firmware>    --> satman/src/main.rs:243:54
firmware>     |
firmware> 243 |                 csr::rtio_moninj::inj_chan_sel_write(channel as _);
firmware>     |                                                      ^^^^^^^ help: a local variable with a similar name exists: `_channel`
firmware> error[E0425]: cannot find value `overrd` in this scope
firmware>    --> satman/src/main.rs:244:58
firmware>     |
firmware> 244 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
firmware>     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
firmware> error: aborting due to 7 previous errors
firmware> For more information about this error, try `rustc --explain E0425`.
firmware> error: could not compile `satman`
firmware> To learn more, run the command again with --verbose.
firmware> make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101
error: builder for '/nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv' failed with exit code 2;
       last 10 log lines:
       > 244 |                 csr::rtio_moninj::inj_override_sel_write(overrd);
       >     |                                                          ^^^^^^ help: a local variable with a similar name exists: `_overrd`
       >
       > error: aborting due to 7 previous errors
       >
       > For more information about this error, try `rustc --explain E0425`.
       > error: could not compile `satman`
       >
       > To learn more, run the command again with --verbose.
       > make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101
       For full logs, run 'nix log /nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv'.
error: 1 dependencies of derivation '/nix/store/wazlcp3xxmmdbdk5kfnn0fpc9alz356g-kasli_soc-satellite-jtag.drv' failed to build

> determine if this patch also needs to be applied to release-7. Release-7 also has the same compilation issue when `has_rtio_moninj` is active ### Error Snippet ``` morgan@hestia ~/d/artiq-zynq-release (release-7)> nix build .#kasli_soc-satellite-jtag -L ... firmware> Compiling libconfig v0.1.0 (https://git.m-labs.hk/M-Labs/zynq-rs.git#605c8f73) firmware> Compiling io v0.0.0 (/build/src/libio) firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:214:54 firmware> | firmware> 214 | csr::rtio_moninj::mon_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `probe` in this scope firmware> --> satman/src/main.rs:215:55 firmware> | firmware> 215 | csr::rtio_moninj::mon_probe_sel_write(probe); firmware> | ^^^^^ help: a local variable with a similar name exists: `_probe` firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:231:54 firmware> | firmware> 231 | csr::rtio_moninj::inj_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `overrd` in this scope firmware> --> satman/src/main.rs:232:58 firmware> | firmware> 232 | csr::rtio_moninj::inj_override_sel_write(overrd); firmware> | ^^^^^^ help: a local variable with a similar name exists: `_overrd` firmware> error[E0425]: cannot find value `value` in this scope firmware> --> satman/src/main.rs:233:51 firmware> | firmware> 233 | csr::rtio_moninj::inj_value_write(value); firmware> | ^^^^^ help: a local variable with a similar name exists: `_value` firmware> error[E0425]: cannot find value `channel` in this scope firmware> --> satman/src/main.rs:243:54 firmware> | firmware> 243 | csr::rtio_moninj::inj_chan_sel_write(channel as _); firmware> | ^^^^^^^ help: a local variable with a similar name exists: `_channel` firmware> error[E0425]: cannot find value `overrd` in this scope firmware> --> satman/src/main.rs:244:58 firmware> | firmware> 244 | csr::rtio_moninj::inj_override_sel_write(overrd); firmware> | ^^^^^^ help: a local variable with a similar name exists: `_overrd` firmware> error: aborting due to 7 previous errors firmware> For more information about this error, try `rustc --explain E0425`. firmware> error: could not compile `satman` firmware> To learn more, run the command again with --verbose. firmware> make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101 error: builder for '/nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv' failed with exit code 2; last 10 log lines: > 244 | csr::rtio_moninj::inj_override_sel_write(overrd); > | ^^^^^^ help: a local variable with a similar name exists: `_overrd` > > error: aborting due to 7 previous errors > > For more information about this error, try `rustc --explain E0425`. > error: could not compile `satman` > > To learn more, run the command again with --verbose. > make: *** [Makefile:27: ../build/firmware/armv7-none-eabihf/release/satman] Error 101 For full logs, run 'nix log /nix/store/ihzh6iaadx7xvfxfrjcxz64dm6b8mg7x-firmware.drv'. error: 1 dependencies of derivation '/nix/store/wazlcp3xxmmdbdk5kfnn0fpc9alz356g-kasli_soc-satellite-jtag.drv' failed to build ```

Run artiq_session on the master Kasli and set Urukul frequency on dashboard
Verified the Urukul frequency is changed to the correct value with oscilloscope

This is not actually going through moninj (except the frequency readback in the dashboard). Try a TTL or LED.

> Run artiq_session on the master Kasli and set Urukul frequency on dashboard > Verified the Urukul frequency is changed to the correct value with oscilloscope This is not actually going through moninj (except the frequency readback in the dashboard). Try a TTL or LED.
Poster
Owner

This is not actually going through moninj (except the frequency readback in the dashboard). Try a TTL or LED.

  • Tested with on a master Kasli (release-7) & a satellite Kasli-soc (PR#251 with has_rtio_moninj cfg) that connected to a TTL-SMA
    • Run artiq_session on the master Kasli and override TTL output on dashboard
    • Verified all TTL0..7 output can be overriend with oscilloscope
> This is not actually going through moninj (except the frequency readback in the dashboard). Try a TTL or LED. - Tested with on a `master Kasli` (release-7) & a `satellite Kasli-soc` (PR#251 with `has_rtio_moninj` cfg) that connected to a `TTL-SMA` - Run `artiq_session` on the `master Kasli` and override TTL output on dashboard - Verified all TTL0..7 output can be overriend with oscilloscope
sb10q merged commit c61017fbe6 into master 2023-08-30 15:32:09 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#251
There is no content yet.