Commit Graph

7684 Commits (release-6)

Author SHA1 Message Date
mwojcik 9a3f6f85a4 ad53xx: fix `load()` references in documentation 2023-10-16 07:56:32 +02:00
David Nadlinger 81d2b37b57 compiler: Fix crash on multiple types with the same name
The original fix in 21574bdfa9
was incomplete, as it only addressed the TInstance types, but
not their linked (typ.constructor) TConstructor instances.

This would (potentially among other issues) cause assertion
errors in llvm_ir_generator due to the wrong associated globals
being referenced; see added test case for an example that
previously caused such a crash.

Also modified the name collision detection from O(len(type_map))
(so quadratic overall in the number of custom types) to cache
names in sets for O(1) lookup.
2023-09-27 10:28:03 +08:00
Jonathan Coates f416b637c6 Fix type annotations with mixed tuples
The type checker/inferer visits every node in an AST tree, including
function return annotations. This means for a function definition like

    def f() -> TTuple([TInt32, TBool]):
      ...

We attempt to type check the list [TInt32, TBool], which generates the
unification constraint builtins.TBool ~ builtins.TInt. This causes an
internal error due to compiler weirdness.

We can avoid this by just nulling-out the return annotation in the
embedding stage. The return type isn't actually used anywhere (it's
extracted via the inspect module instead), so this is entirely safe.

