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: 692791f0bd4d
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: 14c7b1578586
Choose a head ref

Commits on Jul 24, 2015

  1. Copy the full SHA
    7d81520 View commit details
  2. Copy the full SHA
    5b62b24 View commit details
  3. Copy the full SHA
    928775f View commit details
  4. Copy the full SHA
    f210e0d View commit details
  5. gui: add console

    sbourdeauducq committed Jul 24, 2015
    Copy the full SHA
    ef8b09d View commit details

Commits on Jul 25, 2015

  1. Copy the full SHA
    5979f85 View commit details
  2. Copy the full SHA
    9fe6576 View commit details
  3. Copy the full SHA
    8bc1dd9 View commit details
  4. Copy the full SHA
    05dd11a View commit details
  5. Copy the full SHA
    61f45f5 View commit details
  6. Copy the full SHA
    696bceb View commit details
  7. Copy the full SHA
    3c6a4b8 View commit details
  8. Copy the full SHA
    d14a31f View commit details
  9. Copy the full SHA
    aba2d3f View commit details

Commits on Jul 26, 2015

  1. Update manual install instructions.

    whitequark committed Jul 26, 2015
    Copy the full SHA
    e5acdfe View commit details
  2. Copy the full SHA
    95f7be0 View commit details
  3. Fix Mock usage in sphinx configuration.

    whitequark committed Jul 26, 2015
    Copy the full SHA
    163edc0 View commit details
  4. Add a setuptools command to rsync the documentation.

    whitequark committed Jul 26, 2015
    Copy the full SHA
    cf16da5 View commit details
  5. Copy the full SHA
    d252a00 View commit details
  6. Update ldscripts with -fPIC support.

    whitequark committed Jul 26, 2015
    Copy the full SHA
    1d9f408 View commit details

Commits on Jul 27, 2015

  1. Merge branch 'master' into new-py2llvm

    whitequark committed Jul 27, 2015
    Copy the full SHA
    7903889 View commit details
  2. lit-test/compiler -> lit-test/test.

    Other directories in lit-test will host various parts of
    the test harness.
    whitequark committed Jul 27, 2015
    Copy the full SHA
    862ac1f View commit details
  3. Add a test harness for exceptions.

    The libunwind.h is duplicated here so that it would be possible
    to test the Python parts without pulling in misoc.
    whitequark committed Jul 27, 2015
    Copy the full SHA
    14c7b15 View commit details
