diff --git a/source/Hardware Guide/Datasheets/memory-usage.rst b/source/Hardware Guide/Datasheets/memory-usage.rst index c541508..cbaf3b2 100644 --- a/source/Hardware Guide/Datasheets/memory-usage.rst +++ b/source/Hardware Guide/Datasheets/memory-usage.rst @@ -74,6 +74,8 @@ Register Programming - None - Number of 32-bit words stored in memory, same value as what the frames generate +.. _onidatasheet_memory-usage_d2h: + Device To Host Data Frames ****************************************** Each frame transmitted to the host is structured as follows: diff --git a/source/Software Guide/Bonsai.ONIX/Nodes/MemoryUsageDevice.rst b/source/Software Guide/Bonsai.ONIX/Nodes/MemoryUsageDevice.rst new file mode 100644 index 0000000..e0add60 --- /dev/null +++ b/source/Software Guide/Bonsai.ONIX/Nodes/MemoryUsageDevice.rst @@ -0,0 +1,52 @@ + + +################# +MemoryUsageDevice +################# + + +A `Bonsai source `__ that wraps a +:ref:`onidatasheet_memory-usage` device. + +:Inputs: None +:Outputs: A single ``MemoryUsageDataFrame`` that is produced periodically by + hardware containing information about data buffer memory status. + This type is a wrapper around the :ref:`Device To Host Data Frame ` specified + on the :ref:`onidatasheet_memory-usage` datasheet. To calculate the percentage of memory that is occupied, + divide the number of 32-bit memory words used by the hardware's total memory and multiply that quotient by 100. + +.. attention:: + The :ref:`Block Read Size ` property in the :ref:`bonsai_onicontext` node is set intentionally low so that the buffer accumulates data for demonstration purposes. + +.. raw:: html + + {% with static_path = '../../../_static', name = 'MemoryMonitor' %} + {% include 'workflow.html' %} + {% endwith %} + +************* +Configuration +************* + +Configuration is performed using its property pane which contains the following +options. + +.. list-table:: + :widths: auto + :header-rows: 1 + + * - Name + - Type + - Description + + * - EnableStream + - boolean + - Enable the device data stream + + * - UpdateHz + - uint + - Rate at which the hardware memory usage is polled in Hz. + + * - MemorySize + - uint + - Hardware buffer size in 32-bit words. diff --git a/source/Software Guide/Bonsai.ONIX/Nodes/ONIContext.rst b/source/Software Guide/Bonsai.ONIX/Nodes/ONIContext.rst index 407e515..17c0945 100644 --- a/source/Software Guide/Bonsai.ONIX/Nodes/ONIContext.rst +++ b/source/Software Guide/Bonsai.ONIX/Nodes/ONIContext.rst @@ -64,6 +64,8 @@ to use it. present in a single computer, then each will need its own :ref:`bonsai_onicontext` to manage it. +.. _bonsai_onicontext_configuration: + Configuration GUI -------------------------- :ref:`bonsai_onicontext` configuration is performed using a GUI provided in the @@ -80,10 +82,10 @@ using the **Properties Pane** on the right side of the form. #. **Settings**: Drop down menu that provides several hardware configuration options #. **Driver**: The device driver used to control the host hardware. #. **Slot**: The physical slot of the Host hardware in the computer. -#. **Read Block Size**: The number of bytes read per call to the kernel driver. +#. **Block Read Size**: The number of bytes read per call to the kernel driver. Larger numbers *will generally* increase overall bandwidth and decrease response latency. -#. **Write Block Size**: The number of bytes pre-allocated to make output for output +#. **Block Write Size**: The number of bytes pre-allocated to make output for output data frames. Larger numbers *may* increase overall bandwidth and decrease response latency. #. |refresh_icon| ****: Shows the current host hardware connection status. diff --git a/source/Software Guide/Bonsai.ONIX/Nodes/index.rst b/source/Software Guide/Bonsai.ONIX/Nodes/index.rst index db3df63..063b086 100644 --- a/source/Software Guide/Bonsai.ONIX/Nodes/index.rst +++ b/source/Software Guide/Bonsai.ONIX/Nodes/index.rst @@ -17,6 +17,7 @@ Nodes ONIContext HeartbeatDevice + MemoryUsageDevice AnalogIODevice DigitalIODevice ClockOutputDevice diff --git a/source/_static/bonsai/workflows/MemoryMonitor.bonsai b/source/_static/bonsai/workflows/MemoryMonitor.bonsai new file mode 100644 index 0000000..37956f0 --- /dev/null +++ b/source/_static/bonsai/workflows/MemoryMonitor.bonsai @@ -0,0 +1,116 @@ + + + + + + + + + riffa + 0 + + 48 + 8192 + + + + + + + + riffa + 0 + + 6 + + 100 + Volts + true + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + TenVolts + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + Input + + + + Data + + + + analog-data_.raw + Timestamp + false + ColumnMajor + + + + Clock + + + + analog-clock_.raw + Timestamp + false + ColumnMajor + + + + + + + riffa + 0 + + 10 + + true + 100 + + + + memory-use_.csv + false + false + Timestamp + false + Clock,MemoryUsageBytes,MemoryUsagePercentage + + + MemoryUsagePercentage + + + + + + + + + + + + \ No newline at end of file diff --git a/source/_static/bonsai/workflows/MemoryMonitor.svg b/source/_static/bonsai/workflows/MemoryMonitor.svg new file mode 100644 index 0000000..ef5b9d9 --- /dev/null +++ b/source/_static/bonsai/workflows/MemoryMonitor.svg @@ -0,0 +1,3 @@ + +]>ONI Context(riffa/0)MatrixWriterMatrixWriterMemoryUsagePercentageDataClockCsvWriterAnalogIODeviceMemoryUsageDevice \ No newline at end of file