Skip to content

Commit

Permalink
Merge pull request #27 from shuchitak/doc_fixes
Browse files Browse the repository at this point in the history
Documentation cleanup
  • Loading branch information
shuchitak authored Nov 8, 2024
2 parents fe1658d + 7b6b2d2 commit 82b294f
Show file tree
Hide file tree
Showing 18 changed files with 197 additions and 227 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
lib_board_support change log
============================

1.1.1
-----

* CHANGED: Documentation improvements
* REMOVED: Dependency of examples on lib_i2s

* Changes to dependencies:

- lib_i2c: 6.3.0 -> 6.4.0

- lib_sw_pll: 2.3.0 -> 2.3.1

- lib_xassert: 4.3.0 -> 4.3.1

1.1.0
-----

Expand Down
68 changes: 43 additions & 25 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,31 @@

@Library('[email protected]') _

getApproval()
def archiveLib(String repoName) {
sh "git -C ${repoName} clean -xdf"
sh "zip ${repoName}_sw.zip -r ${repoName}"
archiveArtifacts artifacts: "${repoName}_sw.zip", allowEmptyArchive: false
}

def checkout_shallow()
{
checkout scm: [
$class: 'GitSCM',
branches: scm.branches,
userRemoteConfigs: scm.userRemoteConfigs,
extensions: [[$class: 'CloneOption', depth: 1, shallow: true, noTags: false]]
]
}
getApproval()
pipeline {
agent none

options {
disableConcurrentBuilds()
buildDiscarder(xmosDiscardBuildSettings())
skipDefaultCheckout()
timestamps()
// on develop discard builds after a certain number else keep forever
buildDiscarder(logRotator(
numToKeepStr: env.BRANCH_NAME ==~ /develop/ ? '25' : '',
artifactNumToKeepStr: env.BRANCH_NAME ==~ /develop/ ? '25' : ''
))
}

parameters {
string(
name: 'TOOLS_VERSION',
Expand All @@ -25,47 +35,53 @@ pipeline {
)
string(
name: 'XMOSDOC_VERSION',
defaultValue: '6.1.2',
defaultValue: 'v6.1.3',
description: 'The xmosdoc version'
)
string(
name: 'INFR_APPS_VERSION',
defaultValue: 'v2.0.1',
description: 'The infr_apps version'
)
}
environment {
REPO = 'lib_board_support'
PYTHON_VERSION = "3.12.1"
VENV_DIRNAME = ".venv"
}

stages {
stage('Build and tests') {
agent {
label 'linux&&64'
label 'documentation && linux && x86_64'
}
stages{
stage('Checkout'){
steps {
println "Stage running on: ${env.NODE_NAME}"
dir("${REPO}") {
checkout scm
checkout_shallow()
createVenv()
withTools(params.TOOLS_VERSION) {
dir("examples") {
sh "cmake -G \"Unix Makefiles\" -B build"
sh 'cmake -G "Unix Makefiles" -B build -DDEPS_CLONE_SHALLOW=TRUE'
}
}
} // dir
} // steps
}
} // stage('Checkout')
stage('Library checks') {
steps {
runLibraryChecks("${WORKSPACE}/${REPO}", "v2.0.1")
warnError("lib checks") {
runLibraryChecks("${WORKSPACE}/${REPO}", "${params.INFR_APPS_VERSION}")
}
} // steps
} // Library checks
} // stage('Library checks')
stage('Build examples'){
steps {
dir("${REPO}/examples") {
withVenv {
withTools(params.TOOLS_VERSION) {
sh "cmake -G \"Unix Makefiles\" -B build"
sh 'cmake -G "Unix Makefiles" -B build -DDEPS_CLONE_SHALLOW=TRUE'
archiveArtifacts artifacts: "build/manifest.txt", allowEmptyArchive: false
sh "xmake -C build -j 16"
archiveArtifacts artifacts: "**/*.xe", allowEmptyArchive: false
Expand All @@ -74,7 +90,7 @@ pipeline {
}
}
}
}
} // stage('Build examples')
stage('Test'){
steps {
dir("${REPO}") {
Expand All @@ -85,19 +101,21 @@ pipeline {
}
}
}
}
} // stage('Test')
stage('Documentation') {
steps {
dir("${REPO}") {
withVenv {
sh "pip install git+ssh://[email protected]/xmos/xmosdoc@v${params.XMOSDOC_VERSION}"
sh 'xmosdoc'
zip zipFile: "${REPO}_docs.zip", archive: true, dir: 'doc/_build'
} // withVenv
warnError("Docs") {
buildDocs()
} // warnError("Docs")
} // dir
} // steps
} // Documentation

} // stage('Documentation')
stage("Archive Lib") {
steps {
archiveLib(REPO)
}
} //stage("Archive Lib")
}
post {
always{
Expand Down
53 changes: 33 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,57 +1,70 @@
:orphan:

#################
lib_board_support
#################
#####################################
lib_board_support: XMOS board support
#####################################

:vendor: XMOS
:version: 1.0.1
:version: 1.1.1
:scope: General Use
:description: Support library for XMOS development kits
:category: General Purpose
:keywords: I2C
:devices: xcore.ai, xcore-200

*******
Summary
*******

``lib_board_support`` contains board specific hardware configuration code for various `XMOS`
evaluation and development kits.

********
Features
********

* Support for the following boards:
* ``XK_EVK_XU316``
* ``XK_AUDIO_316_MC``
* ``XK_AUDIO_216_MC``
* Simple examples to demonstrating usage from both `XC` and `C`.
* Support for the following boards:
* ``XK_EVK_XU316``
* ``XK_AUDIO_316_MC``
* ``XK_AUDIO_216_MC``
* Simple examples to demonstrating usage from both `XC` and `C`.

Known Issues
************
Known issues
************

* None

****************
Development repo
****************

* None
* `lib_board_support <https://www.github.com/xmos/lib_board_support>`_

Required Tools
**************
Required tools
**************

* XMOS XTC Tools: 15.3.0
* XMOS XTC Tools: 15.3.0

Required Libraries (dependencies)
*********************************
Required libraries (dependencies)
*********************************

* lib_i2c (www.github.com/xmos/lib_i2c)
* lib_sw_pll (www.github.com/xmos/lib_sw_pll)
* lib_xassert (www.github.com/xmos/lib_xassert)
* `lib_i2c <https://www.xmos.com/file/lib_i2c>`_
* `lib_sw_pll <https://www.xmos.com/file/lib_sw_pll>`_
* `lib_xassert <https://www.xmos.com/file/lib_xassert>`_

Related Application Notes
*************************
Related application notes
*************************

The following application notes use this library:

* `AN02003: SPDIF/ADAT/I²S Receive to I²S Slave Bridge with ASRC <https://www.xmos.com/file/an02003>`_
* `AN02016: Integrating Audio Weaver (AWE) Core into USB Audio <https://www.xmos.com/file/an02016>`_
* `AN02003: SPDIF/ADAT/I²S Receive to I²S Slave Bridge with ASRC <https://www.xmos.com/file/an02003>`_
* `AN02016: Integrating Audio Weaver (AWE) Core into USB Audio <https://www.xmos.com/file/an02016>`_

*******
Support
*******

Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file provides overrides to the Doxyfile configuration

PROJECT_NAME = lib_board_support
PROJECT_BRIEF = "Board specific hardware configuration code for various XMOS evaluation and development kits"
PROJECT_BRIEF = "XMOS board support"

INPUT = ../lib_board_support/api/boards ../lib_board_support/api/boards/xk_evk_xu316 ../lib_board_support/api/boards/xk_audio_316_mc_ab ../lib_board_support/api/boards/xk_audio_216_mc_ab

Expand Down
48 changes: 19 additions & 29 deletions doc/rst/lib_board_support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ the relevant header file. For example::
From then onwards the code may call the relevant API functions to setup and configure the board
hardware. Examples are provided in the `examples` directory of this repo.

Note that in some cases, the `xcore` tile that calls the configuration function (usually from |I2S|
initialisation) is different from the tile where |I2C| master is placed. Since |I2C| master is
Note that in some cases, the `xcore` tile that calls the configuration function (usually from I²S
initialisation) is different from the tile where I²C master is placed. Since I²C master is
required by most audio CODECs for configuration and `xcore` tiles can only communicate with each
other via channels, a remote server is needed to provide the |I2C| setup. This usually takes the
form of a task which is run on a thread placed on the |I2C| tile and is controlled via a channel
from the other tile where |I2S| resides. The cross-tile channel must be declared at the top-level
other via channels, a remote server is needed to provide the I²C setup. This usually takes the
form of a task which is run on a thread placed on the I²C tile and is controlled via a channel
from the other tile where I²S resides. The cross-tile channel must be declared at the top-level
XC main function. The included examples provide a reference for this using both XC and C.

********************************
Expand Down Expand Up @@ -133,31 +133,20 @@ application where the hardware setup is called from C.

These applications run on the `XK-EVK-XU316` and `XK-AUDIO-316-MC` boards respectively.

They show how to use the cross-tile communications in conjunction with the |I2C| master server.
The applications only setup the hardware and then exit the |I2C| server.
They show how to use the cross-tile communications in conjunction with the I²C master server.
The applications only setup the hardware and then exit the I²C server.

XC Usage Example
================

A more sophisticated example is also provided, written in XC, by `app_xk_audio_316_mc_loopback`.
The application `app_xk_audio_316_mc_simple_xc` demonstrates calling the hardware setup API from C.
It runs on the `XK-AUDIO-316-MC` board.

This application sets up the hardware on the `XK-AUDIO-316-MC` board and then runs an |I2S|
loopback application to take samples from the on-board ADCs and send the signals out through the
DACs. It keeps the |I2C| master server running in case the application wants to change sample rate
which requires |I2C| configuration of the audio CODECs.
Building and running
====================
To build and run an example, run the following from an XTC tools terminal to configure the build::

Two build configurations are included:

- `XMOS_MASTER` - This configures the ADCs and DACs to |I2S| slave and the xcore.ai device
drives the |I2S| clocks. The on-chip application PLL is configured to drive the master clock
to the mixed signal devices.
- `XMOS_SLAVE` - This configures one the DACs to |I2S| master and the remaining DAC, all ADCs
and the `xcore.ai` device to |I2S| slave. The on-chip application PLL is configured to drive
the master clock to the mixed signal devices.

To build and run the example, run the following from an XTC tools terminal to configure the build::

cd examples/app_xk_audio_316_mc_loopback
cd examples/<app_name>
cmake -G "Unix Makefiles" -B build

Any missing dependencies will be downloaded by the build system at this point.
Expand All @@ -168,12 +157,13 @@ The application binaries can be built using ``xmake``::

To run the application use the following command::

xrun bin/XMOS_MASTER/app_xk_audio_316_mc_loopback_XMOS_MASTER.xe
xrun --io bin/<app_name>.xe

or::
For example::

xrun bin/XMOS_SLAVE/app_xk_audio_316_mc_loopback_XMOS_SLAVE.xe
cd examples/app_xk_audio_316_mc_simple_xc
cmake -G "Unix Makefiles" -B build
xmake -C build
xrun --io bin/app_xk_audio_316_mc_simple_xc.xe

Connect an analog audio source to the chosen ADC input channels and then monitor the looped back
output on the chosen DAC output channels.

14 changes: 7 additions & 7 deletions doc/rst/xk_audio_216_mc_ab/hw_216_mc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. _usb_audio_sec_hw_216_mc:

xcore-200 Multi-Channel Audio Board
-----------------------------------
====================================

`The XMOS xcore-200 Multi-channel Audio board <https://www.xmos.com/support/boards?product=18334>`_
(XK-AUDIO-216-MC) is a complete hardware and reference software platform targeted at up to 32-channel USB and networked audio applications, such as DJ decks and mixers.
Expand All @@ -17,26 +17,26 @@ simultaneously - at up to 192kHz.
For full details regarding the hardware please refer to `xcore-200 Multichannel Audio Platform Hardware Manual <https://www.xmos.com/support/boards?product=18334&component=18687>`_.

Analogue Input & Output
+++++++++++++++++++++++
-----------------------

A total of eight single-ended analog input channels are provided via 3.5mm stereo jacks. Each is fed into a CirrusLogic CS5368 ADC.
Similarly a total of eight single-ended analog output channels are provided. Each is fed into a CirrusLogic CS4384 DAC.

The four digital |I2S|/TDM input and output channels are mapped to the `xcore` input/outputs through a header array. This jumper allows channel selection when the ADC/DAC is used in TDM mode
The four digital I²S/TDM input and output channels are mapped to the `xcore` input/outputs through a header array. This jumper allows channel selection when the ADC/DAC is used in TDM mode

Digital Input & Output
++++++++++++++++++++++
----------------------

Optical and coaxial digital audio transmitters are used to provide digital audio input output in formats such as IEC60958 consumer mode (S/PDIF) and ADAT.
The output data streams from the `xcore-200` are re-clocked using the external master clock to synchronise the data into the audio clock domain. This is achieved using simple external D-type flip-flops.

MIDI
++++
----

MIDI I/O is provided on the board via standard 5-pin DIN connectors. The signals are buffered using 5V line drivers and are then connected to 1-bit ports on the `xcore-200`, via a 5V to 3.3V buffer.

Audio Clocking
++++++++++++++
--------------

A flexible clocking scheme is provided for both audio and other system services. In order to accommodate a multitude of clocking options, the low-jitter master clock is generated locally using a frequency multiplier PLL chip. The chip used is a Phaselink PL611-01, which is pre-programmed to provide a 24MHz clock from its CLK0 output, and either 24.576 MHz or 22.5792MHz from its CLK1 output.

Expand All @@ -45,7 +45,7 @@ The 24MHz fixed output is provided to the `xcore-200` device as the main process
Either the locally generated clock (from the PL611) or the recovered low jitter clock (from the CS2100) may be selected to clock the audio stages; the `xcore-200`, the ADC/DAC and Digital output stages. Selection is controlled via an additional I/O, bit 5 of PORT 8C.

LEDs, Buttons and Other IO
++++++++++++++++++++++++++
--------------------------

An array of 4*4 green LEDs, 3 buttons and a switch are provided for general purpose user interfacing. The LED array is driven by eight signals each controlling one of 4 rows and 4 columns.

Expand Down
Loading

0 comments on commit 82b294f

Please sign in to comment.