Showing with 697 additions and 168 deletions.
  1. +1 −0 .gitignore
  2. +13 −8 .travis/get-toolchain.sh
  3. +5 −0 artiq/compiler/testbench/jit.py
  4. +15 −2 artiq/frontend/artiq_gui.py
  5. +1 −1 artiq/frontend/artiq_run.py
  6. +23 −0 artiq/gui/console.py
  7. +2 −2 artiq/gui/explorer.py
  8. +9 −0 artiq/gui/log.py
  9. +8 −5 artiq/gui/parameters.py
  10. +3 −0 artiq/gui/results.py
  11. +8 −6 artiq/gui/scan.py
  12. +3 −1 artiq/gui/schedule.py
  13. +13 −0 artiq/gui/tools.py
  14. +8 −27 artiq/protocols/pc_rpc.py
  15. +23 −1 artiq/protocols/pyon.py
  16. +3 −2 artiq/test/serialization.py
  17. +3 −1 doc/manual/conf.py
  18. +49 −47 doc/manual/installing.rst
  19. +1 −1 examples/master/ddb.pyon
  20. +5 −7 examples/master/repository/flopping_f_simulation.py
  21. +4 −0 lit-test/libartiq_personality/Makefile
  22. +1 −0 lit-test/libartiq_personality/__cxxabi_config.h
  23. +329 −0 lit-test/libartiq_personality/unwind.h
  24. +0 −12 lit-test/lit.cfg
  25. 0 lit-test/{compiler → test}/codegen/warning_useless_bool.py
  26. +4 −0 lit-test/test/exceptions/raise.py
  27. 0 lit-test/{compiler → test}/inferencer/builtin_calls.py
  28. 0 lit-test/{compiler → test}/inferencer/coerce.py
  29. 0 lit-test/{compiler → test}/inferencer/error_assert.py
  30. 0 lit-test/{compiler → test}/inferencer/error_builtin_calls.py
  31. 0 lit-test/{compiler → test}/inferencer/error_call.py
  32. 0 lit-test/{compiler → test}/inferencer/error_coerce.py
  33. 0 lit-test/{compiler → test}/inferencer/error_comprehension.py
  34. 0 lit-test/{compiler → test}/inferencer/error_control_flow.py
  35. 0 lit-test/{compiler → test}/inferencer/error_exception.py
  36. 0 lit-test/{compiler → test}/inferencer/error_iterable.py
  37. 0 lit-test/{compiler → test}/inferencer/error_local_unbound.py
  38. 0 lit-test/{compiler → test}/inferencer/error_locals.py
  39. 0 lit-test/{compiler → test}/inferencer/error_return.py
  40. 0 lit-test/{compiler → test}/inferencer/error_subscript.py
  41. 0 lit-test/{compiler → test}/inferencer/error_unify.py
  42. 0 lit-test/{compiler → test}/inferencer/exception.py
  43. 0 lit-test/{compiler → test}/inferencer/gcd.py
  44. 0 lit-test/{compiler → test}/inferencer/prelude.py
  45. 0 lit-test/{compiler → test}/inferencer/scoping.py
  46. 0 lit-test/{compiler → test}/inferencer/unify.py
  47. 0 lit-test/{compiler → test}/integration/arithmetics.py
  48. 0 lit-test/{compiler → test}/integration/attribute.py
  49. 0 lit-test/{compiler → test}/integration/bool.py
  50. 0 lit-test/{compiler → test}/integration/builtin.py
  51. 0 lit-test/{compiler → test}/integration/compare.py
  52. 0 lit-test/{compiler → test}/integration/for.py
  53. 0 lit-test/{compiler → test}/integration/function.py
  54. 0 lit-test/{compiler → test}/integration/if.py
  55. 0 lit-test/{compiler → test}/integration/lambda.py
  56. 0 lit-test/{compiler → test}/integration/list.py
  57. 0 lit-test/{compiler → test}/integration/locals.py
  58. 0 lit-test/{compiler → test}/integration/print.py
  59. 0 lit-test/{compiler → test}/integration/subscript.py
  60. 0 lit-test/{compiler → test}/integration/tuple.py
  61. 0 lit-test/{compiler → test}/integration/while.py
  62. +23 −0 lit-test/test/lit.cfg
  63. 0 lit-test/{compiler → test}/local_access/invalid.py
  64. 0 lit-test/{compiler → test}/local_access/valid.py
  65. 0 lit-test/{compiler → test}/monomorphism/error_notmono.py
  66. 0 lit-test/{compiler → test}/monomorphism/integers.py
  67. +13 −2 setup.py
  68. +25 −0 soc/runtime/artiq_personality.c
  69. +63 −0 soc/runtime/kloader.c
  70. +6 −0 soc/runtime/kloader.h
  71. +11 −1 soc/runtime/ksupport.ld
  72. +11 −1 soc/runtime/linker.ld
  73. +4 −1 soc/runtime/main.c
  74. +7 −40 soc/runtime/session.c
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -14,3 +14,4 @@ doc/manual/_build
/.coverage
examples/master/results
Output/
/lit-test/libartiq_personality/libartiq_personality.so
21 changes: 13 additions & 8 deletions .travis/get-toolchain.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/sh

packages="https://people.phys.ethz.ch/~robertjo/artiq-dev/or1k-gcc_20141105-1_amd64.deb
https://people.phys.ethz.ch/~robertjo/artiq-dev/or1k-binutils_20141105-1_amd64.deb
http://us.archive.ubuntu.com/ubuntu/pool/universe/i/iverilog/iverilog_0.9.7-1_amd64.deb"
packages="http://us.archive.ubuntu.com/ubuntu/pool/universe/i/iverilog/iverilog_0.9.7-1_amd64.deb"
archives="http://fehu.whitequark.org/files/binutils-or1k.tbz2 http://fehu.whitequark.org/files/llvm-or1k.tbz2"

mkdir -p packages

@@ -13,12 +12,18 @@ do
dpkg -x $pkg_name packages
done

export PATH=$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:$PATH
for a in $archives
do
wget $a
(cd packages && tar xvf ../$(basename $a))
done

export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:$PATH
export LD_LIBRARY_PATH=$PWD/packages/usr/lib/x86_64-linux-gnu:$PWD/packages/usr/local/x86_64-unknown-linux-gnu/or1k-elf/lib:$LD_LIBRARY_PATH

