Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test mode support via serial interface #644

Closed
jbqubit opened this issue Dec 16, 2016 · 10 comments
Closed

test mode support via serial interface #644

jbqubit opened this issue Dec 16, 2016 · 10 comments

Comments

@jbqubit
Copy link
Contributor

jbqubit commented Dec 16, 2016

Runtime test mode via serial command line interface is missing since adoption of rust. Do we want it back?

Summary of discussion started in #643...
@jordens "Test mode was removed in the move to rust. I did like it and miss it as well but it was a bit tedious to maintain and hard to test itself."
@whitequark "We can bring back test mode if there's enough interest, there's no fundamental reason for its removal."
@jbqubit "I've found the Test Mode useful in a number of circumstances and would miss its absence. This is in part a result of familiarity with that path for configuring MAC/IP and doing simple LED/IO toggle tests. I can see that openocd is a clear alternate path for setting MAC/IP." See #643 for example code.

@sbourdeauducq
Copy link
Member

Instead of having a separate mode, what about keeping the runtime (and satellite manager) responsive at all times to commands typed on the UART? This would be useful for running JESD tests as well.

@whitequark
Copy link
Contributor

Sure.

@sbourdeauducq
Copy link
Member

It may not play nice with logs though (e.g. if a log message is emitted because a TCP connection is received while the user was in the middle of typing a command). I suppose that an interface like irssi (that requires terminal control codes) would be a mess, especially for Windows users...

@whitequark
Copy link
Contributor

whitequark commented Jan 2, 2017

@sbourdeauducq does it have to be on serial specifically? If yes, we can make it modal: press Enter to suppress logs and enter commands, press ^D (that's ^Z on Windows) to return.

@sbourdeauducq
Copy link
Member

Serial is nice because it's robust and easily available. This "modal" design sounds like an acceptable compromise.

@jbqubit
Copy link
Contributor Author

jbqubit commented Jul 4, 2017

Why is this now labeled type:for-contract? It's a feature that was funded by NIST for ARTIQ v1.0.

@sbourdeauducq
Copy link
Member

Maintaining features takes work, especially when there are major code modifications or rewrites, like those involved in the ARTIQ-3 runtime. The test mode was not explicitly funded by NIST, it's just something that I had done mostly to have a way to access DDSes at a low-level; back then the ARTIQ-Python compiler was not as powerful and some of the DDS logic had to be done in C and built into the runtime. With ARTIQ-3, DDSes are exposed at a low level from kernels, which makes test mode pretty redundant.

You can use moninj for simple LED/IO toggle tests.

@jbqubit
Copy link
Contributor Author

jbqubit commented Jul 4, 2017

OK. That makes sense. Thanks for the explanation. And yes, moninj is useful for those toggle tests. :)

@sbourdeauducq
Copy link
Member

The workflow we have for bringing up new systems is:

  1. set IP and MAC using artiq_mkfs and artiq_flash
  2. perform a full system test using a kernel such as https://github.com/m-labs/artiq/blob/master/artiq/examples/kasli_basic/repository/kasli_tester.py

The tester experiment is more powerful, easier to maintain, and much more user-friendly than the test mode; and setting IP/MAC over JTAG is an acceptable alternative IMO.

@jbqubit
Copy link
Contributor Author

jbqubit commented Jul 9, 2018

I'll give it a try. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants