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

docs: add docs/library/cn0363/* specific IPs #1550

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
104 changes: 104 additions & 0 deletions docs/library/cn0363/cn0363_dma_sequencer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
.. _cn0363 dma_sequencer:

CN0363 DMA Sequencer
================================================================================

.. hdl-component-diagram::

The CN0363 Sequencer FPGA Peripheral is part of the
:ref:`cn0363`
Comment on lines +8 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The CN0363 Sequencer FPGA Peripheral is part of the
:ref:`cn0363`
The CN0363 Sequencer FPGA Peripheral is part of the :ref:`cn0363`

and is responsible to sequence the various data channels to the DMA.

Files
--------------------------------------------------------------------------------

.. list-table::
:header-rows: 1

* - Name
- Description
* - :git-hdl:`library/cn0363/cn0363_dma_sequencer/cn0363_dma_sequencer.v`
- Verilog source for the peripheral.
* - :git-hdl:`library/cn0363/cn0363_dma_sequencer/cn0363_dma_sequencer_ip.tcl`
- TCL script to generate the Vivado IP-integrator project for the
peripheral.

Signal and Interface Pins
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interface

--------------------------------------------------------------------------------

.. hdl-interfaces::

* - clk
- Clock
- All other signals are synchronous to this clock.
* - resetn
- Synchronous active low reset
- Resets the internal state machine of the core.
* - phase
- AXI-Stream slave
- Phase data channel.
* - data
- AXI-Stream slave
- Sample data channel.
* - data_filtered
- AXI-Stream slave
- Filtered sample data channel.
* - i_q
- AXI-Stream slave
- Demodulated I/Q sample data channel.
* - i_q_filtered
- AXI-Stream slave
- Filtered demodulated I/Q sample data channel.
* - dma_wr
- FIFO Write Interface master
- Low-level SPI bus interface that is controlled by peripheral.
* - overflow
- Output
- The overflow signal is asserted if a overflow on the DMA interface is
detected.
* - channel_enable
- Input
- Data channel enable sequencer output enable.
* - processing_resetn
- Output
- Reset signal for the processing pipeline

Theory of Operation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detailed Description is more used.

--------------------------------------------------------------------------------

The CN0363 DMA sequencer core acts as a link between the CN0363 processing
pipeline and the connected DMA controller. On one side it accepts data from the
Comment on lines +69 to +70
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The CN0363 DMA sequencer core acts as a link between the CN0363 processing
pipeline and the connected DMA controller. On one side it accepts data from the
The :adi:`CN0363` DMA sequencer core acts as a link between the :adi:`CN0363` processing
pipeline and the connected DMA controller. On one side it accepts data from the

processing pipeline and on the other side it sends the data to the DMA
controller. The core is only active when the DMA controller signals that it is
waiting for data, when it is inactive it also asserts the ``processing_resetn``
signal to keep the processing pipeline in reset. Since the DMA is running at a
much faster clock than the output data rate from the processing pipeline the
different channels are time-division-multiplexed and send one by one to the DMA
controller over the ``dma_wr`` interface.

When active the core cycles through the input channels in the following order.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When active the core cycles through the input channels in the following order.
When active, the core cycles through the input channels in the following order:


#. phase (Reference channel)
#. data (Reference channel)
#. data_filtered (Reference channel)
#. i_q, I component (Reference channel)
#. i_q, Q component (Reference channel)
#. i_q_filtered, I component (Reference channel)
#. i_q_filtered, Q component (Reference channel)
#. phase (Sample channel)
#. data (Sample channel)
#. data_filtered (Sample channel)
#. i_q, I component (Sample channel)
#. i_q, Q component (Sample channel)
#. i_q_filtered, I component (Sample channel)
#. i_q_filtered, Q component (Sample channel)

Each of these has a corresponding bit in the ``channel_enable`` and only if the
bit is set the channel is sent to the ``dma_wr`` interface, otherwise it is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bit is set the channel is sent to the ``dma_wr`` interface, otherwise it is
bit is set, the channel is sent to the ``dma_wr`` interface, otherwise it is

discarded. This allows an application to select which data channels it wants to
capture.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Software Support section?

More Information
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

References

--------------------------------------------------------------------------------

- :ref:`cn0363`
97 changes: 97 additions & 0 deletions docs/library/cn0363/cn0363_phase_data_sync.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
.. _cn0363 phase_data_sync:

CN0363 Phase Data Sync
================================================================================

.. hdl-component-diagram::

The CN0363 Phase Data Sync FPGA Peripheral is part of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The CN0363 Phase Data Sync FPGA Peripheral is part of the
The ;adi:`CN0363` Phase Data Sync FPGA Peripheral is part of the

:ref:`EVAL-CN0363-PMDZ HDL reference design <cn0363>` and is responsible for
preparing the ADC conversion result data and aligning it with the phase and
feeding both to the processing pipeline.

Files
--------------------------------------------------------------------------------

.. list-table::
:header-rows: 1

* - Name
- Description
* - :git-hdl:`/library/cn0363/cn0363_phase_data_sync/cn0363_phase_data_sync.v`
- Verilog source for the peripheral.
* - :git-hdl:`/library/cn0363/cn0363_phase_data_sync/cn0363_phase_data_sync_ip.tcl`
- TCL script to generate the Vivado IP-integrator project for the
peripheral.

Signal and Interface Pins
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interface

--------------------------------------------------------------------------------

.. hdl-interfaces::

* - clk
- Clock
- All other signals are synchronous to this clock.
* - resetn
- Synchronous active low reset
- Resets the internal state machine of the core.
* - processing_resetn
- Synchronous active low reset
- Indicator that the processing pipeline is in reset.
* - S_AXIS_SAMPLE
- AXI-Stream slave
- Input sample data stream
* - M_AXIS_SAMPLE
- AXI-Stream master
- Output sample data stream
* - M_AXIS_PHASE
- AXI-Stream master
- Output phase data stream
* - sample_has_stat
- Input
- Whether the incoming data on ``S_AXIS_SAMPLE`` has the STAT register
appended.
* - conv_done
- Input
- Conversion done signal from the ADC.
* - phase
- Input
- Current excitation signal phase.
* - overflow
- Input
- The overflow signal is asserted if a new sample arrives before the
previous one has been consumed.

Theory of Operation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detailed Description is more used.

--------------------------------------------------------------------------------

The CN0363 Phase Data Sync FPGA Peripheral takes the raw ADC sample data read by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The CN0363 Phase Data Sync FPGA Peripheral takes the raw ADC sample data read by
The :adi:`CN0363` Phase Data Sync FPGA Peripheral takes the raw ADC sample data read by

a SPI controller from the ADC on the S_AXIS_SAMPLE stream. The data is assembled
into 24-bit word and converted from offset binary to two's complement signed.

When a rising edge is detected on the ``conv_done signal`` the core takes a
snapshot of the phase input signal. This data will be assumed to the phase
that belongs to the next incoming data sample on the S_AXIS_SAMPLE. The data
is aligned with the corresponding phase data and both are send out on the
``M_AXIS_SAMPLE`` and ``M_AXIS_PHASE stream``.

If the ``sample_has_stat`` signal is asserted the core will receive 32-bit
instead of 24-bit per sample on the S_AXIS_SAMPLE stream. The last 8-bit are
assumed to contain the STAT register of the ADC, which among other things
contains the information about which channel the ADC result belongs to. This
information can be used to detect and fix channel swaps. If
``sample_has_stat`` is not asserted the core assumes that no channel swaps
happen and the whole pipeline is always running fast enough to accept a
sample before the next one is ready.

If ``processing_resetn`` is asserted the processing pipeline is assumed to be
in reset and incapable of accepting new samples and when a new sample arrives at
the ``S_AXIS_SAMPLE`` port a overflow condition is generated. The signal also
resets the channel swap detection logic and makes sure that the next sample that
is inserted into the processing pipeline after the reset belongs to the first
channel.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Software Support section?

More Information
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

References

--------------------------------------------------------------------------------

- :ref:`cn0363`
21 changes: 21 additions & 0 deletions docs/library/cn0363/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _cn0363_lib:

CN0363
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally, we don't do it like this, to add "IP" to the title, but maybe it can be confusing when there is a project called CN0363 and also an IP.

Suggested change
CN0363
CN0363 IP

================================================================================

CN0363 library comprises two IPs:

- :doc:`cn0363_dma_sequencer`
- :doc:`cn0363_phase_data_sync`

CN0363 DMA Sequencer core acts as a link between
the CN0363 processing pipeline and the connected DMA controller. CN0363 Phase
Data Sync assembles the raw ADC sample data into a 24-bit word and convert it to
two's complement.

.. toctree::
:maxdepth: 2
:hidden:
:glob:

*
Comment on lines +6 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CN0363 library comprises two IPs:
- :doc:`cn0363_dma_sequencer`
- :doc:`cn0363_phase_data_sync`
CN0363 DMA Sequencer core acts as a link between
the CN0363 processing pipeline and the connected DMA controller. CN0363 Phase
Data Sync assembles the raw ADC sample data into a 24-bit word and convert it to
two's complement.
.. toctree::
:maxdepth: 2
:hidden:
:glob:
*
The CN0363 library is comprised by two IPs:
- :doc:`cn0363_dma_sequencer`
- :doc:`cn0363_phase_data_sync`
:git-hdl:`CN0363 DMA Sequencer <library/cn0363/cn0363_dma_sequencer>` core
acts as a link between the CN0363 processing pipeline and the connected DMA
controller.
:git-hdl:`CN0363 Phase Data Sync <library/cn0363/cn0363_phase_data_sync>`
core assembles the raw ADC sample data into a 24-bit word and converts it into
two's complement format.
.. toctree::
:maxdepth: 2
:hidden:
:glob:

1 change: 1 addition & 0 deletions docs/library/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Utilities
axi_pwm_gen/index
axi_sysid/index
axi_tdd/index
cn0363/index
common/ad_dds/index
corundum/index
util_axis_fifo/index
Expand Down
2 changes: 1 addition & 1 deletion docs/projects/cn0363/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ HDL related
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- :git-hdl:`CN0363_PMDZ HDL project source code <projects/cn0363>`
- :dokuwiki:`[Wiki] CN0540 HDL project documentation <resources/eval/user-guides/eval-cn0363-pmdz/reference_hdl>`
- :dokuwiki:`[Wiki] CN0363 HDL project documentation <resources/eval/user-guides/eval-cn0363-pmdz/reference_hdl>`

.. list-table::
:widths: 30 35 35
Expand Down
Loading