echo -e "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $HOME/.mlabs/build_settings.sh
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $HOME/.mlabs/build_settings.sh
echo "export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$PATH" >> $HOME/.mlabs/build_settings.sh

or1k-elf-as --version
or1k-elf-gcc --version
or1k-linux-as --version
llc --version
clang --version
llvm-as --version || true
5 changes: 5 additions & 0 deletions artiq/compiler/testbench/jit.py
Original file line number Diff line number Diff line change
@@ -10,6 +10,11 @@
llvm.check_jit_execution()

def main():
while sys.argv[1].startswith("+"):
if sys.argv[1] == "+load":
llvm.load_library_permanently(sys.argv[2])
del sys.argv[1:3]

def process_diagnostic(diag):
print("\n".join(diag.render()))
if diag.level in ("fatal", "error"):
17 changes: 15 additions & 2 deletions artiq/frontend/artiq_gui.py
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
from artiq.gui.parameters import ParametersDock
from artiq.gui.schedule import ScheduleDock
from artiq.gui.log import LogDock
from artiq.gui.console import ConsoleDock


data_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
@@ -99,7 +100,7 @@ def main():
area.addDock(d_params, "above", d_results)
area.addDock(d_explorer, "above", d_params)

d_schedule = ScheduleDock(schedule_ctl)
d_schedule = ScheduleDock(status_bar, schedule_ctl)
loop.run_until_complete(d_schedule.sub_connect(
args.server, args.port_notify))
atexit.register(lambda: loop.run_until_complete(d_schedule.sub_close()))
@@ -109,7 +110,19 @@ def main():
args.server, args.port_notify))
atexit.register(lambda: loop.run_until_complete(d_log.sub_close()))

area.addDock(d_log, "bottom")
pdb = AsyncioClient()
loop.run_until_complete(pdb.connect_rpc(
args.server, args.port_control, "master_pdb"))
atexit.register(lambda: pdb.close_rpc())
def _get_parameter(k, v):
asyncio.async(pdb.set(k, v))
d_console = ConsoleDock(
d_params.get_parameter,
_get_parameter,
d_results.get_result)

area.addDock(d_console, "bottom")
area.addDock(d_log, "above", d_console)
area.addDock(d_schedule, "above", d_log)

win.show()
2 changes: 1 addition & 1 deletion artiq/frontend/artiq_run.py
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ def build(self):
def run(self):
with open(self.file, "rb") as f:
self.core.comm.load(f.read())
self.core.comm.run("run", False)
self.core.comm.run("run")
self.core.comm.serve(dict(), dict())


23 changes: 23 additions & 0 deletions artiq/gui/console.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from pyqtgraph import console, dockarea


_help = """
This is an interactive Python console.
The following functions are available:
get_parameter(key)
set_parameter(key, value) [asynchronous update]
get_result(key) [real-time results only]
"""

class ConsoleDock(dockarea.Dock):
def __init__(self, get_parameter, set_parameter, get_result):
dockarea.Dock.__init__(self, "Console", size=(1000, 300))
ns = {
"get_parameter": get_parameter,
"set_parameter": set_parameter,
"get_result": get_result
}
c = console.ConsoleWidget(namespace=ns, text=_help)
self.addWidget(c)
4 changes: 2 additions & 2 deletions artiq/gui/explorer.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

from artiq.protocols.sync_struct import Subscriber
from artiq.protocols import pyon
from artiq.gui.tools import DictSyncModel
from artiq.gui.tools import DictSyncModel, force_spinbox_value
from artiq.gui.scan import ScanController


@@ -73,7 +73,7 @@ def __init__(self, procdesc):
if procdesc["unit"]:
self.setSuffix(" " + procdesc["unit"])
if "default" in procdesc:
self.setValue(procdesc["default"])
force_spinbox_value(self, procdesc["default"])

def get_argument_value(self):
return self.value()
9 changes: 9 additions & 0 deletions artiq/gui/log.py
Original file line number Diff line number Diff line change
@@ -12,6 +12,15 @@ def __init__(self, parent, init):
ListSyncModel.__init__(self,
["RID", "Message"],
parent, init)
self.fixed_font = QtGui.QFont()
self.fixed_font.setFamily("Monospace")

def data(self, index, role):
if (role == QtCore.Qt.FontRole and index.isValid()
and index.column() == 1):
return self.fixed_font
else:
return ListSyncModel.data(self, index, role)