Arguments aren't affected by this, as we already nulled out the
annotation (see visit_arg in embedding.py).

Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2023-09-27 10:27:57 +08:00
Sebastien Bourdeauducq 76ee719a0d firmware: fix libproto_artiq compilation failure 2023-07-18 12:10:26 +08:00
sven-oxionics 2d017a05a1 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 12:01:44 +08:00
Florian Agbuya c73601b4b3 gui/experiments: cast Qt timestamp to int preventing float type error 2023-07-14 16:34:24 +08:00
mwojcik 9e6ffcfa30 fix missing DIFF_TERM for Sampler and Mirny inputs 2023-06-02 17:21:42 +08:00
Sebastien Bourdeauducq 837dffb56c fix IBUFDS_GTE2 parameters 2023-05-30 11:52:07 +08:00
Charles Baynham 76e93dc591 worker: Wait until datasets are written before quitting
Avoids a race condition in worker_impl.py where HDF5 dataset saving was
cut off before it finished for large datasets.
2023-05-24 07:00:09 +08:00
Jonathan Coates cfc396cbc8 dma: fix off-by-one error in RawSlicer (#2090)
Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2023-05-23 11:16:35 +08:00
Hartmann Michael (IFAG PSS SIS SCE QSE) 9c12d8b1de doc: conda installation notes 2023-05-12 17:45:38 +08:00
Ikko Eltociear Ashimine 8bd1f5c8b9 fix typo in comm_analyzer.py
error_occured -> error_occurred
occured -> occurred
2023-04-02 09:27:21 +08:00
Ikko Eltociear Ashimine 671ed8ac77 fix typo in developing_a_ndsp.rst
occurence -> occurrence
2023-03-11 18:33:06 +08:00
火焚 富良 b50d30ba5b compiler: fix const str/bytes handling (#1990) 2022-11-11 13:16:55 +08:00
cc78078 1b3fa3429d kasli: relocate the SatelliteBase Error LED code (#1955) 2022-08-12 13:42:59 +08:00
cc78078 004e7e7461 kasli: add Error LED to MasterBase and SatelliteBase 2022-08-11 15:08:52 +08:00
Sebastien Bourdeauducq ad37be40c7 typo 2022-07-21 11:58:50 +08:00
Sebastien Bourdeauducq a3ca686305 doc: update channels to legacy 2022-07-19 17:36:15 +08:00
Deepskyhunter 20dc923c9e Bugfix: Add missing item inside state to solve KeyError
KeyError raised when trying to load default_state()
due to missing Key "seed" in "RangeScan" and "CenterScan" in
state. Add {"seed": None} to resolve the bug.
2022-06-14 11:43:22 +08:00
Sebastien Bourdeauducq 83af3b756d Revert "compiler: Fix #1871 (array() breaks math functions)"
This reverts commit 8786b137a3.
2022-04-23 19:06:30 +08:00
Sebastien Bourdeauducq 3bc5a0dfb7 Revert "test: Fixup 6b5c390d4 typo"
This reverts commit 73371931fc.
2022-04-23 19:06:28 +08:00
David Nadlinger 73371931fc test: Fixup 6b5c390d4 typo 2022-04-22 09:00:46 +08:00
David Nadlinger 8786b137a3 compiler: Fix #1871 (array() breaks math functions)
GitHub: Fixes #1871.
2022-04-22 09:00:39 +08:00
Leon Riesebos ca67ae8365 browser: support datasets that use h5 group notation
Signed-off-by: Leon Riesebos <leon.riesebos@duke.edu>
2022-04-07 18:17:03 +08:00
Leon Riesebos 0226259e2b browser: cleanup datasets panel for empty h5 files
this fix makes sure the datasets panel is cleared if an h5 file is empty or the datasets and archive groups are empty
2022-04-07 18:17:03 +08:00
pca006132 c6a7b8a8dd compiler: fixed embedding annotation evaluation 2022-03-17 22:13:04 +08:00
pca006132 66b6555c72 compiler: allows string annotation
According to PEP484, type hint can be a string literal for forward
references. With PEP563, type hint would be preserved in annotations in
string form.
2022-03-17 22:12:58 +08:00
Sebastien Bourdeauducq 58f69cc96e mgmt: fix config write error message 2022-03-16 08:28:55 +08:00
mwojcik 2e65574c5f artiq_flash: fix satman fw for satellite1 etc boards 2022-03-10 16:22:13 +08:00
ciciwu 66ea41a81c phaser: fix docstring formatting (#1866) 2022-03-08 19:21:39 +08:00
Sebastien Bourdeauducq 56b8c3c096 dashboard: fix typo (#1858) 2022-02-26 08:57:28 +08:00
Steve Fan f941e17107 dashboard: prioritize min as part of default value resolution (#1839) 2022-01-27 17:49:21 +08:00
Steve Fan d7838e16dd comm_kernel: fix RPC exception handling (#1801) 2022-01-12 15:24:55 +08:00
Steve Fan 57e2ec629b comm_kernel: check if elements are within bounds for RPC list (#1824) 2022-01-11 17:17:57 +08:00
Peter Drmota 4f87531565 gateware.test.suservo: Fix tests for python >=3.7
Closes #1748
2022-01-11 17:17:57 +08:00
Steve Fan 64347290fb comm_kernel: fix off-by-one error for numeric value range check 2022-01-11 17:17:57 +08:00
Harry Ho f49f1fcbfc sayma_amc: add option to generate a 9MHz sq wave on the MCXs 2021-12-21 18:43:36 +08:00
Harry Ho 86fcd97416 sayma_amc: add option to force outputs on the MCXs 2021-12-21 18:43:36 +08:00
Steve Fan 759f00416b llvm_ir: move stacksave before lltag alloca in build_rpc
Signed-off-by: Steve Fan <sf@m-labs.hk>
2021-12-19 12:09:19 +08:00
Harry Ho 5818bc0878 mmcspi: fix timeout on detecting CS_n 2021-12-18 11:31:58 +08:00
Harry Ho 44171258f5 mmcspi: add timeout on detecting edges & data 2021-12-18 00:33:00 +08:00
Harry Ho bc249c32df sayma: fallback default MAC address if MMCSPI fails 2021-12-17 19:20:34 +08:00
Harry Ho 949917cc9c jdcg: fix missing JESD reset & JDAC re-init 2021-12-17 19:12:42 +08:00
Harry Ho dc411d55be jdcg: allow <=2 retries upon SYSREF test failure 2021-12-17 19:12:42 +08:00
Harry Ho 40e7b6058e sayma: support reading EUI48 from MMCSPI 2021-12-16 21:23:29 +08:00
Harry Ho 105af644bd libboard_misoc: add MMCSPI bitbanging driver
* Requires changes to Sayma AMC openMMC firmware as in https://github.com/HarryMakes/openMMC/commits/sayma-devel-fix/eui
* Primary supports reading EUI48 broadcasted from the MMC
2021-12-16 21:23:29 +08:00
Harry Ho 04ee775a9f sayma_amc: adopt MMCSPI bitbanging GPIO core
* Requires changes to migen as in https://github.com/HarryMakes/migen/commits/sayma-mmcspi
2021-12-16 21:23:29 +08:00
Sébastien Bourdeauducq 9547a15162
Merge pull request #1796 from HarryMakes/release-6
Metlino/Sayma: fix DDS sync & upgrade SAWG to 1 GS/s
2021-12-13 10:58:49 +08:00
Harry Ho d3869c966e examples: fix RTIO clocks to 125 MHz 2021-12-13 10:42:23 +08:00
Harry Ho 77c4d2f013 siphaser: remove support for 150 MHz RTIO clock
* Sayma AMC no longer uses 150 MHz RTIO clock after 1 GS/s upgrade.
2021-12-13 10:37:50 +08:00