You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working with the firmware, it would be nice if a little more debug functionality was baked directly into the firmware. In particular, the ability to dump the current instruction table would be very helpful for debugging how set commands are getting parsed. However, since the instruction memory is shared with the binary executable storage, I'm wary of adding too much new functionality to the firmware that is only useful for debugging. So I have three categories of things. Feel free to suggest others.
New uC commands
readtable command that reads the current instruction memory as a single binary block (basically the reverse of setb).
getmode command that returns the current operational mode of the firmware, as well as instruction memory layout for that mode (including number of channels). Goal is that the string that comes out could be passed to a numpy structured array contructor with minimal processing, and then use that empty array as the container for the pyserial binary read command readtable.
clkstatus command that returns the current clock configuration (ie internal/external, frequency, mult)
getstate command that returns readable strings of the current output state of all channels. Probably not necessary if the python snippet for readregs is easily available
Expanded/modified existing uC commands
setclock should probably contain mult as an optional parameter, and the setmult command removed
status should have finer resolution. By this, I mean that labscript integration tends to be smoother if the device mirrors the logical device states that labscript uses. For example: stopped, running (buffered), transitioning to manual/buffered, aborting, aborted (last execution)
readregs should be documented, potentially improved
python snippets (given how little processing the uC does on debug commands, would should put together some standard python snippets that are easy to copy, or even import, for handling their output)
handler for readregs that prints current device state in human readable form, may be a good enough substitute for same functionality directly in uC (as a getstate command). Should probably also leverage a clkstatus command so results scale with clock frequency properly.
handler for getmode and readtable combo that prints human readable version of instruction table (ideal for small tables used in debugging only)
probably a step too far, but some simple code that documents clearly what the device specs are (ie max instructions and resolution) versus configuration (ie mode and clock frequency). Probably only useful for generating tables to include in the readme though...
The text was updated successfully, but these errors were encountered:
Working with the firmware, it would be nice if a little more debug functionality was baked directly into the firmware. In particular, the ability to dump the current instruction table would be very helpful for debugging how
set
commands are getting parsed. However, since the instruction memory is shared with the binary executable storage, I'm wary of adding too much new functionality to the firmware that is only useful for debugging. So I have three categories of things. Feel free to suggest others.readtable
command that reads the current instruction memory as a single binary block (basically the reverse ofsetb
).getmode
command that returns the current operational mode of the firmware, as well as instruction memory layout for that mode (including number of channels). Goal is that the string that comes out could be passed to a numpy structured array contructor with minimal processing, and then use that empty array as the container for the pyserial binary read commandreadtable
.clkstatus
command that returns the current clock configuration (ie internal/external, frequency, mult)getstate
command that returns readable strings of the current output state of all channels. Probably not necessary if the python snippet forreadregs
is easily availablesetclock
should probably containmult
as an optional parameter, and thesetmult
command removedstatus
should have finer resolution. By this, I mean that labscript integration tends to be smoother if the device mirrors the logical device states that labscript uses. For example: stopped, running (buffered), transitioning to manual/buffered, aborting, aborted (last execution)readregs
should be documented, potentially improvedreadregs
that prints current device state in human readable form, may be a good enough substitute for same functionality directly in uC (as agetstate
command). Should probably also leverage aclkstatus
command so results scale with clock frequency properly.getmode
andreadtable
combo that prints human readable version of instruction table (ideal for small tables used in debugging only)The text was updated successfully, but these errors were encountered: