Commit Graph

8435 Commits

Author SHA1 Message Date
0befadee96 environment: rename ndecimals to precision 2023-07-18 08:02:42 +00:00
b3dc199e6a Fix panic when receiving empty strings in rpc calls
Receiving an empty string in an RPC call currently panics.

When `length` is zero, a call to the `alloc` function (as implemented in `artiq/firmware/runtime/session.rs`) returns a null pointer. Constructing a `CMutSlice` from a null pointer panics.
A `CMutSlice` consists of a pointer and the length. Rust's documentation of the `core::ptr` module states: "The canonical way to obtain a pointer that is valid for zero-sized accesses is `NonNull::dangling`."
This commits adds a check for the length of a string received in an RPC call. Only for lengths greater than zero a memory allocation is performed. For zero-length strings, a dangling pointer is used.

Test plan:
Invoke the following experiment, which returns an empty string over RPC:
```
class ReturnEmptyString(artiq.experiment.EnvExperiment):
    def build(self):
        self.core: Core = self.get_device("core")

    @kernel
    def run(self):
        x = self.do_rpc()
        print(x)

    @rpc
    def do_rpc(self) -> TStr:
        return ""
```

Signed-off-by: Sven Over (Oxford Ionics) <sven.over@oxionics.com>
2023-07-18 04:00:32 +00:00
d73889fb27 gui/experiments: cast Qt timestamp to int preventing float type error 2023-07-14 08:33:27 +00:00
9f8bb6445f RELEASE_NOTES: add breaking change data_changed signature 2023-07-12 08:28:28 +00:00
068a2d1663 progress_bar: refactor data_changed 2023-07-12 08:28:28 +00:00
6c588b83d7 plot_xy_hist: refactor data_changed 2023-07-12 08:28:28 +00:00
c17f69a51b plot_xy: refactor data_changed 2023-07-12 08:28:28 +00:00
ac504069d2 plot_hist: refactor data_changed 2023-07-12 08:28:28 +00:00
b6a83904b5 image: refactor data_changed 2023-07-12 08:28:28 +00:00
25959d0cd6 big_number: refactor data_changed 2023-07-12 08:28:28 +00:00
5695e9f77e simple: refactor TitleApplet data_changed signature 2023-07-12 08:28:28 +00:00
fe0f6d8a2c simple: refactor SimpleApplet data_changed signature 2023-07-12 08:28:28 +00:00
d1f2727126 simple: refactor RPC client set_dataset 2023-07-12 08:28:28 +00:00
16a3ce274f applets: add metadata param to set_dataset 2023-07-12 08:28:28 +00:00
af7622d7ab simple: refactor IPC set_dataset 2023-07-12 08:28:28 +00:00
9a84575649
eem_7series: fix typo in 77293d5
Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2023-07-11 23:09:15 +00:00
faf85e815a datasets: add metadata to CreateEditDialog 2023-07-10 06:50:41 +00:00
3663a6b8e8 artiq_client: refactor set_dataset, show_datasets 2023-07-10 04:50:54 +00:00
91442e2914 browser: refactor upload_clicked for dataset metadata 2023-07-10 04:26:08 +00:00
50a6dac178 files: read dataset metadata from HDF5 2023-07-10 04:26:08 +00:00
5292a8de82 browser: add metadata param to short_format 2023-07-10 04:26:08 +00:00
7791f85a1a flake: update dependencies 2023-07-10 11:29:59 +08:00
48bc8a2ecc gtx_7series_init: GTH -> GTX (NFC) 2023-07-10 11:26:07 +08:00
93882eb3ce kasli-soc: fix of SYS CLK switch failure
Change initialization behaviour of GTX transceivers
--
Modify the config parms CPLL of GTX transceiver for PLL to lock correctly
Modify the enabling requirement of GTX input clock buffer IBUFDS_GTE2 so
    that it depends on GTX PLL locked signal instead of TX Init Done
Modify the GTX Init FSM so that BruteForceClock Aligner can reset GTX
    transceiver without resetting the GTX transceiver PLL

kasli-soc: fix of SYS CLK switch failure
Changed initialization of GTX transceivers.
Successful SYS CLK switching requires IBUFDS_GTE2 to be properly enabled and not disabled during GTX transceiver initialization.
For this reason, CPLL is not reset during GTX initialization and clock alignment.

kasli-soc: refractor fix of SYS CLK switch failure
Remove gtXxreset & cpllreset assertion and deassertion
The removed code does not affect the fix
2023-07-10 03:24:28 +00:00
7ca02a119d RELEASE_NOTES: update lmdb migrate script 2023-07-10 02:33:59 +00:00
373fe3dbe7 test_datasets: add metadata tests 2023-07-10 02:33:59 +00:00
1af98727b7 test_scheduler: refactor dataset metadata support 2023-07-10 02:33:59 +00:00
376f36c965 datasets: add metadata format param 2023-07-10 02:33:59 +00:00
e710d4badd databases: read and save metadata in lmdb 2023-07-10 02:33:59 +00:00
bfbe13e51b worker_db: write hdf5 dataset metadata 2023-07-10 02:33:59 +00:00
bf38fc8b0f tools: refactor short_format with metadata 2023-07-10 02:33:59 +00:00
337273acb6 environment: add get_dataset_metadata 2023-07-10 02:33:59 +00:00
748707e157 environment: add unit feature 2023-07-10 02:33:59 +00:00
Leon Riesebos
833fd8760e artiq_ddb_template: use the clk_div field
this field exists in the json schema but was not used.

Signed-off-by: Leon Riesebos <28567817+lriesebos@users.noreply.github.com>
2023-06-29 03:29:18 +00:00
454597915a RELEASE_NOTES: update 2023-06-17 05:01:02 +00:00
77293d53e3 json: use schema defaults when applicable 2023-06-16 16:59:08 +08:00
a792bc5456 json: factor handling of deprecated 'base' 2023-06-16 16:32:42 +08:00
20d4712815 json: base -> drtio_role 2023-06-16 16:17:31 +08:00
82bd913f63
satellites: add kernel cpu 2023-06-16 15:44:31 +08:00
115415d120 Revert "flake: update to LLVM 14 and llvmlite 0.40.0+master"
This reverts commit c25c0bd55a.
2023-06-14 18:54:33 +08:00
d140c960bb
applets: implement dataset modification feature in big number applet 2023-06-12 17:52:46 +08:00
c25c0bd55a
flake: update to LLVM 14 and llvmlite 0.40.0+master 2023-06-09 13:25:08 +08:00
30ef8d8cb4
compiler: skip demangling list of empty names 2023-06-09 13:24:10 +08:00
7ad32d903a browser: add update method to dataset controller 2023-06-06 11:07:08 +00:00
bf46ce4a92 applets.simple: add mutate_dataset feature 2023-06-05 12:30:14 +00:00
den512is
1f306a2859
flake: add packaging dependency
Needed for building Kasli firmware
2023-06-05 13:17:47 +08:00
150d325fc1 applets.simple: add append_to_dataset feature 2023-06-02 14:56:00 +00:00
c298ec4c2e applets: add update_dataset for dataset mods 2023-06-02 14:56:00 +00:00
69bf2dfb81 flake: sleep longer before running HITL tests to allow for clock switch and reboot 2023-06-02 17:41:15 +08:00
29cb7e785d fix missing DIFF_TERM for Sampler and Mirny inputs 2023-06-02 17:21:00 +08:00