Commit Graph

850 Commits

Author SHA1 Message Date
Robert Jördens aee8965897 ad9910: add ram conversion tooling and unittests
Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-02-21 15:59:52 +00:00
Robert Jördens b57cad77ad ad9910: make ram read work for short segments
also cleanup and style

Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-02-21 14:47:58 +00:00
hartytp 0ebff04ad7 SUServo: apply bit masks to servo memory writes to prevent overflows
Signed-off-by: TPH <thomas.harty@physics.ox.ac.uk>
2019-02-07 17:04:11 +01:00
hartytp f6142816b8
Revert "SUServo: remove references to non-existent a0 parameter" (#1270)
This reverts commit f3aab2b891.

Signed-off-by: TPH <thomas.harty@physics.ox.ac.uk>
2019-02-07 15:57:43 +00:00
hartytp fe63c9b366
SUServo: remove references to non-existent a0 parameter (#1268)
Signed-off-by: Thomas Harty <thomas.harty@physics.ox.ac.uk>
2019-02-07 15:29:32 +00:00
hartytp df6c1fca2c
SUServo: flake8 [NFC] (#1267)
Signed-off-by: Thomas Harty <thomas.harty@physics.ox.ac.uk>
2019-02-07 15:13:44 +00:00
Robert Jördens 8c5a502591 ad53xx: ignore F3 (reserved)
Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-01-24 15:50:46 +01:00
Sebastien Bourdeauducq 330c5610e9 ad9912: fix imports 2019-01-23 17:59:08 +08:00
Robert Jördens b692981c8e ad9910: add note about red front panel led
Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-01-22 12:49:42 +01:00
Robert Jördens 91e375ce6a ad9910: don't reset the input divide-by-two
suspected of causing weird PLL lock timout errors
https://freenode.irclog.whitequark.org/m-labs/2019-01-22#1548148750-1548143221;

Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-01-22 09:37:20 +00:00
Robert Jördens 81ff3d4b29 ad9912: add some slack after init 2019-01-21 17:10:58 +00:00
Sebastien Bourdeauducq 84f7d006e8 ad9910: add precision about tune_io_update_delay/tune_sync_delay order 2019-01-21 19:40:55 +08:00
Sebastien Bourdeauducq 30051133b7 urukul: fix typos 2019-01-21 19:40:55 +08:00
Robert Jördens 40187d1957 ad9910: support configurable refclk divider and pll bypass
for #1248

* also always keep refclk input divider (by two) reset
2019-01-18 12:23:53 +00:00
Robert Jördens 385916a9a4 ad9912: support configurable clk_div 2019-01-18 12:16:08 +00:00
Robert Jördens 2bea5e3d58 urukul: support configurable refclk divider
for #1248
2019-01-18 12:09:32 +00:00
David Nadlinger a565f77538 Add gateware input event counter 2019-01-15 10:55:07 +00:00
David Nadlinger 6c52359e59 coredevice: Add _mu suffix to AD991x ref_time arguments
GitHub: Fixes #1243.
2019-01-12 17:34:35 +00:00
whitequark 49682d0159 Improve Python 3.7 compatibility.
async is now a full (non-contextual) keyword.

There are two more instances:
   - artiq/frontend/artiq_client.py
   - artiq/devices/thorlabs_tcube/driver.py

It is not immediately clear how to fix those, so they are left for
later work.
2019-01-12 13:17:59 +00:00
David Nadlinger 48fc175a6b coredevice.ttl: More imperative mood in docstrings [nfc]
This follows Python conventions (PEP257) and unifies the style with
other comments.
2019-01-12 12:01:55 +00:00
David Nadlinger 3e84ec2bf1 coredevice.ad9910: Fix phase tracking ref_time passing
This is difficult to test without hardware mocks or some
form of phase readback, but the symptom was that e.g.
`self.dds.set(…, ref_time=now_mu() - 1)` would fail
periodically, that is, whenever bit 32 of the timestamp
would be set (which would be turned into the sign bit).

This is a fairly sinister issue, and is probably a compiler
bug of some sort (either accepts-invalid or wrong type inference).
2019-01-12 00:47:38 +00:00
Robert Jördens 101671fbbf core_analyzer: support uniform VCD time intervals
close #1236

Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-01-10 19:35:09 +01:00
Robert Jördens 19748fe495 ad9910: fix RTIO fine timestamp nudging
Previously the TSC was truncated to an even coarse RTIO periods before doing
the setting SPI xfer. Afterwards the the IO update pulse would introduce
at least one but less than two RTIO cycles. Ultimately the RTIO TSC was
truncated again to even. If the SPI xfer takes an odd number of RTIO
periods, then a subsequent xfer would collide.

close #1229

Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-01-09 17:22:57 +00:00
Robert Jördens b25ab1fc88 ad9910: add more slack in tune_sync_delay
close #1235

Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-01-09 16:07:31 +00:00
Drew 40370c4d45 Docs: fix build warnings (#1234)
* ad9910: finish CONT_RECIRCULATE -> CONT_RAMPUP

Found while building docs. Forgot to refactor strings.

Signed-off-by: Drew Risinger <drewrisinger@users.noreply.github.com>

* spi2: reformat update_xfer_duration_mu docstring

update_xfer_duration_mu docstring threw warning while building docs,
didn't use consistent indent in warning.

Signed-off-by: Drew Risinger <drewrisinger@users.noreply.github.com>
2019-01-09 11:39:23 +08:00
David Nadlinger 4fb434674d coredevice: Fix ad9910 __all__ exports 2019-01-08 18:55:26 +00:00
David Nadlinger cadde970e1 urukul: Expand CPLD sync_sel explanation [nfc] 2019-01-08 02:37:58 +00:00
David Nadlinger 7bcdeb825b ad9910: Add inverse FTW/ASF conversions 2019-01-08 02:18:14 +00:00
David Nadlinger 4d793d7149 ad9910: Truncate phase word to 16 bits
This avoids overflowing into the asf portion of the register.
2019-01-08 02:18:14 +00:00
Robert Jördens a7d4d3bda9 ad9910: CONT_RECIRCULATE -> CONT_RAMPUP 2018-12-17 13:25:00 +00:00
Sebastien Bourdeauducq 35bdf26f01 Merge branch 'ad9910-ram' 2018-12-17 21:16:44 +08:00
David Nadlinger e608d6ffd3 coredevice, firmware: Add rtio_input_timestamped_data
Integration tests to follow as part of an RTIO counter phy that
makes use of this.
2018-12-15 00:35:04 +00:00
Robert Jördens 79eadb9465 ad9910: add RAM mode methods
* also refactor the CFR1 access into a method

c.f. #1154

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-12-11 14:54:16 +00:00
Robert Jördens efd400b02c ad9910: style [nfc]
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-12-11 11:36:25 +01:00
Robert Jördens d90eb3ae88 ad9910: add read64()
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-12-07 21:27:00 +00:00
Robert Jördens baf88050fd urukul: expand attenuator HITL unittests
* read back with cleared backing state
* individual channel settings
* check backing state

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-12-07 21:06:12 +00:00
Sebastien Bourdeauducq dce4f036db grabber: work around windows numpy int peculiarity (same as a81c12de9) 2018-11-30 18:41:14 +08:00
Sebastien Bourdeauducq 450a035f9e suservo: move overflowing RTIO address bits into data 2018-11-26 06:54:20 +08:00
Sebastien Bourdeauducq b32e89444c Merge branch 'master' into new 2018-11-26 01:02:19 +08:00
Robert Jördens a81c12de94 urukul: work around windows numpy int peculiarity
"OverflowError: Python int too large to convert to C long" otherwise

opticlock#74

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-25 16:56:45 +01:00
Sebastien Bourdeauducq 8f9858be4c ad9914: remove automatic continuous phase compensation (like Urukul) 2018-11-19 22:00:20 +08:00
Sebastien Bourdeauducq 53e79f553f Merge branch 'master' into new 2018-11-19 11:54:50 +08:00
Sebastien Bourdeauducq a3e0b1c5b4 ad9914,spi2: add warnings about driver state and DMA. Closes #1113 2018-11-17 22:10:20 +08:00
Sebastien Bourdeauducq 69e699c7bd ttl: compensate for SED latency in input gating
Closes #1137
2018-11-17 22:10:20 +08:00
Robert Jördens 3ad68f65c5 urukul: make get_att_mu() not alter state
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-16 14:56:26 +00:00
Robert Jördens d1eee7c0ea ad9910: ensure sync is driven when required
close #1194

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-16 13:21:01 +00:00
Sebastien Bourdeauducq 1b841805f6 Merge branch 'master' into new 2018-11-16 15:20:32 +08:00
Robert Jördens c3178c2cab ad9910: profile support
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-14 08:30:28 +01:00
Robert Jördens d0cadfeb4b ad9910: more idiomatic register names
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-14 07:55:01 +01:00
Robert Jördens a52d1be140 urukul: expose PROFILE setting
* add documentation
* add unittest

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-14 07:43:56 +01:00
Robert Jördens a4997c56cf ad9910: simplify edge detection logic
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-09 18:54:34 +00:00
Robert Jördens 14b6b63916 ad9910: rewire io_delay tuning
This now reliably locates the SYNC_CLK-IO_UPDATE edge by doing two
scans at different delays between start and stop IO_UPDATE.
It also works well when one delay is very close to the edge.
And it correctly identifies which (start or stop) pulse hit or crossed
the SYNC_CLK edge.

for #1143

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-09 18:38:27 +00:00
Robert Jördens 38c6878d49 urukul: mention min/max attenuation
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-09 13:32:05 +01:00
Robert Jördens e565ca6b82 urukul: slow down att write to datasheet limit
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-09 13:23:06 +01:00
Robert Jördens 998be50f07 urukul: handle MSB in att_reg
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-09 13:21:14 +01:00
Sebastien Bourdeauducq c990b5e4f1 Merge remote-tracking branch 'origin/master' into new 2018-11-08 20:21:56 +08:00
Sebastien Bourdeauducq 0bee43aa58 sawg: use new rtio_output() API 2018-11-08 20:16:30 +08:00
Sebastien Bourdeauducq bec25cbaa0 suservo: use new rtio_output() API 2018-11-08 20:13:14 +08:00
Sebastien Bourdeauducq e8d58b35b4 spi2: use new rtio_output() API 2018-11-08 20:12:30 +08:00
Sebastien Bourdeauducq d18546550e grabber: use new rtio_output() API 2018-11-08 19:15:50 +08:00
Sebastien Bourdeauducq 2549e623c1 ad9914: use new rtio_output() API 2018-11-08 19:15:44 +08:00
Sebastien Bourdeauducq 8caea0e6d3 gateware,runtime: optimize RTIO kernel interface further
* now pinning (TODO: atomicity)
* for inputs, merge request and timeout registers
2018-11-08 18:29:24 +08:00
Sebastien Bourdeauducq fae95e73ad ttl: use optimized rtio_output API 2018-11-07 23:41:43 +08:00
Sebastien Bourdeauducq 3d0c3cc1cf gateware,runtime: optimize RTIO output interface
* reduce address to 8 bits
* merge core, channel and address into 32-bit pre-computable "target"
* merge we register into data register
2018-11-07 23:39:58 +08:00
Robert Jördens e6efe830c4 ad9910: rewire sync delay tuning
* search from wide window end
* decouple margins and minimum window size
* add note about kasli jitter

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-07 14:52:03 +00:00
Sebastien Bourdeauducq ad0254c17b Merge branch 'switching125' into new 2018-11-07 22:03:18 +08:00
Robert Jördens 6c00ab57c0 test_ad9910: relax SYNC window
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-06 19:31:38 +01:00
Robert Jördens 172633c7da test_ad9910: default to a useful seed
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-06 17:35:57 +01:00
Robert Jördens 0b2661a34d ad9910: robustify SYNC window finding
don't integrate too long, find the window tip fast and early
a couple 100 SYNC pulses are sufficient

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-06 12:41:21 +00:00
Robert Jördens 31f68ddf6c Merge branch 'urukul-sync'
* urukul-sync: (29 commits)
  urukul: flake8 [nfc]
  ad9910: flake8 [nfc]
  urukul/ad9910 test: remove unused import
  test_urukul: relax speed
  urukul,ad9910: print speed metrics
  kasli: add PTB2 (external clock and SYNC)
  kasli: add sync to LUH, HUB, Opticlock
  kasli_tester: urukul0 mmcx clock defunct
  test_ad9910: relax ifc mode read
  tests: add Urukul-AD9910 HITL unittests including SYNC
  ad9910: add init bit explanation
  test: add Urukul CPLD HITL tests
  ad9910: fiducial timestamp for tracking phase mode
  ad9910: add phase modes
  ad9910: fix pll timeout loop
  tester: add urukul sync
  ptb: back out urukul-sync
  ad9910: add IO_UPDATE alignment and tuning
  urukul: set up sync_in generator
  ad9910: add io_update alignment measurement
  ...

close #1143
2018-11-05 19:54:30 +01:00
Robert Jördens 6fb18270a2 urukul: flake8 [nfc]
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:45:24 +01:00
Robert Jördens 832690af9a ad9910: flake8 [nfc]
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:44:51 +01:00
Robert Jördens 9fb850ae75 ad9910: add init bit explanation
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:37:02 +01:00
Robert Jördens bc04da15c5 test: add Urukul CPLD HITL tests
for #1143

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:37:00 +01:00
Robert Jördens 141cc7d99f ad9910: fiducial timestamp for tracking phase mode
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:58 +01:00
Robert Jördens 2f6d3f79ff ad9910: add phase modes
* simplified and cross-referenced the explanation of the different
  phase modes.
* semantically and functionally merged absolute and tracking/coherent
  phase modes.
* simplified numerics to calculate phase correction
* added warning about possible inconsistency with DMA and default
  phase mode
* restricted __all__ imports
* moved continuous/relative phase offset tracking from an instance
  variable to a "handle" returned by set()/set_mu() in order to avoid
  state inconsistency with DMA (#1113 #1115)

for #1143

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:55 +01:00
Robert Jördens d3ad2b7633 ad9910: fix pll timeout loop
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:53 +01:00
Robert Jördens 06139c0f4d ad9910: add IO_UPDATE alignment and tuning
for #1143

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:48 +01:00
Robert Jördens 1066430fa8 urukul: set up sync_in generator
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:46 +01:00
Robert Jördens 4bbd833cfe ad9910: add io_update alignment measurement
for #1143

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:44 +01:00
Robert Jördens 7b92282012 ad9910: add docs for sync tuning, refactor
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:42 +01:00
Robert Jördens 8a47a6b2fb ad9910: disable sync_clk output
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:40 +01:00
Robert Jördens 65e2ebf960 ad9910: add sync delay control, auto tuning
* expose multi device sync functionality
* sync delay configuration interface
* auto-tuning of sync delay from device_db seed

for #1143

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:37 +01:00
Robert Jördens 8dbf5f87fd ad9910: simplify io_update pulsing on init, set_mu
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:35 +01:00
Robert Jördens 0b3b07a7da ad9910: add power down method
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:34 +01:00
Robert Jördens 0433e8f4fe urukul: add sync_in generator
for #1143

Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:30 +01:00
Robert Jördens f62c1ff0bb TTLClockGen: expose acc_width
Signed-off-by: Robert Jördens <rj@quartiq.de>
2018-11-05 19:36:27 +01:00
David Nadlinger f79b9d9e1e ttl: Expand input gate/count API docstrings 2018-11-03 20:33:19 +08:00
David Nadlinger 5d2e3f975f coredevice: Add get_rtio_counter_mu() docstring [nfc] 2018-11-03 20:33:19 +08:00
David Nadlinger d6fcc0529f coredevice: Imperative mood in docstrings [nfc]
This follows Python conventions (PEP257) and unifies the style with
other comments.
2018-11-03 20:33:19 +08:00
David Nadlinger cbdef0225c ttl: Add target RTIO time argument to timestamp/count functions
Software-based tracking of timestamps is problematic (e.g. when
using DMA, see GitHub #1113).
2018-11-03 20:33:19 +08:00
David Nadlinger 2a0e1dabfb ttl: Remove unused attribute [nfc] 2018-11-03 20:33:19 +08:00
David Nadlinger 17a5fb2dce ttl: Remove error-prone sync() calls
These methods are problematic, as with DMA in the picture, the
timestamp member variables did not necessarily reflect the last
submitted event timestamp (see GitHub #1113).

sync() is only very rarely used in typical experimental code, so
the methods are removed without a transition period.
Core.wait_until() can be used to busy-wait for a specified RTIO
timestamp value on the core device CPU instead.
2018-11-03 20:33:19 +08:00
David Nadlinger 11e8c9d5f7 coredevice: Add Core.wait_until_mu()
(This supersedes TTLOut.sync(), see see GitHub #1113.)
2018-11-03 20:33:19 +08:00
David Nadlinger cbfbe24d7a ttl: Remove broken TTLClockGen.sync
The code currently doesn't compile because of a typo in the timestamp
field name. However, tracking event timestamps in software is
problematic anyway (e.g. with DMA, see GitHub #1113), so just remove
`sync()` altogether.
2018-11-03 20:33:19 +08:00
Robert Jördens 89a961fb00 urukul, ad9912, ad9910: expose CFG RF switch better
* conincident setting of multiple switches
* per channel setting
2018-10-24 13:04:46 +02:00
Robert Jördens 661dd00c4c ad9912: phase offset is 14 bit LSB aligned
c.f. sinara-hw/Urukul#15
2018-10-11 15:16:08 +02:00
hartytp 08074d5275 Urukul: add support for hardware v1.3 clocking options 2018-10-10 09:26:35 +02:00
hartytp 1a1b454ed9 Urukul: flake8 (NFC) 2018-10-08 10:09:49 +01:00
hartytp 9a509e5070 Zotino: increase delay after register read in init method to avoid underflows 2018-10-06 21:45:17 +08:00
Sebastien Bourdeauducq 969a305c5a Merge branch 'master' into switching125 2018-10-04 10:08:42 +08:00
Sebastien Bourdeauducq c71e442929 documentation improvements
Based on PR #1101 by @drewrisinger
2018-09-26 12:12:37 +08:00
Sebastien Bourdeauducq c8cd830118 drtio: implement get_rtio_destination_status for kernels 2018-09-15 19:11:22 +08:00
Sebastien Bourdeauducq d38755feff drtio: implement destination state checks on operations 2018-09-15 15:55:45 +08:00
Sebastien Bourdeauducq 95432a4ac1 drtio: remove old debugging features 2018-09-12 13:01:27 +08:00
whitequark a74958f01f ksupport: raise RuntimeError on reraise with no inflight exception.
Fixes #1123.
2018-08-07 05:53:13 +00:00
Chris Ballance 6fc8439399 tweak moninj to allow old dashboard with new firmware 2018-08-02 19:34:14 +08:00
Chris Ballance 47740c8930 share moninj injection state between dashboards
Previously if one dashboard overrode a channel this was not visible on
any other dashboard - the channel appeared to operate normally.
2018-08-02 19:34:14 +08:00
Robert Jördens 7d6a1b528d ad9912: add ftw_to_frequency 2018-08-02 11:19:12 +00:00
Robert Jördens e518a1f1d0 ad53xx: also increase slack after control readback 2018-08-02 11:19:12 +00:00
David Nadlinger 08ee91beb2 ad9910: Clarify chip_select range [nfc]
`assert 3 <= chip_select <= 7` is rather opaque without looking
at the CPLD source code otherwise.
2018-07-30 11:08:17 +01:00
David Nadlinger 6b89106578 ad53xx: Avoid sporadic RTIOUnderflow in init()
I observed sporadic RTIO underflows on Kasli before, by ~2.5 µs,
so 5 µs extra slack should be plenty. No underflows since.
2018-07-28 23:45:48 +01:00
Sebastien Bourdeauducq fb96c1140e grabber: add coredevice driver 2018-07-24 18:06:44 +08:00
Sebastien Bourdeauducq cab0ba408d fmcdio_vhdci_eem: cleanup and document 2018-07-20 09:57:03 +08:00
Sebastien Bourdeauducq 8dfcd463aa fmcdio_vhdci_eem: naming consistency 2018-07-19 15:46:04 +08:00
Sebastien Bourdeauducq fe93a454d6 fmcdio_vhdci_eem: fix direction shift register permutation and polarity 2018-07-19 15:16:21 +08:00
Sebastien Bourdeauducq 8b9a8be12a fmcdio_vhdci_eem: add dirctl word computation functions 2018-07-17 23:27:29 +08:00
Sebastien Bourdeauducq d4d12e264d fmcdio_vhdci_eem: refactor
This allows access to the pin allocation from kernels, which becomes useful
to configure the direction shift register.
2018-07-17 20:13:59 +08:00
Sebastien Bourdeauducq b27fa8964b add variant in identifier string
Also add without-sawg suffixes on Sayma.

Closes #1060
Closes #1059
2018-07-15 17:21:17 +08:00
whitequark 12fde6d34b artiq_coremgmt: fix typo.
Fixes #1056.
2018-06-23 00:36:59 +00:00
Robert Jördens 21a48711ec i2c: refactor common operations 2018-06-18 09:34:09 +00:00
Robert Jördens f9910ab242 i2c: support selecting multiple or no channels
closes #1054
2018-06-15 19:36:37 +02:00
Robert Jördens 735e4e8561 pcu: spelling 2018-06-08 14:39:22 +00:00
Robert Jördens 38971d130a comm_analyzer: fix data without any spi reads
closes #1050
2018-06-06 12:21:42 +02:00
Robert Jördens 5de2d06568 ad53xx/zotino: do not clear power down on overtemp 2018-06-01 13:17:13 +00:00
Robert Jördens 2c344686d9 ad53xx/zotino: enable overtemp shutdown and readback control 2018-06-01 13:06:52 +00:00
Robert Jördens 87d3ac9d25 suservo: swap transfer function parametrization
The integrator is now parametrized through its gain and not the PI
corner frequency. The integrator gain limit is given in absolute gain
units and not relative to the proportional gain.

close #1033
2018-06-01 09:38:18 +00:00
Sebastien Bourdeauducq e408241233 sawg: work around compiler not accepting delay_mu(int32) 2018-06-01 15:42:37 +08:00
Sebastien Bourdeauducq f5d55c6902 sawg: add 1 coarse RTIO cycle between spline resets
This keeps all events in the same SED lane and limits the number of SED lanes required.

Closes #1038
2018-06-01 15:15:24 +08:00
Robert Jördens 22506e849f suservo: clarify timings
close #1027
2018-06-01 06:35:38 +00:00
Robert Jördens a42f774440 suservo: document offset range limits
close #1034
2018-05-31 16:55:44 +00:00
Robert Jördens 36dcea3edf suservo: refactor y_mu_to_full_scale as portable
close #1032
2018-05-31 16:44:14 +00:00
Robert Jördens e136709cac suservo: document gain state
close #1030
2018-05-31 16:36:53 +00:00
Robert Jördens 5dbdc5650c suservo: document set_config and get_status more
close #1028
2018-05-31 16:32:05 +00:00
Robert Jördens e1b0fcc24e suservo: add documentation on settings and setup
close #1015
2018-05-31 16:21:09 +00:00
Robert Jördens 4e863b32a1 coredevice: configurable initial backing state
Several core device drivers maintain a copy of some device state.
Since this copy is not transferred between experiments this backing state
can be different from device state when a new experiment is started.

This commit adds support for injecting initial backing state into
experiments via the device database and sets initial backing state where
known.

ad53xx (zotino): spi2 xfer_duration
novogorny: pgia gains
sampler: pgia gains, spi2 pgia and adc xfer_duration
suservo: pgia gains, spi2 pgia xfer_duration
urukul: cpld cfg (partial: rf_sw), attenuator register
spi2: div/length for xfer_duration

close #1003
2018-05-21 18:55:06 +02:00
Sebastien Bourdeauducq 8513f0b0d4 minor cleanup 2018-05-21 15:35:00 +08:00
Sebastien Bourdeauducq b10d3ee4b4 make RTIO clock switch optional and simplify
Kasli no longer has an internal RTIO clock.
Switching clocks dynamically is no longer supported.
2018-05-18 17:41:34 +08:00
Robert Jördens bfff755295 urukul: do IO_RST also when blind 2018-05-17 14:48:49 +00:00
whitequark 31c6c79204 firmware: implement an edge profiler.
It doesn't work extremely well, and the results can be somewhat
confusing, and it needs a libunwind patch, but it's the best I could
do and it seems still useful.
2018-05-16 21:53:53 +00:00
Robert Jördens 99f7672c79 ad53xx: tweak spi readback 2018-05-16 19:08:27 +02:00
whitequark 4d06c1d84b coredevice.CommKernel: modernize. NFC. 2018-05-16 14:40:14 +00:00
whitequark ca93b94aea firmware: move config requests to management protocol.
They were only in session protocol because of historical reasons.
2018-05-16 14:32:49 +00:00
whitequark a39f8d6634 artiq_devtool: use CommMgmt instead of shelling out to artiq_coremgmt.
(Which no longer exists.)

This also fixes `artiq_devtool hotswap` to work without
an `artiq_devtool connect` running in background.
2018-05-16 14:08:32 +00:00
whitequark d446a3293e frontend: merge core{config,log,boot,debug,profile} into coremgmt. 2018-05-16 14:08:32 +00:00
Robert Jördens a100c73dfe suservo: support pure-I 2018-05-14 18:48:27 +00:00
Sebastien Bourdeauducq e121a81f21 ad9914: fix frequency_to_xftw and xftw_to_frequency 2018-05-14 23:49:00 +08:00
Sebastien Bourdeauducq 80df86f700 ad9914: set_mu_x -> set_x_mu 2018-05-14 23:49:00 +08:00
Robert Jördens 4ddb29fa02 suservo: document class arguments 2018-05-14 15:22:47 +02:00
Robert Jördens 504d37b66b suservo: add SI units functions and document
m-labs/artiq#788
2018-05-14 12:26:49 +00:00
Robert Jördens 4993ceec35 sampler: unroll conversion for speed 2018-05-14 12:26:49 +00:00
Sebastien Bourdeauducq ba1d137d19 ad9914: fix FTW write in regular resolution mode 2018-05-14 18:47:23 +08:00
Sebastien Bourdeauducq b04c7abde8 ad9914: fix kernel_invariants 2018-05-14 14:02:11 +08:00
Sebastien Bourdeauducq 56a18682a7 ad9914: minor fixes 2018-05-14 10:37:50 +08:00
Sebastien Bourdeauducq 194d6462ee ad9914: fix set_mu 2018-05-14 00:19:09 +08:00
hartytp 00cb31b804 sampler: remove v_ref parameter (#988) 2018-05-13 18:00:57 +02:00
Sebastien Bourdeauducq 3027951dd8 integrate new AD9914 driver
moninj, analyzer, docs, examples, tests.
2018-05-13 23:29:35 +08:00
Sebastien Bourdeauducq 663d8e66ba ad9914: optimize extended-resolution mode 2018-05-13 23:01:06 +08:00
Sebastien Bourdeauducq c8d91b297d coredevice: add new ad9914 driver 2018-05-13 22:30:33 +08:00
Robert Jördens f055bf88f6 suservo: add clip flags (#992) 2018-05-09 07:16:15 +00:00
whitequark b1d349cc1b firmware: implement a sampling profiler.
Does not yet support constructing call graphs.
2018-05-05 00:44:40 +00:00
Robert Jördens ae80bab180 urukul: reg based io-update is a kernel 2018-04-27 16:42:09 +00:00
Robert Jördens 5f00326c65 suservo: coeff mem write port READ_FIRST 2018-04-27 15:43:32 +00:00
Robert Jördens 73fa572275 suservo: documentation, small API changes 2018-04-27 16:53:22 +02:00
Robert Jördens 307cd07b9d suservo: lots of gateware/ runtime changes
tested/validated:

* servo enable/disable
* dds interface, timing, io_update, mask_nu
* channel control (en_out, en_iir, profile)
* profile configuration (coefficients, delays, offsets, channel)
* adc timings and waveforms measured
* asf state readback
* adc readback

individual changes below:

suservo: correct rtio readback

suservo: example, device_db [wip]

suservo: change rtio channel layout

suservo: mem ports in rio domain

suservo: sck clocked from rio_phy

suservo: cleanup, straighten out timing

suservo: dds cs polarity

suservo: simplify pipeline

suservo: drop unused eem names

suservo: decouple adc SR from IIR

suservo: expand coredevice layer

suservo: start the correct stage

suservo: actually load ctrl

suservo: refactor/tweak adc timing

suservo: implement cpld and dds init
2018-04-27 13:50:26 +02:00
Robert Jördens 01f762a8f5 urukul/ad9910: support blind init
urukul: always set io_update attribute
to silence compiler warning w.r.t. kernel_invariants
2018-04-27 13:48:40 +02:00
Robert Jördens edbc7763e0 urukul: allow no io_update_device 2018-04-25 17:32:36 +00:00
Sebastien Bourdeauducq c47d3ec8c8 zotino: use None as default for ldac and clr
This is also what AD53xx does.
2018-04-22 15:03:01 +08:00
whitequark 3b054855ec firmware: add allocator debug feature, invoked by artiq_coredebug frontend. 2018-04-21 19:39:46 +00:00
Sebastien Bourdeauducq 5ca59467fd ad53xx: make LDAC and CLR optional 2018-03-26 22:45:01 +08:00
Robert Jördens a8f0ee1c86 ad53xx: refactor offset_to_mu(), fix docs 2018-03-24 15:45:42 +01:00
Robert Jördens b0c8097025 ad53xx: remove channel index AND
It's incorrect since it doesn't respect the number of channels
of any of those chips (none has 64 channels).
2018-03-24 15:39:06 +01:00
Robert Jördens 77bcc2c78f zotino: style, use attributes to set SPI config 2018-03-24 15:37:34 +01:00
Robert Jördens 2cf414a480 ad53xx: move 8 bit shift out of ad53xx protocol funcs
That's specific to the SPI bus, not to the ad53xx.
2018-03-24 15:15:56 +01:00
Robert Jördens 08326c5727 ad53xx: style [nfc] 2018-03-24 14:10:20 +01:00
hartytp a992a672d9 coredevice/zotino: add (#969)
* Replace ad5360 driver with a ad53xx driver, designed to have a nicer interface
Add Zotino driver and add to opticlock target for Kasli
Test Zotino on hw:
 - Verify all timings on the hardware with a scope
 - Verify that we can correctly set and read back all registers in a loop (checks for SI and driver issues)
 - check we can set LEDs correctly
 - check calibration routine + all si unit functions with a good DVM
 - look at DAC transitions on a scope (while triggering of a TTL) on persist to check there are no LDAC glitches etc
To do: update examples and e.g. KC705 device db.
2018-03-24 13:41:18 +01:00
Robert Jördens 770b0a7b79 novogorny: conv -> cnv
* parity with sampler
* also add novogorny device to opticlock
2018-03-21 18:38:42 +00:00
Robert Jördens 82c4f0eed4 sampler: fix channel gain retrieval 2018-03-21 14:22:13 +01:00
Robert Jördens 97918447a3 sampler: add coredevice driver 2018-03-21 12:21:53 +00:00
Robert Jördens 80903cead7 novogorny: streamline gain setting method, style [nfc] 2018-03-21 08:53:26 +00:00
Robert Jördens 9ad1fd8f25 urukul: add comment and doc about the AD9910 MASTER_RESET 2018-03-20 17:40:03 +01:00
Robert Jördens f17c0abfe4 urukul: don't pulse DDS_RST on init
closes m-labs/artiq#940

Apparently, if the DDS are reset, every other time they don't work
properly.
2018-03-20 16:10:26 +00:00
Robert Jördens a185e8dc52 urukul: fix MASK_NU offset 2018-03-20 16:10:11 +00:00
hartytp a27b5d88c2 Novogorny driver, remove unused imports (#964)
* Novogorny driver, remove unused imports

* more unused imports

* oops, one final one!
2018-03-19 11:58:14 +01:00
Robert Jördens f39b7b33e8 ad5360: whitespace [nfc] 2018-03-17 18:51:17 +01:00
ion c1439bfd3b Fix AD5360 after migration to SPI2 2018-03-17 11:37:11 +00:00
Robert Jördens a04bd5a4fd spi2: xfers take one more cycle until ~busy 2018-03-09 20:48:17 +01:00
Robert Jördens 37ec97eb28 ad9910/2: add sw invariant only when passed 2018-03-07 21:32:59 +01:00
Robert Jördens f4dad87fd9 coredevice: add pcf8574a driver
I2C IO expander with 8 quasi-bidirectional pins
2018-03-06 14:27:19 +01:00
Sebastien Bourdeauducq 432e61bbb4 drtio: add kernel API to check for link status. Closes #941 2018-03-05 00:23:55 +08:00
Sebastien Bourdeauducq 928d5dc9b3 drtio: raise RTIOLinkError if operation fails due to link lost (#942) 2018-03-04 01:02:53 +08:00
Sebastien Bourdeauducq abfbadebb5 doc: DMA can also raise RTIOUnderflow 2018-03-03 13:14:34 +08:00
Robert Jördens cc70578f1f remove old spi RTIO Phy 2018-03-01 11:19:18 +01:00
Robert Jördens a7720d05cd firmware, sayma: port converter_spi to spi2
* ksupport/nrt_bus
* port ad9154, hmc830, hmc7043
* port local_spi and drtio_spi
* port kernel_proto libdrtioaux, satman
* change sayma_rtm gateware over
* add spi2 NRTSPIMaster
* remove spi NRTSPIMaster
* change sayma device_db
* change HMC830 to open mode and explicitly sequence open mode
2018-03-01 11:19:18 +01:00
Robert Jördens 5046d6a529 ad9912/10: add a bit more slack to init() 2018-02-27 23:14:44 +01:00
Robert Jördens b466a569bf coredevice: export spi2 2018-02-24 09:49:31 +01:00
Robert Jördens cff85ee13b novogorny: simplify and fix coefficient 2018-02-23 10:09:44 +01:00
Robert Jördens bc5e949bb4 novogorny: fix gain register length 2018-02-22 18:45:55 +00:00
Robert Jördens 1452cd7447 novogorny: add coredevice driver and test with Kasli
m-labs/artiq#687
2018-02-22 17:19:51 +01:00
Robert Jördens 74517107f0 ad9912: add slack after prodid read 2018-02-22 17:19:51 +01:00
Robert Jördens e8d4db1ccf coreanalyzer: add spi2 support
m-labs/artiq#926
2018-02-22 11:28:46 +01:00
Robert Jördens f8e6b4f4e3 ad5360: port to spi2
* kc705 nist_clock target gateware
* coredevice driver
* moninj code
* test/example/device_db

This is untested as we don't have a AD5360 board right now.
Will be tested with Zotino v1.1

m-labs/artiq#926
2018-02-22 10:25:46 +01:00
Robert Jördens 898bad5abc spi2: fixes 2018-02-21 19:41:05 +01:00
Robert Jördens a63fd306af urukul: use spi2
* switch kc705 and kasli targets to spi2 gateware on urukul
* rewrite urukul, ad9912, ad9910
* update example experiments, device_dbs
2018-02-21 15:00:28 +00:00
Robert Jördens 37a0d6580b spi2: add RTIO gateware and coredevice driver
1006218997
2018-02-21 13:37:36 +00:00
Sebastien Bourdeauducq 4b4090518b drtio: clean up remnants of removed debug functions 2018-02-19 15:14:32 +08:00
Robert Jördens caedcd5a15 ad9912: cleanup, document init() 2018-02-18 11:38:16 +01:00
Robert Jördens 75c89422c9 ad991[02]: sysclk can be 1 GHz 2018-02-18 10:29:19 +00:00
Robert Jördens 2adba3ed33 urukul: document ad9912, and cpld, fix api 2018-02-14 09:45:17 +01:00
Robert Jördens ede98679fc ad9910: add documentation 2018-02-14 09:05:03 +01:00
Robert Jördens 7f1bfddeda ad9910: tweak spi timing for higher speed 2018-02-13 22:13:40 +01:00
Robert Jördens 6a6695924f urukul: proto 8 2018-02-13 22:13:40 +01:00
Robert Jördens bc6af03a61 urukul: (proto 7) drop att_le 2018-02-13 22:13:40 +01:00
Robert Jördens 5a9035b122 urukul: faster spi clock 2018-01-22 18:27:40 +00:00
Robert Jördens ca1fdaa190 ad9910: relax timing for faster spi clock 2018-01-22 18:27:40 +00:00
Sebastien Bourdeauducq dc593ec0f0 Merge branch 'rtio-sed' into sed-merge 2018-01-10 12:04:54 +08:00
Robert Jördens 67746cc7a0 urukul: raise instead of assert, clean up 2018-01-03 19:22:36 +00:00
Robert Jördens eae7584432 ad9910: add [wip] 2018-01-03 18:43:04 +00:00
Robert Jördens 7ac809f8b3 urukul: do io reset 2018-01-03 18:43:04 +00:00
Robert Jördens 28a3ee7e61 urukul: make STA reading robust, add io_rst(), clean up 2018-01-03 18:43:04 +00:00
Robert Jördens cef40eef43 ad9912: clean up 2018-01-03 18:43:04 +00:00
Robert Jördens d8dbab024d urukul: don't deal with dds_reset for now 2018-01-03 18:43:04 +00:00
Robert Jördens a940550e47 urukul: add CPLD and AD9912 driver [wip] 2018-01-02 19:59:24 +01:00
whitequark a2bc12da68 Only print gateware/software mismatch warning once per process. 2017-12-26 21:13:46 +00:00
Robert Jördens 7f15f50878 coredevice/ad9912: add [untested, wip] 2017-11-24 18:47:46 +01:00
Sebastien Bourdeauducq 280392708d sawg: fix typo 2017-11-22 20:06:02 +08:00
Sebastien Bourdeauducq 4deeccbead coredevice: add shift register driver 2017-10-31 23:13:06 +08:00
Sebastien Bourdeauducq 42aca0d64a ad5360: revert incorrect part of a9798ae2
We don't have enumerate() yet.
2017-10-23 18:50:50 +08:00
Sebastien Bourdeauducq a9798ae2b1 gateware/spi: style 2017-10-23 18:46:18 +08:00
Sebastien Bourdeauducq 5437f0e3e3 rtio: make sequence errors consistently asychronous 2017-09-29 14:40:06 +08:00
Thao e94d2d3779 set range for divider values 2017-09-21 14:26:16 +08:00
Sebastien Bourdeauducq 189020344c spi: fix typo in doc 2017-07-20 22:18:21 +08:00
Sebastien Bourdeauducq d0b21a8e85 manual: add short description of drivers, with replace support information. Closes #777 2017-07-20 12:01:29 +08:00
Robert Jördens 471605ec1e pdq: move to https://github.com/m-labs/pdq 2017-07-19 17:35:28 +02:00
whitequark dd87508a7f Implement forwarding of logs from core device to master.
Fixes #691.
2017-07-18 05:31:59 +00:00
Robert Jördens d96c2abe44 pdq: read/write_reg -> get/set_reg
see also m-labs/pdq#14
2017-07-17 21:45:46 +02:00
Sebastien Bourdeauducq 9045b4cc19 drtio: initial firmware support for multi-link 2017-07-18 00:40:21 +08:00
Robert Jördens f0841f5489 spline: be really verbose
closes #773
2017-07-07 11:43:58 +02:00
Robert Jördens 3bc0e32dc0 sawg: advance the timeline on Config access
c.f. #773 #765
2017-07-07 11:33:58 +02:00
Robert Jördens 3222f5036f sawg: describe latency matching in detail 2017-07-06 10:06:21 +02:00
Robert Jördens 91ca9fbcad sawg: also give offset some headroom
closes #771
2017-07-04 16:50:06 +02: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
whitequark fdb24ef139 coredevice: truncate overlong exception messages.
If we have a really long one (megabytes) then this may exhaust
the heap of the core device and crash it.
2017-06-25 04:39:08 +00:00
Robert Jördens 53be34a25f sawg: clear phase accu in reset 2017-06-22 13:27:49 +02:00
Robert Jördens 4b3aad2563 sawg: clean up Config
* unify I and Q data limiters. there is no conceivable way why they
would be different.
* reorder clr bits to be like consistent
* move the sat add limiter to before the hbf again
2017-06-22 10:26:29 +02:00
Sebastien Bourdeauducq 8c56a95fa2 spi: add default busno 2017-06-20 00:49:38 +08:00
Sebastien Bourdeauducq 470bce6214 coredevice: add AD9154 SPI access driver 2017-06-20 00:48:50 +08:00
Sebastien Bourdeauducq a6d06824e7 fix indentation 2017-06-20 00:12:11 +08:00
Sebastien Bourdeauducq 8f2d85fc5b add back ad9154_reg.py 2017-06-19 23:45:32 +08:00
Sebastien Bourdeauducq c86029bca2 i2c: expose restart as syscall, add structure for I2C-over-DRTIO 2017-06-19 23:44:51 +08:00