Commit Graph

252 Commits

Author SHA1 Message Date
whitequark 38dac16041 compiler: don't crash when quoting builtin functions.
Fixes #1051.
2018-06-05 23:27:23 +00:00
Sebastien Bourdeauducq 3027951dd8 integrate new AD9914 driver
moninj, analyzer, docs, examples, tests.
2018-05-13 23:29:35 +08:00
whitequark 873324d52b firmware: don't truncate queued RPCs (fixes #985). 2018-04-21 19:39:46 +00:00
Robert Jördens 0d8145084d test_spi: move to new spi2 core 2018-02-21 19:41:05 +01:00
Sebastien Bourdeauducq 67625fe912 test: check kernel overhead credibility 2018-01-28 01:02:03 +08:00
Sebastien Bourdeauducq e8ed3475ea test: add kernel overhead test (#407) 2018-01-28 01:00:59 +08:00
Sebastien Bourdeauducq 77f90cf93b test: relax RTIO counter test and print result 2018-01-24 10:07:22 +08:00
Sebastien Bourdeauducq ed0fbd5662 test: add test for RTIO counter (#883) 2018-01-24 00:28:39 +08:00
Sebastien Bourdeauducq dc593ec0f0 Merge branch 'rtio-sed' into sed-merge 2018-01-10 12:04:54 +08:00
Robert Jördens a44f8282dc test_performance: relax network speed to 2 MB/s
At QUARTIQ I am getting 2.4/2.3 MB/s and with single switch at M-Labs we
apparently regularly met 2.2/2.2 MB/s. But with the current multiple
switches and one of them being a problematic switch that triggered #837
it looks like it is a tad slower.

http://buildbot.m-labs.hk/builders/artiq/builds/1818/steps/python_coverage_1/logs/stdio
2017-12-06 17:21:41 +01:00
Sebastien Bourdeauducq 4387b0be1e clean up rtio_log 2017-11-03 00:52:53 +08:00
Sebastien Bourdeauducq f3f83174b1 test: check that DMA can underflow 2017-10-31 00:10:13 +08:00
Sebastien Bourdeauducq 415fa00846 test: relax rtio test_loopback 2017-10-30 23:07:54 +08:00
Sebastien Bourdeauducq 20a5f095f8 test: use longer DMA sequence when playing it back repeatedly
The CPU has to keep up.
2017-10-30 23:06:38 +08:00
Sebastien Bourdeauducq 9bf189ca10 test: relax timing requirements when not using DMA handle
core_dma.playback() without handle incurs a round-trip with the comms
CPU and should not be used in critical real-time sections.

Closes #834.
2017-10-30 22:57:12 +08:00
whitequark 7dfe7d8c93 test: verify no network performance regression from current 2.2 MB/s. 2017-10-30 04:25:58 +00:00
Sebastien Bourdeauducq 5437f0e3e3 rtio: make sequence errors consistently asychronous 2017-09-29 14:40:06 +08:00
Sebastien Bourdeauducq 4e31e9a9ac test: relax test_rtio.test_loopback
With SED there are 8 additional FIFO output stages.
2017-09-26 17:13:02 +08:00
Sebastien Bourdeauducq 53860868f4 test/rtio: wait for counter >= now before checking for async errors 2017-09-16 17:52:39 +08:00
Sebastien Bourdeauducq 770ce2658f test: adapt SequenceError test to SED 2017-09-16 16:28:57 +08:00
mntng ea135f9d06 add unittest for artiq_compile and ELF artiq_run (#455) 2017-08-15 08:13:11 -06:00
Sebastien Bourdeauducq cf1de4b26a test_spi: convert to Unix EOL 2017-08-04 11:48:20 +08:00
mntng 692dc0803b test: add test for SPI core using SD card 2017-07-28 19:10:44 +08:00
whitequark 69fa9b38e0 test: actually run test_embedding.AsyncTest. 2017-06-25 05:28:32 +00:00
whitequark 31b52ff1b3 coredevice: do not desync kernel TCP stream on RPCReturnValueError.
And propagate the error upwards instead of trying to squeeze it
through the core device in futility.
2017-06-25 04:47:32 +00:00
Sebastien Bourdeauducq 6262969d46 test: relax test_dma_record_time 2017-06-21 18:33:58 +08:00
Sebastien Bourdeauducq 09d198c7a1 test: add test for exception on non-existent I2C bus 2017-06-19 15:32:09 +08:00
whitequark 284382b1f5 compiler: add support for bytearray values in RPC (#714). 2017-06-09 07:15:25 +00:00
whitequark 66a683f583 compiler: add support for bytes values in RPC (#714). 2017-06-09 07:10:48 +00:00
Sebastien Bourdeauducq 5fc953119e fix usage of CommMgmt 2017-05-22 17:32:11 +08:00
Sebastien Bourdeauducq 5ccca74a3f fold comm device into core device 2017-05-22 15:45:45 +08:00
whitequark ed2b10c5aa compiler: in codegen for delay(), round fp instead of truncating.
Consider delay(8*us). It results in the following computation...
  >>> 8*1e-06/1e-09
  7999.999999999999
with the result promptly getting truncated to 7999.

Fixes #706.
2017-04-21 17:36:44 +00:00
whitequark fd994ceef3 DMA: various fixes to bring tests in line. 2017-04-20 20:05:03 +00:00
Sebastien Bourdeauducq e8f7f8ef9c DMA: speed up playback
Time reduced from 1.53µs to 1.37µs.
2017-04-19 10:59:12 +08:00
whitequark 41c4de4556 DMA: add API for a much faster replay using handles. 2017-04-18 08:20:12 +00:00
whitequark 9dfe9c1248 DMA: improve recording performance.
This commit moves DMA serialization code to the kernel CPU
(to cope with the existence of rtio_output_wide) and batches
the resulting sequences. This results in less data being transferred
between kernel and comms CPUs (24 octets with one pointer before,
18 octets with no pointers now, for the common case of rtio_output),
but most importantly reduces cache flushes, which now happen
once per 64k octets.

On average, it now takes about 15us to record a single RTIO event
in a DMA trace.

Fixes #712.
2017-04-15 07:29:52 +00:00
Sebastien Bourdeauducq f314f8b8f5 relax test_rpc_timing 2017-04-08 22:45:08 +08:00
whitequark 14ae1cc100 runtime: advance now on DMA replay.
Fixes #700.
2017-04-05 18:34:36 +00:00
whitequark 56918fb375 test: re-enable DMA tests as the feature is now stable. 2017-04-05 16:43:22 +00:00
whitequark 8b98e1ea6d test: relax test_rpc_timing: rpc_time_mean <2ms → <3ms. 2017-03-31 20:41:47 +00:00
whitequark 245e186347 Commit missing parts of 948ed6fb. 2017-03-29 18:34:08 +00:00
Sebastien Bourdeauducq 2e2d0be201 skip crashing DMA tests on buildbot 2017-03-29 09:36:51 +08:00
whitequark 7eb368fd5d test: add DMA test that checks the analyzer trace. 2017-03-28 14:22:20 +00:00
Sebastien Bourdeauducq 6caab4d10b test: verify that RTIO collisions appear in log 2017-03-27 18:08:03 +08:00
Sebastien Bourdeauducq 70343b244d test: add more RTIO slack in test_clock_generator_loopback 2017-03-27 17:26:23 +08:00
Sebastien Bourdeauducq 58ee09dbdc test: re-enable test_clock_generator_loopback
It passes now for some reason.
2017-03-27 17:26:02 +08:00
Sebastien Bourdeauducq b74d6fb9ba make collision and busy asynchronous errors, and simplify CPU/gateware handshake for output errors and reads 2017-03-27 16:32:23 +08:00
Sebastien Bourdeauducq 1ee3f96482 test: self.break_realtime → self.core.break_realtime 2017-03-27 16:31:11 +08:00
whitequark ac9e8b8568 test: avoid underflow in DMA replay test. 2017-03-17 12:09:02 +00:00
whitequark dbea679e96 Revert "test: relax test_rpc_timing on Windows."
This reverts commit e9cf451c0b.
2017-03-17 11:34:45 +00:00
whitequark e9cf451c0b test: relax test_rpc_timing on Windows. 2017-03-17 11:20:16 +00:00
whitequark 7dc7dcda2c test: relax test_pulse_rate_dds to only catch catastrophic slowdown. 2017-03-17 11:17:47 +00:00
Sebastien Bourdeauducq f121ca20fe test: relax test_pulse_rate_dds 2017-03-03 18:10:27 +08:00
whitequark a4ece19614 Implement DMA playback. 2017-02-28 21:28:40 +00:00
Sebastien Bourdeauducq 9cfa3e704b fix test_analyzer 2017-02-27 19:19:46 +08:00
Sebastien Bourdeauducq 3b386aa590 fix test_moninj import 2017-02-27 18:44:32 +08:00
Sebastien Bourdeauducq 7d6ebabc1b reorganize core device communication code 2017-02-27 18:37:30 +08:00
Sebastien Bourdeauducq d16073fcaa test: add moninj unittest 2017-02-27 15:56:58 +08:00
whitequark 9c93c760fc firmware: do not use PIC in Rust code.
This fixes test_pulse_rate and test_pulse_rate_dds by making
rtio_output slightly faster.
2017-02-02 12:22:55 +00:00
whitequark 609fd3d902 test: skip test_clock_generator_loopback as well.
Both tests pass locally, which means there's some conda screwup
that prevents them from working on CI.
2017-01-27 11:47:26 +00:00
whitequark c529cefc89 conda: bump llvmlite-artiq dependency. 2017-01-27 11:14:53 +00:00
whitequark 477664f931 test: temporarily skip pulse_rate_dds. 2017-01-26 20:53:30 +00:00
whitequark 0b67396630 test: convert test_pulse_rate_dds to use mu.
Before this commit, this test was actually measuring soft-FP
performance.
2017-01-25 11:26:30 +00:00
whitequark b5a684830d compiler: fix parsing of TList annotations (fixes #632). 2016-12-05 03:18:56 +00:00
whitequark 3485c83429 Fix tests. 2016-11-21 06:40:47 +00:00
whitequark 009d396740 Move mu_to_seconds, seconds_to_mu to Core. 2016-11-21 05:37:30 +00:00
whitequark feed91d8b2 runtime: buffer RPC send packets.
This brings mean RPC time from ~45ms to ~2ms.

The cause of the slowness without buffering is, primarily, that lwip
is severely pessimized by small writes, whether with Nagle on or off.
(In fact, disabling Nagle makes it function *better* on many small
writes, which begs the question of what's the point of having Nagle
there in the first place.) In practical terms, the slowness appears
only when writing a 4-byte buffer (the synchronization segment);
writing buffers of other sizes does not trigger the problem.

This all is extremely confusing and the fix is partly palliative,
but since it seems to work reliably and we're migrating off lwip
I think it is unwise to spend any more time debugging this.
2016-11-12 23:06:33 +00:00
whitequark 6fcd57a41a runtime: fix remaining async RPC bugs. 2016-11-01 10:33:57 +00:00
whitequark 6b2789e3db test: add more RPC tests. 2016-10-06 12:54:08 +00:00
Sebastien Bourdeauducq 1cb8f642b4 test: level-based TTL APIs (#218) 2016-09-07 17:37:49 +08:00
whitequark 5a2306ae5a compiler.embedding: implement type annotations for function arguments.
Fixes #318.
2016-08-08 03:28:25 +00:00
whitequark b6c12f2f56 test: relax RPCTiming rpc_time_stddev from 1ms to 2ms.
Even when given exclusive access to our buildserver it still gives
false positives with 1ms.
2016-07-14 10:47:51 +00:00
whitequark 653eeb476f runtime: fix serialization of object lists.
Fixes #500.
2016-07-07 12:40:50 +00:00
whitequark d90fd7dc00 compiler: implement numpy.full (#424). 2016-07-07 06:33:38 +00:00
whitequark 7a671fb2fd embedding: treat numpy.{int32,int64,array} specially (#424).
Also, remove them from prelude to not pollute the namespace.
2016-07-07 06:33:38 +00:00
whitequark 933ea53c77 compiler: add basic numpy array support (#424). 2016-07-06 09:51:57 +00:00
whitequark 906db876a6 language: replace coredevice int with numpy.{int32,int64}.
Fixes #453.
2016-07-06 04:44:21 +00:00
Sebastien Bourdeauducq 43681b37ec test/rtio: relax constraints 2016-06-29 11:38:36 +08:00
Sebastien Bourdeauducq e51928ee97 test/rtio: adapt to new handover behavior 2016-06-29 10:38:37 +08:00
Sebastien Bourdeauducq c8dc6ca07c inter-experiment smooth handover 2016-06-29 02:37:50 +08:00
Sebastien Bourdeauducq 917cc056f4 test: add test for seamless handover on exception termination 2016-06-19 19:15:10 +08:00
whitequark e47538ca33 analyzer: explicitly delimit messages (with \x1D).
Fixes #461.
2016-06-07 11:26:49 +00:00
Sebastien Bourdeauducq 136dc7039e language/environment: update kernel_invariants in setattr_argument and setattr_device 2016-05-03 16:27:42 +08:00
whitequark a88425b66b compiler: allow RPCing builtin functions.
Fixes #366.
2016-04-26 01:31:17 +00:00
whitequark 1464bae6b7 compiler: don't typecheck RPCs except for return type.
Fixes #260.
2016-04-26 01:12:36 +00:00
Sebastien Bourdeauducq caf774579a environment: refactor 2016-04-16 19:31:07 +08:00
Sebastien Bourdeauducq e1a229028d test/analyzer: clear analyzer buffer after IO init 2016-04-15 01:18:36 +08:00
Robert Jördens 511913230f test_analyzer: loop_out.off() 2016-04-14 22:57:16 +08:00
Robert Jördens d42ef46471 test: set inputs to input(), should close #383 2016-04-12 18:17:53 +08:00
whitequark 12d6f1d963 Commit missing parts of bb064c67a. 2016-04-06 23:46:19 +00:00
whitequark 9cc9e8b276 embedding: s/kernel_constant_attributes/kernel_invariants/g
Requested in #359.
2016-04-06 22:38:31 +00:00
Robert Jördens 73795ff788 test_rtio: integer division 2016-04-06 02:26:20 +08:00
Robert Jördens 4bc5eaf9e8 test_rtio: scale speed test results to 'event' intervals 2016-04-06 00:55:13 +08:00
Robert Jördens 76dcccb33b test_rtio: comments and correction
* add comments what is actually being measured in the two rate tests
* remove spurious factor of two
2016-04-05 20:51:03 +08:00
whitequark 14caa2713c test_pulse_rate_dds: adjust bounds. 2016-04-05 01:52:34 +00:00
whitequark 10108e6d64 compiler: mark loaded pointers as !dereferenceable.
Also, lower the bound for test_pulse_rate_dds, since we generate
better code for it now.
2016-03-31 12:04:38 +00:00
Sebastien Bourdeauducq 0173031487 test/PulseRateDDS: run more iterations 2016-03-31 16:04:55 +08:00
whitequark 42609d057e test_pulse_rate_dds: tighten upper bound to 400us. 2016-03-27 14:27:32 +00:00
whitequark 2a210d74fb test_pulse_rate: tighten upper bound to 1500ns. 2016-03-26 22:45:24 +00:00
Sebastien Bourdeauducq 1c9b8a1d52 test/coredevice/portability/pulses: compute time differences in MU 2016-03-20 15:29:31 +08:00
Sebastien Bourdeauducq ff697a47ce test/coredevice/cache: fix exception import 2016-03-19 18:00:10 +08:00
whitequark 891e3cf1fe Commit missing parts of 501de306. 2016-03-18 22:48:26 +00:00
whitequark dbc0a89903 dds.c: turn off batch mode before an underflow can be raised.
Fixes #334.
2016-03-18 05:00:05 +00:00
Sebastien Bourdeauducq 9ffaf82877 test/analyzer: check that last message is StoppedMessage 2016-03-15 21:44:56 +08:00
Robert Jördens f68c24094f test_spi: drain errors and be more strict on where we expect errors 2016-03-10 12:25:10 +01:00
Sebastien Bourdeauducq d0cf589229 test/rtio/Loopback: ensure loop_out is low before starting test 2016-03-10 13:24:00 +08:00
Sebastien Bourdeauducq f3a2b3a67e test/rtio: raise exception when pulse is not received 2016-03-10 12:16:18 +08:00
Sebastien Bourdeauducq f4f95d330b Merge branch 'master' of github.com:m-labs/artiq 2016-03-10 11:15:30 +08:00
Sebastien Bourdeauducq 1739e0f2f8 coredevice: put cache into separate file/device 2016-03-10 10:46:19 +08:00
Robert Jördens 10a09122ea test_spi: break_realtime 2016-03-09 18:23:27 +01:00
Robert Jördens 8f6653ef72 test_spi: simplify test, add collision vs busy test 2016-03-09 17:58:42 +01:00
Robert Jördens 58e0e670fc tests: test spi business 2016-03-09 15:40:26 +01:00
Sebastien Bourdeauducq 2953b069dc rtio: when rtlink addresses are different, issue collision not replace (fixes #320) 2016-03-08 15:58:25 +08:00
Sebastien Bourdeauducq 71105fd0d7 rtio: collision_error -> collision 2016-03-08 15:38:35 +08:00
Sebastien Bourdeauducq 59d7f5f1e3 test/coredevice/time_keeps_running: start new session to prevent now_mu save/restore 2016-03-08 14:04:51 +08:00
whitequark 9ffa8cbb11 test_loopback: bump RTT limit to 60ns.
Turns out a short jumper wire on a backplane leads to RTT of 50ns
exactly.
2016-03-07 20:27:22 +00:00
Sebastien Bourdeauducq 683716017b test: I2C/PCA9548 unittest 2016-03-05 19:01:35 +08:00
Sebastien Bourdeauducq c7d48a1765 coredevice/TTLOut: add dummy output function 2016-03-01 19:03:10 +08:00
Sebastien Bourdeauducq a5bf502917 test/LoopbackCount: request correct devices 2016-02-26 14:29:51 +08:00
whitequark 8e77e561cd test: bring back test_loopback_count (fixes #295). 2016-02-25 18:46:55 +00:00
whitequark 652c2a185f test: rewrite tests using ttl_inout to use loop_{in,out} (#265). 2016-02-24 18:27:08 +00:00
whitequark 956448bd8d test: skip RPC timing tests by default. 2016-02-24 15:09:22 +00:00
Sebastien Bourdeauducq 82f4fd1290 test/coredevice: convert to 'with parallel' 2016-02-23 15:48:12 +08:00
whitequark 51a5910002 Rename 'with parallel' to 'with interleave' (#265). 2016-02-22 13:24:43 +00:00
Sebastien Bourdeauducq 9ca8b48bf9 assume 'import artiq' works before running tests 2016-02-02 21:52:33 +01:00
Robert Jördens 765001054d artiq.experiment: merge language and coredevice namespaces
perl -i -pe 's/^from artiq import \*$/from artiq.experiment import */' your_experiments/*.py

(assuming you skipped the changes form the previous commit)
2016-01-25 17:24:00 -07:00
Robert Jördens fbe4d96572 artiq: move namespace artiq.* -> artiq.language.*
perl -i -pe 's/^from artiq import \*$/from artiq.language import */' your_experiments/*.py
2016-01-25 17:24:00 -07:00
Robert Jördens c0bcff4035 test/*/: add missing __init__.py 2016-01-18 14:22:40 -07:00
whitequark 225f7d7302 Commit missing parts of 9366a29. 2016-01-10 20:01:26 +00:00
whitequark 027d54ca94 Enlarge coredevice buffers to 2.5MiB (fixes #215).
This should be enough for sending a 2MiB int32 list.
2016-01-07 18:29:35 +00:00
whitequark cb90bf6ef3 test/coredevice/portability: keep trace list entirely on host. 2015-12-31 22:08:15 +08:00
whitequark abc5a49aaf test: use raise X() syntax rather than raise X. 2015-12-31 22:02:57 +08:00
Sebastien Bourdeauducq 17802d3cff test/coredevice/primes: keep output list entirely on the host 2015-12-31 09:49:37 +08:00
Sebastien Bourdeauducq aa29defd02 test/coredevice/test_pulses: fix first_timestamp 2015-12-29 12:43:53 +08:00
whitequark 9d7d614139 test.coredevice.rtio.CoredeviceTest.test_time_keeps_running: relax timing.
Testing ARTIQ over an SSH channel to Hong Kong is slow.
2015-12-29 02:57:33 +08:00
whitequark 0dd71946b9 test.coredevice.portability.HostVsDeviceCase.test_exceptions: update.
TypeError would never be raised with the new compiler.
It crashes in a different way now.
2015-12-29 02:18:38 +08:00
whitequark db05ec0277 test.coredevice.portability.HostVsDeviceCase.test_misc: update.
It crashes in a different way now.
2015-12-29 02:15:57 +08:00
Sebastien Bourdeauducq 7eb4067477 test/coredevice/analyzer: test TTL input mode 2015-12-26 21:10:19 +08:00
Sebastien Bourdeauducq 7475b3813e test/coredevice: PEP8 2015-12-24 19:26:42 +08:00
Sebastien Bourdeauducq bf1a3a5b8f test/coredevice: add analyzer unittest 2015-12-24 19:25:29 +08:00
Sebastien Bourdeauducq b4b0dcc5d1 test/coredevice/rtio: remove obsolete functions 2015-12-22 12:11:13 +08:00
Sebastien Bourdeauducq 23355d8eff coredevice: restore RTIOCollisionError 2015-12-22 11:59:18 +08:00
whitequark 4fb1de33c9 Initial invocation of a @kernel function can now return a value (fixes #197). 2015-12-19 05:26:18 +08:00
whitequark 52102a1a79 Fix handling of default values for RPC arguments (fixes #190). 2015-12-18 18:03:07 +08:00
Sebastien Bourdeauducq 5e38cad64c test/coredevice: partial update to new APIs 2015-12-16 19:45:57 +08:00
whitequark bd5b324fc2 Merge branch 'master' into new-py2llvm 2015-10-13 19:24:45 +03:00
whitequark 3e1348a084 Merge branch 'master' of github.com:m-labs/artiq into new-py2llvm 2015-09-27 18:22:28 +03:00
whitequark 3af54f5ffc test.coredevice.rtio: simplify. 2015-09-01 08:38:53 -06:00
whitequark 995245b786 compiler.embedding: default RPC return annotation is -> TNone. 2015-09-01 08:38:38 -06:00
whitequark c9d8fd837e test.coredevice.rtio: update for new compiler. 2015-08-31 23:34:28 -06:00