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: ffe4ee91372a
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: c1f9fc2ae475
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 15, 2015

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ecf6b29 View commit details
  2. runtime: keep .bin

    sbourdeauducq committed Apr 15, 2015
    Copy the full SHA
    9cfe00e View commit details
  3. Copy the full SHA
    c1f9fc2 View commit details
Showing with 8 additions and 24 deletions.
  1. +5 −21 artiq/coredevice/rtio.py
  2. +2 −2 soc/runtime/Makefile
  3. +1 −1 soc/runtime/mailbox.c
26 changes: 5 additions & 21 deletions artiq/coredevice/rtio.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ class LLRTIOOut(AutoDB):
This is meant to be used mostly in drivers; consider using
``RTIOOut`` instead.
"""
class DBKeys:
core = Device()
@@ -29,7 +28,6 @@ def set_o(self, t, value):
:param t: timestamp in RTIO cycles (64-bit integer).
:param value: value to set at the output.
"""
syscall("rtio_set_o", t, self.channel, value)

@@ -38,7 +36,6 @@ def on(self, t):
"""Turns the RTIO channel on.
:param t: timestamp in RTIO cycles (64-bit integer).
"""
self.set_o(t, 1)

@@ -47,7 +44,6 @@ def off(self, t):
"""Turns the RTIO channel off.
:param t: timestamp in RTIO cycles (64-bit integer).
"""
self.set_o(t, 0)

@@ -65,7 +61,6 @@ class RTIOOut(AutoDB):
:param core: core device
:param channel: channel number
"""
class DBKeys:
core = Device()
@@ -107,9 +102,7 @@ def off(self):

@kernel
def pulse(self, duration):
"""Pulses the output high for the specified duration.
"""
"""Pulses the output high for the specified duration."""
self.on()
delay(duration)
self.off()
@@ -144,38 +137,30 @@ def _set_sensitivity(self, value):

@kernel
def gate_rising(self, duration):
"""Register rising edge events for the specified duration.
"""
"""Register rising edge events for the specified duration."""
self._set_sensitivity(1)
delay(duration)
self._set_sensitivity(0)

@kernel
def gate_falling(self, duration):
"""Register falling edge events for the specified duration.
"""
"""Register falling edge events for the specified duration."""
self._set_sensitivity(2)
delay(duration)
self._set_sensitivity(0)

@kernel
def gate_both(self, duration):
"""Register both rising and falling edge events for the specified
duration.
"""
duration."""
self._set_sensitivity(3)
delay(duration)
self._set_sensitivity(0)

@kernel
def count(self):
"""Poll the RTIO input during all the previously programmed gate
openings, and returns the number of registered events.
"""
openings, and returns the number of registered events."""
count = 0
while syscall("rtio_get", self.channel, self.previous_timestamp) >= 0:
count += 1
@@ -187,7 +172,6 @@ def timestamp(self):
the gating.
If the gate is permanently closed, returns a negative value.
"""
return cycles_to_time(syscall("rtio_get", self.channel,
self.previous_timestamp))
4 changes: 2 additions & 2 deletions soc/runtime/Makefile
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ $(error failed to determine UP/AMP build)
endif
endif

all: runtime.fbi
all: runtime.bin runtime.fbi

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)
@@ -30,7 +30,7 @@ all: runtime.fbi
@chmod -x $@

%.fbi: %.bin
$(MSCDIR)/mkmscimg.py -f -o $@ $<
@echo " MSCIMG " $@ && $(MSCDIR)/mkmscimg.py -f -o $@ $<

runtime.elf: $(OBJECTS) libs
$(LD) $(LDFLAGS) \
2 changes: 1 addition & 1 deletion soc/runtime/mailbox.c
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

#include "mailbox.h"

#define KERNELCPU_MAILBOX MMPTR(0xd0000000)
#define KERNELCPU_MAILBOX MMPTR(0xf0000000)

static unsigned int last_transmission;