Commit Graph

8214 Commits

Author SHA1 Message Date
Simon Renblad 504bb5116d satman: replace forward with send for InjectionRequest 2024-11-26 15:27:51 +08:00
Jonathan Coates 46c3616a38 Correctly handle try/catch try/finally blocks
If we have a try/catch block nested inside a try/finally, then the
finally block would not be executed in the event of the exception.
This is because the landing pad of the inner try is marked as having no
cleanup clause.

We now set has_cleanup to False only if there is no outer try block.

Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2024-11-20 09:39:43 +08:00
Jonathan Coates 37330015c4 Remove final_branch from ARTIQ IR transform
As of da4ff44377 this is always None, and
so can be skipped.

Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2024-11-20 09:39:43 +08:00
newell 4bc5d1baf7 Fix some typos 2024-10-18 14:58:11 +08:00
Sebastien Bourdeauducq eae5e02d04 flake: update dependencies 2024-10-15 16:25:12 +08:00
Florian Agbuya a5036802f5 flake: update asyncserial
Signed-off-by: Florian Agbuya <fa@m-labs.ph>
2024-10-01 15:00:13 +08:00
abdul124 38c72fdab4 firmware/ksupport: restore exception id order 2024-08-23 16:25:49 +08:00
abdul124 1f1ae74a5f coredevice: add UnwrapNoneError class 2024-08-23 16:25:49 +08:00
abdul124 89f75c989c compiler: restore exception ids used 2024-08-23 16:25:49 +08:00
abdul124 70c2ca58af firmware/ksupport: improve comments and syscall name 2024-08-21 11:27:42 +08:00
abdul124 d389f8e25b coredevice/test: add unittests for exceptions 2024-08-21 11:27:42 +08:00
abdul124 de6f83b009 firmware/ksupport: add exception unittests 2024-08-21 11:27:42 +08:00
abdul124 d8386f2c2b coredevice/comm_kernel: map exceptions to correct names 2024-08-21 11:27:42 +08:00
abdul124 9591549b37 sync exception names and ids 2024-08-21 11:27:42 +08:00
Harry Ying e82cf94cae test_scheduler: remove the exact ordering assertion
Currently the exact ordering is compared in the `pending_priorities`
test which is not necessary and is non-deterministic. This patch only
 asserts the middle priority experiment is ran before the high priority
 experiment scheduled in the future.