def convert(self, v, column):
return v[column]
13 changes: 8 additions & 5 deletions artiq/gui/parameters.py
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ def __init__(self):

self.search = QtGui.QLineEdit()
self.search.setPlaceholderText("search...")
self.search.editingFinished.connect(self.search_parameters)
self.search.editingFinished.connect(self._search_parameters)
grid.addWidget(self.search, 0, 0)

self.table = QtGui.QTableView()
@@ -43,7 +43,10 @@ def __init__(self):
QtGui.QHeaderView.ResizeToContents)
grid.addWidget(self.table, 1, 0)

def search_parameters(self):
def get_parameter(self, key):
return self.table_model.backing_store[key]

def _search_parameters(self):
model = self.table.model()
parentIndex = model.index(0, 0)
numRows = model.rowCount(parentIndex)
@@ -66,6 +69,6 @@ def sub_close(self):
yield from self.subscriber.close()

def init_parameters_model(self, init):
table_model = ParametersModel(self.table, init)
self.table.setModel(table_model)
return table_model
self.table_model = ParametersModel(self.table, init)
self.table.setModel(self.table_model)
return self.table_model
3 changes: 3 additions & 0 deletions artiq/gui/results.py
Original file line number Diff line number Diff line change
@@ -55,6 +55,9 @@ def __init__(self, dialog_parent, dock_area):

self.displays = dict()

def get_result(self, key):
return self.table_model.backing_store[key]

@asyncio.coroutine
def sub_connect(self, host, port):
self.subscriber = Subscriber("rt_results", self.init_results_model,
14 changes: 8 additions & 6 deletions artiq/gui/scan.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from quamash import QtGui
from pyqtgraph import LayoutWidget

from artiq.gui.tools import force_spinbox_value


class _Range(LayoutWidget):
def __init__(self, global_min, global_max, global_step, unit):
@@ -33,9 +35,9 @@ def apply_properties(spinbox):
self.addWidget(self.npoints, 0, 5)

def set_values(self, min, max, npoints):
self.min.setValue(min)
self.max.setValue(max)
self.npoints.setValue(npoints)
force_spinbox_value(self.min, min)
force_spinbox_value(self.max, max)
force_spinbox_value(self.npoints, npoints)

def get_values(self):
return {
@@ -97,13 +99,13 @@ def __init__(self, procdesc):
d = procdesc["default"]
if d["ty"] == "NoScan":
self.noscan.setChecked(True)
self.v_noscan.setValue(d["value"])
force_spinbox_value(self.v_noscan, d["value"])
elif d["ty"] == "LinearScan":
self.linear.setChecked(True)
self.v_linear.set_values(d["min"], d["max"], d["step"])
self.v_linear.set_values(d["min"], d["max"], d["npoints"])
elif d["ty"] == "RandomScan":
self.random.setChecked(True)
self.v_random.set_values(d["min"], d["max"], d["step"])
self.v_random.set_values(d["min"], d["max"], d["npoints"])
elif d["ty"] == "ExplicitScan":
self.explicit.setChecked(True)
self.v_explicit.insert(" ".join(
4 changes: 3 additions & 1 deletion artiq/gui/schedule.py
Original file line number Diff line number Diff line change
@@ -46,9 +46,10 @@ def convert(self, k, v, column):


class ScheduleDock(dockarea.Dock):
def __init__(self, schedule_ctl):
def __init__(self, status_bar, schedule_ctl):
dockarea.Dock.__init__(self, "Schedule", size=(1000, 300))

self.status_bar = status_bar
self.schedule_ctl = schedule_ctl

self.table = QtGui.QTableView()
@@ -86,4 +87,5 @@ def delete_clicked(self):
if idx:
row = idx[0].row()
rid = self.table_model.row_to_key[row]
self.status_bar.showMessage("Deleted RID {}".format(rid))
asyncio.async(self.delete(rid))
13 changes: 13 additions & 0 deletions artiq/gui/tools.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
from quamash import QtCore


def force_spinbox_value(spinbox, value):
if spinbox.minimum() > value:
spinbox.setMinimum(value)
if spinbox.maximum() < value:
spinbox.setMaximum(value)
spinbox.setValue(value)


def short_format(v):
t = type(v)
if t is int or t is float:
return str(v)
elif t is str:
if len(v) < 15:
return "\"" + v + "\""
else:
return "\"" + v[:12] + "\"..."
else:
r = t.__name__
if t is list or t is dict or t is set:
Loading