Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 29e333346754
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d5974b3af53d
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 4, 2016

  1. gui: Don't show more than the 64 working channels in moninj

    Previously, you could irreversibly set the override since
    the gateware part would accept commands for the higher channels,
    but of coure not report back the results.
    
    See GitHub #601.
    
    Signed-off-by: David Nadlinger <code@klickverbot.at>
    dnadlinger authored and sbourdeauducq committed Nov 4, 2016
    Copy the full SHA
    4e03f7a View commit details
  2. runtime/moninj: Don't try to pack more than 64 channels

    Since the status words are only 8 bytes wide, left-shifting
    by more than that is undefined behaviour (although it seems like
    we got lucky and Clang dind't decide to optimise the whole
    implementation away).
    
    See GitHub #601.
    
    Signed-off-by: David Nadlinger <code@klickverbot.at>
    dnadlinger authored and sbourdeauducq committed Nov 4, 2016
    Copy the full SHA
    d5974b3 View commit details
Showing with 6 additions and 1 deletion.
  1. +4 −0 artiq/dashboard/moninj.py
  2. +2 −1 artiq/runtime/moninj.c
4 changes: 4 additions & 0 deletions artiq/dashboard/moninj.py
Original file line number Diff line number Diff line change
@@ -207,6 +207,10 @@ def __setitem__(self, k, v):
widget = None
if v["module"] == "artiq.coredevice.ttl":
channel = v["arguments"]["channel"]
if channel > 63:
# The moninj protocol is limited to 64 channels; ignore
# any beyond that for now to avoid confusion.
return
force_out = v["class"] == "TTLOut"
widget = _TTLWidget(
channel, self.send_to_device, force_out, k)
3 changes: 2 additions & 1 deletion artiq/runtime/moninj.c
Original file line number Diff line number Diff line change
@@ -52,7 +52,8 @@ static void moninj_monitor(const ip_addr_t *addr, u16_t port)
reply.ttl_levels = 0;
reply.ttl_oes = 0;
reply.ttl_overrides = 0;
for(i=0;i<CONFIG_RTIO_REGULAR_TTL_COUNT;i++) {
/* send at most 64 channels, the protocol doesn't support more */
for(i=0;i<min(CONFIG_RTIO_REGULAR_TTL_COUNT, 64);i++) {
rtio_moninj_mon_chan_sel_write(i);
rtio_moninj_mon_probe_sel_write(0);
rtio_moninj_mon_value_update_write(1);