Commit Graph

404 Commits

Author SHA1 Message Date
Star Chen 5111132ef0
ICAP: prevent sayma from using it (#1740) 2021-08-06 15:08:30 +08:00
Star Chen 6b88ea563d
talk to ICAP primitive to restart gateware (#1733) 2021-08-05 17:00:31 +08:00
Sebastien Bourdeauducq ea0c7b6173 Merge remote-tracking branch 'harrydrtio/k7-drtio' 2021-06-15 10:04:45 +08:00
Sebastien Bourdeauducq 92fd705990 increase memory allocated to comms CPU
See discussion in #1612.
2021-02-21 19:06:12 +08:00
pca006132 8148fdb8a7
use device endian for core device protocols (#1591) 2021-01-22 16:33:21 +08:00
Harry Ho f6d39fd6ba kc705: revive DRTIO master with updated syntax
* KC705 master variant now uses Si5324 as synthesiser.
* Multi-channel has not been implemented yet.
2021-01-20 15:05:31 +08:00
Chris Ballance 43be383c86 kasli v2.0: drive TX_DISABLE low on all SFPs (fixes #1570)
This was the same problem as #1508 but on SFP1..3
2020-12-23 00:10:12 +08:00
Sebastien Bourdeauducq 90017da484 firmware: remove obsolete watchdog code (#1458) 2020-10-15 18:38:00 +08:00
Sebastien Bourdeauducq 57ee57e7ea runtime: fix metlino si5324 init (2) 2020-10-14 18:41:56 +08:00
Sebastien Bourdeauducq ac35548d0f runtime: fix metlino si5324 init 2020-10-14 12:57:25 +08:00
Sebastien Bourdeauducq 35c61ce24d si5324: unify N31 settings when used as synthesizer
Closes #1528
2020-10-12 14:45:52 +08:00
Sebastien Bourdeauducq 9214e0f3e2 firmware: fix Si5324 CKIN selection on Kasli 2.0
https://github.com/sinara-hw/Kasli/issues/82#issuecomment-702129805
2020-10-02 20:35:32 +08:00
Paweł Kulik eb350c3459 Drive SFP0 TX_DISABLE low during startup (as was in Kasli v1.1). Fixes Ethernet on SFP modules with pullup on this line.
Signed-off-by: Paweł Kulik <pawel.kulik@creotech.pl>
2020-08-24 21:39:53 +08:00
David Nadlinger 3f0cf6e683 runtime: Stop kernel CPU before restarting comms CPU on panic
Before, the system would enter a boot loop when a panic occurred
while the kernel CPU was active (and panic_reset == 1), as
kernel::start() for the startup kernel would panic.
2020-07-01 17:29:05 +08:00
Sebastien Bourdeauducq d5c1eaa16e runtime: remove stack alignment requirement
I suppose this was for TMPU, but was never finished.
2020-05-29 15:37:23 +08:00
Sebastien Bourdeauducq b83afedf43 kasli: light up ERROR LED on panic 2020-05-07 19:06:10 +08:00
Sebastien Bourdeauducq 4982fde898 firmware: I2C I/O expander support 2020-05-05 21:38:17 +08:00
Sebastien Bourdeauducq fb0ade77a9 firmware: fix non-DRTIO build 2020-04-10 17:23:17 +08:00
Sebastien Bourdeauducq 61d4614b61 sayma: fix/cleanup DRTIO-DAC sync interaction 2020-04-06 22:34:05 +08:00
Sebastien Bourdeauducq facc0357d8 drtio: make sure receive buffer is drained after ping reply 2020-04-06 22:33:15 +08:00
Sebastien Bourdeauducq bfcbffcd8d update smoltcp
This disables the 'log' features which does not compile, and may break net_trace. To be investigated later.
2020-01-21 13:58:23 +08:00
Sebastien Bourdeauducq 9dd011f4ad firmware: remove bitrotten Sayma code 2020-01-13 18:47:54 +08:00
Sebastien Bourdeauducq dfad27125e runtime: relax/fix TCP keepalive settings (#1125) 2019-12-23 19:58:10 +08:00
Sebastien Bourdeauducq c5137eeb62 firmware: remove legacy hmc542 code 2019-12-20 15:25:55 +08:00
David Nadlinger d3508b014f firmware: Add whitespace between panic handler location and message 2019-12-17 19:59:59 +00:00
Robert Jördens e0687b77f5 si5324: 10 MHz ext_ref_frequency
* close #1254
* tested on innsbruck2 kasli variant
* sponsored by Uni Innsbruck/AQT

Signed-off-by: Robert Jördens <rj@quartiq.de>
2019-11-22 18:29:12 +01:00
Sebastien Bourdeauducq a78e493b72 firmware: load slave FPGA in bootloader 2019-10-31 12:42:40 +08:00
Sebastien Bourdeauducq 8f76a3218e firmware: move i2c to libboard_misoc, enable IPv6 in bootloader, share network settings 2019-10-21 12:58:52 +08:00
Sebastien Bourdeauducq d26d80410e runtime: refactor network settings 2019-10-19 17:56:35 +08:00
Sebastien Bourdeauducq 6d5dcb4211 runtime: enable IPv6. Closes #349 2019-10-19 17:20:33 +08:00
Sebastien Bourdeauducq e9b81f6e33 remove serwb
DRTIO is a better solution
2019-10-06 18:10:23 +08:00
David Nadlinger 6d6f66338b runtime: Update core config panic_reset command suggestion message 2019-09-10 19:31:19 +01:00
Astro 90e8e074cd firmware: turn errors into &str for remote_i2c as well
should resolve breakage on a few targets/variants introduced by PR #1351
2019-08-29 09:05:47 +08:00
Astro 8fc5ce902f firmware: let kasli obtain default hardware_addr from i2c_eeprom 2019-08-17 09:15:26 +08:00
Sebastien Bourdeauducq 5a9bb0ecba runtime: fix incorrect 'RTIO clock failed' report 2019-06-24 23:33:13 +08:00
Sebastien Bourdeauducq 53c778ae2d runtime: fix previous commit 2019-06-14 15:53:01 +08:00
Sebastien Bourdeauducq a947867887 runtime: support Kasli Si5324 bypass via rtio_clock=e 2019-06-14 15:48:05 +08:00
Sebastien Bourdeauducq 66a66b03b4 style 2019-06-14 15:29:16 +08:00
Sebastien Bourdeauducq 87ce24e867 runtime: refactor startup and RTIO clocking initialization 2019-06-14 15:26:30 +08:00
Sebastien Bourdeauducq b04e15741b drop SI5324_SAYMA_REF 2019-06-14 14:03:48 +08:00
Sebastien Bourdeauducq 874542f33f add Metlino support 2019-05-19 10:57:43 +08:00
David Nadlinger 4d215cf541 firmware: Add Si5324 config for 125 MHz ext ref
PLL divider settings as suggested by DSPLLsim 5.1.
2019-04-15 22:22:19 +01:00
David Nadlinger cd7a5a3683 firmware: Fix kernel RPC handling of zero-size values (e.g. empty arrays) 2019-03-31 18:33:44 +01:00
David Nadlinger b4ddf4c86b firmware: Make "unexpected reply from kernel CPU" log messages unique
This makes it easier to localize issues based on the log output.
2019-03-31 18:31:56 +01:00
Sebastien Bourdeauducq b56c7cec1e kasli: use 100MHz RTIO and 800MHz Urukul frequencies on Berkeley target
Urukul sync is not reliable at 125/1000
2019-02-05 11:24:45 +08:00
Sebastien Bourdeauducq 3356717316 sayma: DDMTD SYSREF measurement demonstration 2019-01-25 16:00:31 +08:00
Sebastien Bourdeauducq 4941fb3300 sayma: 2.4GHz DAC clocking (4X interpolation)
* gets another clock divider out of the way
* gets one cycle within range of the HMC7043 analog delay alone
* SYSREF/RTIO alignment removed, to be replaced with DDMTD-based scheme
2019-01-25 13:47:04 +08:00
Sebastien Bourdeauducq 390f05f762 firmware: use smoltcp release 2019-01-23 16:15:05 +08:00
Sebastien Bourdeauducq a93fdb8c9d drtio: disable all destinations in gateware at startup
Otherwise, kernels fail to get a RTIODestinationUnreachable exception when attempting
to reach a DRTIO destination that has never been up.
2019-01-04 23:42:12 +08:00
whitequark dd829afebd firmware: fix another TOCTTOU race in sync/async RPC code. 2018-11-12 15:42:07 +00:00
whitequark 583bba8777 Revert "firmware: workaround for RPC failures"
This reverts commit 59033d2588.
2018-11-12 15:36:36 +00:00
whitequark 0edae64afb firmware: fix TOCTTOU race in sync/async RPC code.
Before this commit, the main loop in session code was laid like:

  1. process_kern_queued_rpc
  2. process_host_message
  3. process_kern_message

If a host message (such as an RPC reply) caused the kernel to exit,
then any async RPCs would not complete, since RunFinished immediately
shuts down the kernel.

Fix this by reordering 1 and 2.
2018-11-12 15:30:59 +00:00
Sebastien Bourdeauducq 59033d2588 firmware: workaround for RPC failures 2018-11-12 19:51:54 +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 969a305c5a Merge branch 'master' into switching125 2018-10-04 10:08:42 +08:00
Sebastien Bourdeauducq b92350b0f6 drtio: monitor RTIOClockMultiplier PLL (#1155)
Debugging by Tom Harty
2018-09-26 10:52:08 +08:00
Sebastien Bourdeauducq 1b7f403a4b drtio: remove remote RTIO PHY resets 2018-09-20 11:10:32 +08:00
Sebastien Bourdeauducq 53a979e74d rtio: cleanup resets 2018-09-20 10:58:38 +08:00
Sebastien Bourdeauducq 3d965910f7 Revert "drtio: implement per-destination underflow margins"
This reverts commit 142c952e3d.
2018-09-19 17:05:48 +08:00
Sebastien Bourdeauducq 142c952e3d drtio: implement per-destination underflow margins 2018-09-19 17:03:15 +08:00
Sebastien Bourdeauducq 62642957cd runtime: fix DRTIO aux channel race condition 2018-09-19 11:16:21 +08:00
David Nadlinger b482f5feae firmware: Use larger ARP cache
This works around a problematic interaction between ARP cache
expiry in smoltcp (with its 3 seconds timeout before a discovery
request is sent) and our TCP keepalive settings, where the timeout
is reached before the keepalive had a chance to be sent.

GitHub: Closes #1150.
2018-09-18 14:46:52 +00:00
whitequark c33f74dabe firmware: derive Clone for Mutex. 2018-09-15 15:24:44 +00: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
whitequark 1990ab35d3 firmware: implement mutexes. 2018-09-15 07:35:35 +00:00
Sebastien Bourdeauducq 2f010e0109 runtime: improve moninj aux error logging 2018-09-15 10:44:41 +08:00
Sebastien Bourdeauducq f8c6fa5ad6 typo 2018-09-15 10:43:36 +08:00
Sebastien Bourdeauducq 65da1fee4a firmware: fix build without DRTIO 2018-09-14 20:38:41 +08:00
Sebastien Bourdeauducq d19550daf8 firmware: simplify drtioaux function names 2018-09-14 20:32:09 +08:00
Sebastien Bourdeauducq ae72e3a51e firmware: add support for moninj and kern_hwreq over DRTIO switching 2018-09-14 20:26:39 +08:00
Sebastien Bourdeauducq 1ef39a98a7 drtio: implement per-destination buffer space 2018-09-13 16:16:32 +08:00
Sebastien Bourdeauducq 042b0065de runtime: print destination up message for local RTIO 2018-09-13 14:10:52 +08:00
Sebastien Bourdeauducq fa872c3341 firmware: implement DRTIO destination survey 2018-09-13 12:00:29 +08:00
Sebastien Bourdeauducq 5a9cc004f2 drtio: receive and print unsolicited aux packets
Helps with debugging and prevents the aux channel from getting stuck after packets arrive after the timeout.
2018-09-12 22:57:21 +08:00
Sebastien Bourdeauducq e36a8536d7 runtime: better handling of aux timeouts 2018-09-12 17:31:23 +08:00
Sebastien Bourdeauducq 95432a4ac1 drtio: remove old debugging features 2018-09-12 13:01:27 +08:00
Sebastien Bourdeauducq 2679a35082 firwmare: propagate DRTIO routing table and rank all the way 2018-09-11 18:28:17 +08:00
Sebastien Bourdeauducq b38c57d73b firmware: send DRTIO routing table to satellite 2018-09-11 14:12:41 +08:00
Sebastien Bourdeauducq 2fff96802b runtime: remove support for building without RTIO 2018-09-10 23:09:02 +08:00
Sebastien Bourdeauducq 19a14b68b1 runtime: program DRTIO routing table into gateware 2018-09-10 22:48:56 +08:00
Sebastien Bourdeauducq 264078baba style 2018-09-10 22:29:35 +08:00
Sebastien Bourdeauducq e01efbcb8a runtime: merge sync_tsc and wait_tsc_ack 2018-09-10 22:17:00 +08:00
Sebastien Bourdeauducq 4d889c0c4e firmware: improve DRTIO log messages 2018-09-10 21:40:02 +08:00
whitequark 0e7419450e firmware: update smoltcp.
This adds TCP window scaling support.
2018-08-20 00:26:40 +00:00
Sebastien Bourdeauducq 167e97efd2 sayma: support external RTM clocking 2018-08-17 22:57:54 +08:00
whitequark 2648b1b7a1 firmware: migrate to Rust 1.28.0.
This also updates / is a prerequisite for updating smoltcp.

Rationale for changes made:
  * compiler_builtins is now shipped in the rust prefix.
  * rustc's libpanic_unwind no longer works for us because it
    has a hard dependency on Box (and it's a horrible hack);
    fortunately, we only ever needed a personality function
    from it.
  * panic and oom handlers are now set in a completely different
    way.
  * allocators are quite different (and finally stable).
  * NLL caused internal compiler errors in runtime, so code using
    NLL was rewritten to not rely on it and it was turned off.
2018-08-12 19:17:45 +00:00
Sebastien Bourdeauducq 2008d02f4d runtime: use different default IP and MAC for different kinds of boards
This helps reduce conflicts when having many boards on a development network.
2018-08-07 10:30:50 +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
Sebastien Bourdeauducq e4d48a78eb drtio: wait for remote to ack TSC synchronization
Sayma takes a long time after TSC sync to align SYSREF, and this caused two issues:
1. Aux packets getting lost and causing error reports
2. DRTIO links reported up and kernels proceeding despite the DACs not being properly synced.
2018-07-26 20:28:17 +08:00
Sebastien Bourdeauducq 83de8b2ba2 drtio: add ping timeout during link init 2018-07-26 20:27:53 +08:00
Sebastien Bourdeauducq 446f791180 firmware: simplify SYSREF DRTIO alignment 2018-07-26 19:37:59 +08:00
Sebastien Bourdeauducq 32c95ac034 sayma: automated DAC SYSREF phase calibration 2018-07-26 16:23:55 +08:00
Sebastien Bourdeauducq d523d03f71 sayma: automated FPGA SYSREF phase offset calibration 2018-07-26 14:53:28 +08:00
Sebastien Bourdeauducq 13984385a8 firmware: version → ident 2018-07-15 17:40:17 +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
Sebastien Bourdeauducq 1c191a62bf sayma: tune SYSREF phases 2018-07-12 12:33:35 +08:00
Sebastien Bourdeauducq a8a2ad68d3 runtime: tune Sayma SYSREF phases 2018-06-27 17:31:29 +08:00
Sebastien Bourdeauducq 68530fde07 sayma: generate 100MHz from Si5324 on standalone and master targets
* Allow switching between DRTIO satellite and standalone without
  touching the hardware.
* Allow operating standalone and master without an additional RF
  signal generator.
2018-06-23 10:44:38 +08:00
Sebastien Bourdeauducq de7d64d482 sayma: clock JESD204 from GTP CLK2
This frees up GTP CLK1, which is routable to the SFP quads, for DRTIO.
2018-06-21 22:33:53 +08:00