docs: def write_struct_field(self, struct_name, field_name, values, x, y, p=0):
          """Write a value into a struct.
  
          This method is particularly useful for writing values into the ``sv``
          struct which contains some configuration data.  See ``sark.h`` for
          details.
  
          Parameters
          ----------
          struct_name : string
              Name of the struct to write to, e.g., `"sv"`
          field_name : string
              Name of the field to write, e.g., `"random"`
          values :
              Value(s) to be written into the field.
  
          .. warning::
              Fields which are arrays must currently be written in their
              entirety.
          """
          # Look up the struct and field
          field, address, pack_chars = \
              self._get_struct_field_and_address(struct_name, field_name)
  
          if field.length != 1:
              assert len(values) == field.length
              data = struct.pack(pack_chars, *values)
          else:
              data = struct.pack(pack_chars, values)
  
          # Perform the write
          self.write(address, data, x, y, p)