Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/api/devices/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ A window displaying the image transferred from the Miniscope and a graph plottin
A YAML file is used to configure Stream DAQ based on the device configuration. The device configuration needs to match the imaging and data capture hardware for proper operation. This file is used to set up hardware, define data formats, and set data preambles. The contents of this YAML file will be parsed into a {class}`mio.devices.stream.config.StreamDevConfig <model>`, which then configures the Stream DAQ.

### FPGA (Opal Kelly) configuration
The `bitstream` field in the device configuration yaml file specifies the image that will be uploaded to the opal kelly board. This file needs to be placed in `mio.devices`.
The `bitstream` field in the device configuration yaml file specifies the image that will be uploaded to the opal kelly board. This file needs to be placed in `mio.interfaces`.

```{tip}
See the FPGA repository for further information about the FPGA code:

<https://github.com/Aharoni-Lab/wireless_fpga_daq>
```


#### Bitstream file nomenclature
Expand Down
14 changes: 13 additions & 1 deletion mio/devices/stream/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,19 @@ def iter_buffers(


def init_okdev(BIT_FILE: Path, read_length: int) -> Union["okDev", okDevMock]:
"""Create a connection to an :class:`.okDev` device"""
"""
Create a connection to an :class:`.okDev` device

Writes to the FPGA to reset its state:

* put the manchester decoder at reset mode
* sleep 0.01
* un-reset all components
* put the clock generator/multiplier at reset
* sleep 0.01
* un-reset all components (presumably the system is ready at this point).

"""
# FIXME: when multiprocessing bug resolved, remove this and just mock in tests
if os.environ.get("PYTEST_CURRENT_TEST") or os.environ.get("STREAMDAQ_MOCKRUN"):
dev = okDevMock(read_length=read_length)
Expand Down
8 changes: 3 additions & 5 deletions mio/interfaces/opalkelly.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@

class okDev(ok.okCFrontPanel):
"""
I/O and configuration for an (what kind of opal kelly device?)
I/O and configuration for an Opal Kelly FPGA

.. todo::

Phil: document what this thing does, including how bitfiles work
and how they're generated/where they're located.
Uses the FPGA code found here: https://github.com/Aharoni-Lab/wireless_fpga_daq

See that repository's README for further documentation.
"""

def __init__(self, read_length: int, serial_id: str = ""):
Expand Down
Loading