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

Commits on Apr 13, 2016

  1. Copy the full SHA
    7d2fa95 View commit details
  2. Copy the full SHA
    dd0e622 View commit details
  3. Copy the full SHA
    212ee8c View commit details
Showing with 43 additions and 30 deletions.
  1. +8 −10 artiq/gateware/nist_qc2.py
  2. +13 −0 doc/manual/faq.rst
  3. +22 −20 doc/manual/getting_started_mgmt.rst
18 changes: 8 additions & 10 deletions artiq/gateware/nist_qc2.py
Original file line number Diff line number Diff line change
@@ -54,20 +54,18 @@ def FPins(s):
IOStandard("LVTTL")),

("spi", next(spi),
Subsignal("clk", Pins("FMC:LA13_N")),
Subsignal("mosi", Pins("FMC:LA14_N")),
Subsignal("miso", Pins("FMC:LA17_CC_P")),
Subsignal("cs_n", Pins("FMC:LA17_CC_N")),
Subsignal("clk", FPins("FMC:LA13_N")),
Subsignal("mosi", FPins("FMC:LA14_N")),
Subsignal("miso", FPins("FMC:LA17_CC_P")),
Subsignal("cs_n", FPins("FMC:LA17_CC_N")),
IOStandard("LVTTL")),

("spi", next(spi),
Subsignal("clk", Pins("FMC:LA18_CC_P")),
Subsignal("mosi", Pins("FMC:LA18_CC_N")),
Subsignal("miso", Pins("FMC:LA23_P")),
Subsignal("cs_n", Pins("FMC:LA23_N")),
Subsignal("clk", FPins("FMC:LA18_CC_P")),
Subsignal("mosi", FPins("FMC:LA18_CC_N")),
Subsignal("miso", FPins("FMC:LA23_P")),
Subsignal("cs_n", FPins("FMC:LA23_N")),
IOStandard("LVTTL")),


]
return r

13 changes: 13 additions & 0 deletions doc/manual/faq.rst
Original file line number Diff line number Diff line change
@@ -92,3 +92,16 @@ run unit tests?
---------------

The unit tests assume that the Python environment has been set up in such a way that ``import artiq`` will import the code being tested, and that this is still true for any subprocess created. This is not the way setuptools operates as it adds the path to ARTIQ to ``sys.path`` which is not passed to subprocesses; as a result, running the tests via ``setup.py`` is not supported. The user must first install the package or set ``PYTHONPATH``, and then run the tests with e.g. ``python3.5 -m unittest discover`` in the ``artiq/test`` folder and ``lit .`` in the ``artiq/test/lit`` folder.

For the hardware-in-the-loop unit tests, set the ``ARTIQ_ROOT`` environment variable to the path to a device database containing the relevant devices.

The core device tests require the following TTL devices and connections:

* ``ttl_out``: any output-only TTL.
* ``ttl_out_serdes``: any output-only TTL that uses a SERDES (i.e. has a fine timestamp). Can be aliased to ``ttl_out``.
* ``loop_out``: : any output-only TTL. Must be physically connected to ``loop_in``. Can be aliased to ``ttl_out``.
* ``loop_in``: any input-capable TTL. Must be physically connected to ``loop_out``.
* ``loop_clock_out``: a clock generator TTL. Must be physically connected to ``loop_clock_in``.
* ``loop_clock_in``: any input-capable TTL. Must be physically connected to ``loop_clock_out``.

If TTL devices are missing, the corresponding tests are skipped.
42 changes: 22 additions & 20 deletions doc/manual/getting_started_mgmt.rst
Original file line number Diff line number Diff line change
@@ -83,23 +83,7 @@ We will use the current ``repository`` folder as working directory for making lo
$ cd repository
$ git init --bare

Start the master again with the ``-g`` flag, telling it to treat the contents of the ``repository`` folder as a bare Git repository: ::

$ cd ~/artiq-master
$ artiq_master -g

There should be no errors displayed, and if you start the GUI again you should notice an empty experiment list. We will now add our previously written experiment to it.

First, another small configuration step is needed. We must tell Git to make the master rescan the repository when new data is added to it. Create a file ``~/artiq-master/repository/hooks/post-receive`` with the following contents: ::

#!/bin/sh
artiq_client scan-repository --async

Then set the execution permission on it: ::

$ chmod 755 ~/artiq-master/repository/hooks/post-receive

The setup on the master side is now complete. All we need to do now is push data to into the bare repository. Initialize a regular (non-bare) Git repository into our working directory: ::
Now, push data to into the bare repository. Initialize a regular (non-bare) Git repository into our working directory: ::

$ cd ~/artiq-work
$ git init
@@ -114,15 +98,33 @@ and finally, push the commit into the master's bare repository: ::
$ git remote add origin ~/artiq-master/repository
$ git push -u origin master

The GUI should immediately list the experiment again, and you should be able to submit it as before.
Start the master again with the ``-g`` flag, telling it to treat the contents of the ``repository`` folder (not ``artiq-work``) as a bare Git repository: ::

$ cd ~/artiq-master
$ artiq_master -g

.. note:: You need at least one commit in the repository before you can start the master.

There should be no errors displayed, and if you start the GUI again, you will find the experiment there.

To complete the master configuration, we must tell Git to make the master rescan the repository when new data is added to it. Create a file ``~/artiq-master/repository/hooks/post-receive`` with the following contents: ::

#!/bin/sh
artiq_client scan-repository --async

Then set the execution permission on it: ::

$ chmod 755 ~/artiq-master/repository/hooks/post-receive

.. note:: Remote machines may also push and pull into the master's bare repository using e.g. Git over SSH.

Let's now make a modification to the experiment. In the source present in the working directory, add an exclamation mark at the end of "Hello World". Before committing it, check that the experiment can still be executed correctly by running it directly from the filesystem using: ::

$ artiq_client submit ~/artiq-work/mgmt_tutorial.py

.. note:: Submitting experiments outside the repository from the GUI is currently not supported. Submitting an experiment from the repository using the ``artiq_client`` command-line tool is done using the ``-R`` flag.
.. note:: You may also use the "Open file outside repository" feature of the GUI, by right-clicking on the explorer.

.. note:: Submitting an experiment from the repository using the ``artiq_client`` command-line tool is done using the ``-R`` flag.

Verify the log in the GUI. If you are happy with the result, commit the new version and push it into the master's repository: ::

@@ -134,7 +136,7 @@ Verify the log in the GUI. If you are happy with the result, commit the new vers

The master should now run the new version from its repository.

As an exercise, add another argument to the experiment, commit and push the result, and verify that the new control is added in the GUI.
As an exercise, add another experiment to the repository, commit and push the result, and verify that it appears in the GUI.

Datasets
--------