Signed-off-by: Kanyang Ying <lexugeyky@outlook.com>
2024-07-11 09:38:42 +02:00
Simon Renblad 7e6a94bdff browser: fix ctrl scroll type error 2024-07-10 10:42:23 +02:00
architeuthidae 7f79dedea3 math_fns: Delete duplicated definition 2024-07-04 13:32:25 +02:00
Egor Savkin bb014d8187 Update dead links, partially remove unavailable resources
Signed-off-by: Egor Savkin <es@m-labs.hk>
2024-06-27 14:03:48 +08:00
Sébastien Bourdeauducq 3c33b22cb7 doc: fix conda URL 2024-06-27 13:11:49 +08:00
Florian Agbuya c1144079ab test_embedding: add int boundary test from 25168422a
Signed-off-by: Florian Agbuya <fa@m-labs.ph>
2024-06-07 14:12:03 +08:00
Florian Agbuya 25346780bf compiler: fix int boundary checks
Signed-off-by: Florian Agbuya <fa@m-labs.ph>
2024-06-07 14:12:03 +08:00
mwojcik c81280174c remove cargo-xbuild, fix nix build 2024-06-06 11:02:48 +08:00
architeuthis 2b944822d3 Minor manual fixes 2024-06-03 15:12:39 +08:00
mwojcik 9569cfb263 adf5356: sync before setting muxout 2024-05-31 08:34:58 +08:00
Simon Renblad db79100a56 browser, dashboard: fix restore scrollbar state 2024-03-20 11:36:33 +08:00
morgan 254277578d ddb template: remove extra clk_div white space 2024-03-15 11:01:15 +08:00
morgan 02dfb3e5ac artiq_ddb_template: backport clk_div config fix
add pll_en to json schema and ddb_template
set CLK IN divided by 1 as default when bypassing AD9910 PLL
raise ValueError when bypassing AD9912 PLL
2024-02-16 16:17:50 +08:00
Florian Agbuya 329c5c1af8 scan: fix deprecated shuffle parameter in python 3.11 2024-01-04 10:41:44 +08:00
Sebastien Bourdeauducq 2eddbadfef ad53xx: fix `load()` references in documentation 2023-10-16 07:56:15 +02:00
Jonathan Coates cc81464f53 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:05 +08:00
David Nadlinger 3f27c76619 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:26:54 +08:00
Florian Agbuya 93edfebb7e mirny: fix minor doc formatting 2023-09-06 15:52:56 +08:00
Florian Agbuya 568ef2336c mirny: fix doc formatting 2023-09-05 17:00:46 +08:00
Florian Agbuya f6ce6bb806 i2c: fix doc formatting 2023-09-05 17:00:46 +08:00
Denis Ovchinnikov 21c6f57ce1 jsonschema: add kasli_soc HW revision v1.1 2023-07-27 11:05:13 +08:00
sven-oxionics 928ca50762 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:25 +08:00
Florian Agbuya 2c7b62254e gui/experiments: cast Qt timestamp to int preventing float type error 2023-07-14 16:34:09 +08:00
linuswck f10c876ed7
kasli-soc: fix GTX initialization
The changes are backported from PR2128.

Org Problem: DRIO cannot establish connections with satellite after updatting
the IBUFDS_GTE2 parameters on commit d6704d30e9.

Description of Changes:
- CPLL Parameters are added.
- CEB signal of IBUFDS_GTE2 is asserted by NOT(OR(stable_clkin, GTX CPLL Locked)).
- Modify the GTX Init FSM so that the PLL Reset and GTX Reset are done in two seperated state.
- Restart of GTX module now only resets GTX transceiver.
2023-07-13 16:37:14 +08:00
Sebastien Bourdeauducq 6fbfa12e88 gtx_7series_init: GTH -> GTX (NFC) 2023-07-10 11:36:28 +08:00
Sebastien Bourdeauducq ad06924daa flake: update dependencies 2023-07-10 11:32:31 +08:00
mwojcik 93e26cacdd rtio_clocking: remove confusing log message 2023-07-10 02:36:34 +00:00
mwojcik ff976754cf fix missing DIFF_TERM for Sampler and Mirny inputs 2023-06-02 17:21:32 +08:00
Sebastien Bourdeauducq d6704d30e9 fix IBUFDS_GTE2 parameters 2023-05-30 11:49:13 +08:00
Sebastien Bourdeauducq 1315654f0a update dependencies, misoc libunwind cleanup 2023-05-30 11:46:23 +08:00
Charles Baynham 3a9213d5eb 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 06:58:15 +08:00
Jonathan Coates c691560fd6 dma: fix off-by-one error in RawSlicer (#2090)
Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2023-05-23 11:16:24 +08:00
Jonathan Coates 0323946ffb Fix mismatched signatures for the wide interface
Lists are passed by-reference from python code, and so should be
&CSlice<_> not CSlice<_>.

Signed-off-by: Jonathan Coates <jonathan.coates@oxionics.com>
2023-05-19 10:18:30 +08:00
Hartmann Michael (IFAG PSS SIS SCE QSE) 19059a3385 doc: conda installation notes 2023-05-12 17:45:22 +08:00
Sebastien Bourdeauducq dbd5a1765d flake: update dependencies 2023-05-01 09:35:38 +08:00
Sebastien Bourdeauducq 55c8ef588c fix default version string 2023-04-22 09:36:07 +08:00