Hi,

I've created a new DAC device using the FMC connector of the EFC. For testing I used a Kasli as DRTIO master with the EFC as satellite over EEM like the shuttlerdemo example.

Now that this configuration is working we tried to incorporate this into an experiment that uses a ZC706 as master device, therefore we tried running the Kasli as satellite. Firmware compilation fails with errors about unresolved symbols and it seems like a satellite configuration is not part of the Kasli Hydra set. Given that this is all relatively new functionality my question is if Artiq will soon support Kasli satellite configurations.

If that's not something that'll be available soon is there a way to proceed with the ZC706 master along with a Kasli master where the start of experiments is synchronized?

Thanks for your help!

Felix

    fevi_at_jila ARTIQ does very much support Kasli satellites. There are no Hydra generations because (unlike KC705 and ZC706) Kasli and Kasli-SoC binaries are generated according to a system description, and not in a fixed variant. How are you compiling firmware? Have you read the relevant chapters in the manual?

    @fevi_at_jila

    The obligatory: Please show us the command and the JSON description, and the resulting error messages.

    I have read your words a few times and I am not sure if I am understanding it correctly.
    So your new setup is: ZC706 with a DAC device that are connected solely by its FMC connector on the said device and the ZC706.
    If I understand it correctly, this setup has nothing to do with Kasli.

    Your alternative is to have the following:
    ZC706 master, Kasli(-SoC) satellite, EEM-FMC Carrier, your FMC device.
    ZC706 is the DRTIO master. Kasli(-SoC) satellite takes the GT-DRTIO connection from ZC706, and connects the EFC through DRTIO-over-EEM.

    You will need to enable GT DRTIO control on the Kasli(-SoC) satellite. For example, you apply this diff for RISC-V device.

    diff --git a/artiq/firmware/satman/main.rs b/artiq/firmware/satman/main.rs
    index c289b6b50..da5a7696c 100644
    --- a/artiq/firmware/satman/main.rs
    +++ b/artiq/firmware/satman/main.rs
    @@ -647,7 +647,6 @@ fn process_aux_packet(dmamgr: &mut DmaManager, analyzer: &mut Analyzer, kernelmg
             drtioaux::Packet::CoreMgmtDropLinkAck { destination: _destination } => {
                 forward!(router, _routing_table, _destination, *rank, *self_destination, _repeaters, &packet);
     
    -            #[cfg(not(has_drtio_eem))]
                 unsafe {
                     csr::gt_drtio::txenable_write(0);
                 }
    @@ -949,7 +948,6 @@ fn startup() {
             io_expander.service().unwrap();
         }
     
    -    #[cfg(not(has_drtio_eem))]
         unsafe {
             csr::gt_drtio::txenable_write(0xffffffffu32 as _);
         }

      I am running python kasli.py kasli_shuttler_100MHz_satellite.json with the following json

      {
          "target": "kasli",
          "variant": "shuttlerdemo",
          "hw_rev": "v2.0",
          "drtio_role": "satellite",
          "rtio_frequency" : 100e6,
          "peripherals": [
              {
                  "type": "shuttler",
                  "hw_rev": "v1.1",
                  "ports": [0]
              },
              {
                  "type": "dio",
                  "ports": [1],
                  "bank_direction_low": "input",
                  "bank_direction_high": "output"
              }
          ]
      }

      which gives me these errors:

      error[E0432]: unresolved importSAT_PAYLOAD_MAX_SIZE--> satman/routing.rs:7:5
      |
      7 | use SAT_PAYLOAD_MAX_SIZE;
      | ^^^^^^^^^^^^^^^^^^^^ no
      SAT_PAYLOAD_MAX_SIZE` in the root

      error[E0432]: unresolved import MASTER_PAYLOAD_MAX_SIZE
      --> satman/routing.rs:8:5
      |
      8 | use MASTER_PAYLOAD_MAX_SIZE;
      | ^^^^^^^^^^^^^^^^^^^^^^^ no MASTER_PAYLOAD_MAX_SIZE in the root

      error[E0432]: unresolved import MASTER_PAYLOAD_MAX_SIZE
      --> satman/dma.rs:8:48
      |
      8 | use ::{cricon_select, cricon_read, RtioMaster, MASTER_PAYLOAD_MAX_SIZE};
      | ^^^^^^^^^^^^^^^^^^^^^^^ no MASTER_PAYLOAD_MAX_SIZE in the root

      error[E0432]: unresolved import MASTER_PAYLOAD_MAX_SIZE
      --> satman/kernel.rs:20:5
      |
      20 | use MASTER_PAYLOAD_MAX_SIZE;
      | ^^^^^^^^^^^^^^^^^^^^^^^ no MASTER_PAYLOAD_MAX_SIZE in the root

      error[E0425]: cannot find value SAT_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:380:38
      |
      380 | let mut data_slice: [u8; SAT_PAYLOAD_MAX_SIZE] = [0; SAT_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::SAT_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value SAT_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:380:66
      |
      380 | let mut data_slice: [u8; SAT_PAYLOAD_MAX_SIZE] = [0; SAT_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::SAT_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value MASTER_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:467:38
      |
      467 | let mut data_slice: [u8; MASTER_PAYLOAD_MAX_SIZE] = [0; MASTER_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::MASTER_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value MASTER_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:467:69
      |
      467 | let mut data_slice: [u8; MASTER_PAYLOAD_MAX_SIZE] = [0; MASTER_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::MASTER_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value MASTER_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:491:42
      |
      491 | let mut data_slice: [u8; MASTER_PAYLOAD_MAX_SIZE] = [0; MASTER_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::MASTER_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value MASTER_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:491:73
      |
      491 | let mut data_slice: [u8; MASTER_PAYLOAD_MAX_SIZE] = [0; MASTER_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::MASTER_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value SAT_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:508:38
      |
      508 | let mut data_slice = [0; SAT_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::SAT_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value SAT_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:557:39
      |
      557 | let mut value_slice = [0; SAT_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::SAT_PAYLOAD_MAX_SIZE;
      |

      error[E0425]: cannot find value SAT_PAYLOAD_MAX_SIZE in this scope
      --> satman/main.rs:585:39
      |
      585 | let mut value_slice = [0; SAT_PAYLOAD_MAX_SIZE];
      | ^^^^^^^^^^^^^^^^^^^^ not found in this scope
      |
      help: consider importing this constant
      |
      19 | use proto_artiq::drtioaux_proto::SAT_PAYLOAD_MAX_SIZE;
      |

      Some errors have detailed explanations: E0425, E0432.
      For more information about an error, try rustc --explain E0425.
      error: could not compile satman due to 13 previous errors
      `

      It is possible that I missed something as my version was built off of an old commit (de8f8af3dd5f9b858343b38df8088b4ccbe98c81).

      occheung ZC706 master, Kasli(-SoC) satellite, EEM-FMC Carrier, your FMC device.
      ZC706 is the DRTIO master. Kasli(-SoC) satellite takes the GT-DRTIO connection from ZC706, and connects the EFC through DRTIO-over-EEM.

      This is the configuration I want to run in. Thanks for clarifying that!

        fevi_at_jila

        Those errors are quite odd.
        The sizes constant are public constants from libproto_artiq (as suggested by the error messages).
        But only SAT_PAYLOAD_MAX_SIZE in satman/routing.rs:7:5 was a recent change, the MASTER_PAYLOAD_MAX_SIZE import was there for no less than 1 year.

        And on satman/main.rs both constants are imported in the way the error messages suggested in satman/routing.rs.
        https://github.com/m-labs/artiq/blob/de8f8af3dd5f9b858343b38df8088b4ccbe98c81/artiq/firmware/satman/main.rs#L31

        It seems like a import error somehow.

        I am able to build both firmware and gateware without errors.

        fevi_at_jila

        Have you tried building this in a new directory / removing any old build files that may be causing conflicts?