Compare commits
22 Commits
jok
...
synido_sy1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d54f2a01a | ||
|
|
a9327e8e38 | ||
|
|
c33b1a4b3d | ||
|
|
e28072657b | ||
|
|
ecba7b4863 | ||
|
|
d48858e4e9 | ||
|
|
f0daa4f62e | ||
|
|
bc3ba14a65 | ||
|
|
0e3d9ed7c5 | ||
|
|
344e04aa33 | ||
|
|
307aee89d9 | ||
|
|
716f60fabb | ||
|
|
8b39245372 | ||
|
|
4e31f7e0e0 | ||
|
|
1b0815a956 | ||
|
|
9eb6adc8d4 | ||
|
|
303bb6a244 | ||
|
|
50ae1a5550 | ||
|
|
f63a6e0653 | ||
|
|
b8f93ea5f5 | ||
|
|
9205b48882 | ||
|
|
f4faefc8e5 |
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,4 +0,0 @@
|
||||
* text=auto
|
||||
*.c text eol=lf
|
||||
*.xc text eol=lf
|
||||
*.h text eol=lf
|
||||
51
.gitignore
vendored
51
.gitignore
vendored
@@ -1,51 +0,0 @@
|
||||
# Tmp files & logs
|
||||
*.settings
|
||||
*.bin
|
||||
*.zip
|
||||
*.log
|
||||
*.vcd
|
||||
*.swp
|
||||
*.*~
|
||||
*.xmt
|
||||
*.swo
|
||||
*.swn
|
||||
*.ppb
|
||||
*~
|
||||
*.DS_Store
|
||||
|
||||
# Python
|
||||
*.pyc
|
||||
**/*.egg-info/
|
||||
**/*venv/*
|
||||
|
||||
# XMOS temp files
|
||||
**/.build*/*
|
||||
**/build*/*
|
||||
*/bin/*
|
||||
_build
|
||||
**/flash_bin_node*
|
||||
**/fw-*
|
||||
**/s2l-*
|
||||
**/spanning-xn-*
|
||||
**/target-xn*
|
||||
*.xi
|
||||
*.o
|
||||
*.i
|
||||
*.a
|
||||
|
||||
# XMOS binaries
|
||||
*.xe
|
||||
|
||||
# Regression test files
|
||||
tests/xmosdfu
|
||||
tests/xsig
|
||||
legacy_tests/recording*.wav
|
||||
legacy_tests/plot*.pdf
|
||||
legacy_tests/generated_*.wav
|
||||
*/test_results.csv
|
||||
cscope*
|
||||
rtostags
|
||||
|
||||
# Built documentation
|
||||
doc/pdf/sw_usb_audio.pdf
|
||||
toplevel_doc
|
||||
21
lib_gpio/.gitignore
vendored
21
lib_gpio/.gitignore
vendored
@@ -1,21 +0,0 @@
|
||||
.*.swp
|
||||
**/.build*/*
|
||||
**/bin/*
|
||||
*.o
|
||||
*.xe
|
||||
*.vcd
|
||||
*.s
|
||||
*.xi
|
||||
*.i
|
||||
*.a
|
||||
**/_build/
|
||||
**/run_*.log
|
||||
**/pdf/*
|
||||
*.pyc
|
||||
test_results.csv
|
||||
**/.venv/**
|
||||
|
||||
# waf build files
|
||||
.lock-waf_*
|
||||
.waf-*/
|
||||
build/
|
||||
@@ -1,44 +0,0 @@
|
||||
GPIO library change log
|
||||
=======================
|
||||
|
||||
2.2.0
|
||||
-----
|
||||
|
||||
* CHANGED: Update tests to support tools 15.x.x
|
||||
|
||||
2.1.0
|
||||
-----
|
||||
|
||||
* CHANGED: Use XMOS Public Licence Version 1
|
||||
|
||||
2.0.1
|
||||
-----
|
||||
|
||||
* CHANGED: Pin Python package versions
|
||||
* REMOVED: not necessary cpanfile
|
||||
|
||||
2.0.0
|
||||
-----
|
||||
|
||||
* CHANGED: Build files updated to support new "xcommon" behaviour in xwaf.
|
||||
|
||||
1.1.0
|
||||
-----
|
||||
|
||||
* CHANGE: Minor documentation clarifications
|
||||
* CHANGE: Update to dependency (lib_xassert moved to 3.0.0)
|
||||
|
||||
1.0.1
|
||||
-----
|
||||
|
||||
* CHANGE: Update to source code license and copyright
|
||||
|
||||
1.0.0
|
||||
-----
|
||||
|
||||
* Initial version
|
||||
|
||||
* Changes to dependencies:
|
||||
|
||||
- lib_xassert: Added dependency 2.0.0
|
||||
|
||||
55
lib_gpio/Jenkinsfile
vendored
55
lib_gpio/Jenkinsfile
vendored
@@ -1,55 +0,0 @@
|
||||
@Library('xmos_jenkins_shared_library@v0.32.0') _
|
||||
|
||||
getApproval()
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'x86_64&&linux'
|
||||
}
|
||||
environment {
|
||||
REPO = 'lib_gpio'
|
||||
VIEW = getViewName(REPO)
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
stages {
|
||||
stage('Get view') {
|
||||
steps {
|
||||
xcorePrepareSandbox("${VIEW}", "${REPO}")
|
||||
}
|
||||
}
|
||||
|
||||
stage('Library checks') {
|
||||
steps {
|
||||
xcoreLibraryChecks("${REPO}")
|
||||
}
|
||||
}
|
||||
stage('Tests') {
|
||||
steps {
|
||||
runXmostest("${REPO}", 'tests')
|
||||
}
|
||||
}
|
||||
stage('xCORE builds') {
|
||||
steps {
|
||||
dir("${REPO}") {
|
||||
xcoreAllAppsBuild('examples')
|
||||
dir("${REPO}") {
|
||||
runXdoc('doc')
|
||||
}
|
||||
}
|
||||
|
||||
// Archive all the generated .pdf docs
|
||||
archiveArtifacts artifacts: "${REPO}/**/pdf/*.pdf", fingerprint: true, allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
updateViewfiles()
|
||||
}
|
||||
cleanup {
|
||||
xcoreCleanSandbox()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
*******************************
|
||||
XMOS PUBLIC LICENCE: Version 1
|
||||
*******************************
|
||||
|
||||
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
|
||||
|
||||
**1. Definitions**
|
||||
|
||||
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
|
||||
|
||||
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
|
||||
|
||||
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
|
||||
|
||||
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
|
||||
|
||||
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
|
||||
|
||||
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
|
||||
|
||||
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
|
||||
|
||||
|
||||
**2. Licence**
|
||||
|
||||
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
|
||||
|
||||
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
|
||||
|
||||
2.1.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
|
||||
|
||||
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
|
||||
|
||||
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
|
||||
|
||||
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
|
||||
|
||||
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
|
||||
|
||||
2.2.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
|
||||
|
||||
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
|
||||
|
||||
(b) you must copy (to the extent it doesn’t already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
|
||||
|
||||
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
|
||||
|
||||
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
|
||||
|
||||
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
|
||||
|
||||
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOS’s licence under clause 2.2 above.
|
||||
|
||||
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
|
||||
|
||||
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
|
||||
|
||||
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
|
||||
|
||||
**7. IPR and Ownership**
|
||||
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
|
||||
|
||||
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
|
||||
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
|
||||
|
||||
**8. Termination**
|
||||
|
||||
8.1 This Licence will automatically terminate immediately, without notice to you, if:
|
||||
|
||||
(a) you fail to comply with the terms of this Licence; and/or
|
||||
|
||||
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
|
||||
|
||||
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
|
||||
|
||||
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
|
||||
|
||||
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOS’s TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
|
||||
|
||||
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.
|
||||
@@ -1,39 +0,0 @@
|
||||
GPIO Library
|
||||
============
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The XMOS GPIO library allows you to access xCORE ports as low-speed GPIO.
|
||||
|
||||
Although xCORE ports can be directly accessed via the xC programming
|
||||
language this library allows more flexible usage. In particular, it
|
||||
allows splitting a multi-pin output/input port to be able to use
|
||||
the individual pins independently. It also allows accessing ports
|
||||
across separate XMOS tiles or separate XMOS chips.
|
||||
|
||||
Features
|
||||
........
|
||||
|
||||
* Abstract interface to GPIO functionality of XMOS ports
|
||||
* Allow control of individual bits of multi-bit ports
|
||||
* Allow access to ports across tiles
|
||||
|
||||
Operating modes
|
||||
...............
|
||||
|
||||
* Multi-bit output for individual access to the pins of a multi-bit output port
|
||||
* Multi-bit input for individual access to the pins of a multi-bit input port
|
||||
* Multi-bit input for individual access to the pins of a multi-bit
|
||||
input port allowing the application to react to events on those pins
|
||||
|
||||
Software version and dependencies
|
||||
.................................
|
||||
|
||||
The CHANGELOG contains information about the current and previous versions.
|
||||
For a list of direct dependencies, look for DEPENDENT_MODULES in lib_gpio/module_build_info.
|
||||
|
||||
Related application notes
|
||||
.........................
|
||||
|
||||
Currently there are none.
|
||||
@@ -1,528 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<?fileVersion 4.0.0?>
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
|
||||
<cconfiguration id="com.xmos.cdt.toolchain.92757610">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.xmos.cdt.toolchain.92757610" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings />
|
||||
<extensions>
|
||||
<extension id="com.xmos.cdt.core.XEBinaryParser" point="org.eclipse.cdt.core.BinaryParser" />
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.xmos.cdt.core.XdeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments></buildArguments>
|
||||
<buildTarget>all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments></buildArguments>
|
||||
<buildTarget>clean</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration buildProperties="" description="" id="com.xmos.cdt.toolchain.92757610" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.xmos.cdt.toolchain.92757610.1127281840" name="/" resourcePath="">
|
||||
<toolChain id = "com.xmos.cdt.toolchain.32616463" name="com.xmos.cdt.toolchain" superClass="com.xmos.cdt.toolchain">
|
||||
<targetPlatform archList="all" binaryParser="com.xmos.cdt.core.XEBinaryParser;org.eclipse.cdt.core.GNU_ELF" id = "com.xmos.cdt.core.platform.2811492" isAbstract="false" osList="linux,win32,macosx" superClass="com.xmos.cdt.core.platform" />
|
||||
<builder arguments="" id = "com.xmos.cdt.builder.base.87307823" keepEnvironmentInBuildfile="false" managedBuildOn="false" superClass="com.xmos.cdt.builder.base">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="outputPath" name="bin" />
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id = "com.xmos.cdt.xc.compiler.50784169" name="com.xmos.cdt.xc.compiler" superClass="com.xmos.cdt.xc.compiler">
|
||||
<option id = "com.xmos.xc.compiler.option.defined.symbols.51553279" name="com.xmos.xc.compiler.option.defined.symbols" superClass="com.xmos.xc.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=11"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1111"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=11"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__MCPP=2"/>
|
||||
<listOptionValue builtIn="false" value="__XC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__EXCEPTIONS=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.xc.compiler.option.include.paths.51313454" name="com.xmos.xc.compiler.option.include.paths" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert}"' />
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.xc.compiler.input.55155475" name="XC" superClass="com.xmos.cdt.xc.compiler.input"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.c.compiler.26645969" name="com.xmos.cdt.c.compiler" superClass="com.xmos.cdt.c.compiler">
|
||||
<option id = "com.xmos.c.compiler.option.defined.symbols.22987719" name="com.xmos.c.compiler.option.defined.symbols" superClass="com.xmos.c.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_VERSION__=199901L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_STDC_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.c.compiler.option.include.paths.42141732" name="com.xmos.c.compiler.option.include.paths" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert}"' />
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.c.compiler.input.c.49735529" name="C" superClass="com.xmos.cdt.c.compiler.input.c"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.cxx.compiler.84727129" name="com.xmos.cdt.cxx.compiler" superClass="com.xmos.cdt.cxx.compiler">
|
||||
<option id = "com.xmos.cxx.compiler.option.defined.symbols.99761820" name="com.xmos.cxx.compiler.option.defined.symbols" superClass="com.xmos.cxx.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.cxx.compiler.option.include.paths.12308476" name="com.xmos.cxx.compiler.option.include.paths" superClass="com.xmos.cxx.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf""/>
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_gpio}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/api}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/pdf}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc/rst}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/doc}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert/src}"' />
|
||||
<listOptionValue builtIn="false" value='"${workspace_loc:/lib_xassert}"' />
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.cxx.compiler.input.cpp.99407135" name="C++" superClass="com.xmos.cdt.cxx.compiler.input.cpp"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding=".build_*" flags="VALUE_WORKSPACE_PATH|RESOLVED"
|
||||
kind="sourcePath" name="" />
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-E -P -v -dD" command="" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings" />
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping" />
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings" />
|
||||
</cconfiguration>
|
||||
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id = "gpio_flashing_leds.null.59544653" name="gpio_flashing_leds" />
|
||||
</storageModule>
|
||||
</cproject>
|
||||
@@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>gpio_flashing_leds</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?children?</key>
|
||||
<value>?name?=outputEntries\|?children?=?name?=entry\\\\|\\|\||</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>CONFIG=Debug</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>xmake</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.xmos.cdt.core.XdeProjectNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,84 +0,0 @@
|
||||
*******************************
|
||||
XMOS PUBLIC LICENCE: Version 1
|
||||
*******************************
|
||||
|
||||
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
|
||||
|
||||
**1. Definitions**
|
||||
|
||||
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
|
||||
|
||||
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
|
||||
|
||||
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
|
||||
|
||||
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
|
||||
|
||||
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
|
||||
|
||||
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
|
||||
|
||||
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
|
||||
|
||||
|
||||
**2. Licence**
|
||||
|
||||
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
|
||||
|
||||
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
|
||||
|
||||
2.1.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
|
||||
|
||||
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
|
||||
|
||||
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
|
||||
|
||||
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
|
||||
|
||||
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
|
||||
|
||||
2.2.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
|
||||
|
||||
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
|
||||
|
||||
(b) you must copy (to the extent it doesn’t already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
|
||||
|
||||
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
|
||||
|
||||
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
|
||||
|
||||
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
|
||||
|
||||
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOS’s licence under clause 2.2 above.
|
||||
|
||||
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
|
||||
|
||||
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
|
||||
|
||||
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
|
||||
|
||||
**7. IPR and Ownership**
|
||||
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
|
||||
|
||||
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
|
||||
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
|
||||
|
||||
**8. Termination**
|
||||
|
||||
8.1 This Licence will automatically terminate immediately, without notice to you, if:
|
||||
|
||||
(a) you fail to comply with the terms of this Licence; and/or
|
||||
|
||||
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
|
||||
|
||||
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
|
||||
|
||||
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
|
||||
|
||||
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOS’s TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
|
||||
|
||||
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.
|
||||
@@ -1,26 +0,0 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
APP_NAME = gpio_flashing_leds
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
USED_MODULES = lib_gpio
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
XCC_FLAGS = -O2 -g
|
||||
|
||||
# The XCORE_ARM_PROJECT variable, if set to 1, configures this
|
||||
# project to create both xCORE and ARM binaries.
|
||||
XCORE_ARM_PROJECT = 0
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
-include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
@@ -1,29 +0,0 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <xs1.h>
|
||||
#include <gpio.h>
|
||||
|
||||
port p_led1 = XS1_PORT_1A;
|
||||
port p_led2 = XS1_PORT_1B;
|
||||
|
||||
void flash_leds(client output_gpio_if led1, client output_gpio_if led2)
|
||||
{
|
||||
while (1) {
|
||||
led1.output(1);
|
||||
led2.output(0);
|
||||
delay_milliseconds(200);
|
||||
led1.output(0);
|
||||
led2.output(1);
|
||||
delay_milliseconds(200);
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
interface output_gpio_if i_led1[1], i_led2[1];
|
||||
par {
|
||||
output_gpio(i_led1, 1, p_led1, null);
|
||||
output_gpio(i_led2, 1, p_led2, null);
|
||||
flash_leds(i_led1[0], i_led2[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
@@ -1,492 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<?fileVersion 4.0.0?>
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
|
||||
<cconfiguration id="com.xmos.cdt.toolchain.57523242">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.xmos.cdt.toolchain.57523242" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings />
|
||||
<extensions>
|
||||
<extension id="com.xmos.cdt.core.XEBinaryParser" point="org.eclipse.cdt.core.BinaryParser" />
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.xmos.cdt.core.XdeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments> -f .makefile</buildArguments>
|
||||
<buildTarget>all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="clean" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>xmake</buildCommand>
|
||||
<buildArguments> -f .makefile</buildArguments>
|
||||
<buildTarget>clean</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration buildProperties="" description="" id="com.xmos.cdt.toolchain.57523242" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.xmos.cdt.toolchain.57523242.1127281840" name="/" resourcePath="">
|
||||
<toolChain id = "com.xmos.cdt.toolchain.23600535" name="com.xmos.cdt.toolchain" superClass="com.xmos.cdt.toolchain">
|
||||
<targetPlatform archList="all" binaryParser="com.xmos.cdt.core.XEBinaryParser;org.eclipse.cdt.core.GNU_ELF" id = "com.xmos.cdt.core.platform.81104918" isAbstract="false" osList="linux,win32,macosx" superClass="com.xmos.cdt.core.platform" />
|
||||
<builder arguments=" -f .makefile" id = "com.xmos.cdt.builder.base.28632690" keepEnvironmentInBuildfile="false" managedBuildOn="false" superClass="com.xmos.cdt.builder.base">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="outputPath" name="bin" />
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id = "com.xmos.cdt.xc.compiler.25750820" name="com.xmos.cdt.xc.compiler" superClass="com.xmos.cdt.xc.compiler">
|
||||
<option id = "com.xmos.xc.compiler.option.defined.symbols.70585171" name="com.xmos.xc.compiler.option.defined.symbols" superClass="com.xmos.xc.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=11"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1111"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=11"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__MCPP=2"/>
|
||||
<listOptionValue builtIn="false" value="__XC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__EXCEPTIONS=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.xc.compiler.option.include.paths.81829045" name="com.xmos.xc.compiler.option.include.paths" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.xc.compiler.input.79446827" name="XC" superClass="com.xmos.cdt.xc.compiler.input"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.c.compiler.85196426" name="com.xmos.cdt.c.compiler" superClass="com.xmos.cdt.c.compiler">
|
||||
<option id = "com.xmos.c.compiler.option.defined.symbols.23867423" name="com.xmos.c.compiler.option.defined.symbols" superClass="com.xmos.c.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_VERSION__=199901L"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_STDC_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.c.compiler.option.include.paths.61056721" name="com.xmos.c.compiler.option.include.paths" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.c.compiler.input.c.81398683" name="C" superClass="com.xmos.cdt.c.compiler.input.c"/>
|
||||
</tool>
|
||||
<tool id = "com.xmos.cdt.cxx.compiler.88494951" name="com.xmos.cdt.cxx.compiler" superClass="com.xmos.cdt.cxx.compiler">
|
||||
<option id = "com.xmos.cxx.compiler.option.defined.symbols.23703551" name="com.xmos.cxx.compiler.option.defined.symbols" superClass="com.xmos.cxx.compiler.option.defined.symbols" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="__STDC__=1"/>
|
||||
<listOptionValue builtIn="false" value="__cplusplus=1"/>
|
||||
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUG__=4"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
|
||||
<listOptionValue builtIn="false" value="__llvm__=1"/>
|
||||
<listOptionValue builtIn="false" value="__SIZE_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__PTRDIFF_TYPE__=int"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__WINT_TYPE__=unsigned"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__UINTMAX_TYPE__=long"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_WEAK__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEPRECATED=1"/>
|
||||
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
|
||||
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
|
||||
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
|
||||
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_MAX__=2147483647L"/>
|
||||
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_MAX__=255U"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
|
||||
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807LL"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
|
||||
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=53"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DIG__=15"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-1021)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-307)"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=1024"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=308"/>
|
||||
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=17"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.7976931348623157e+308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_MIN__=2.2250738585072014e-308L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=2.2204460492503131e-16L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=4.9406564584124654e-324L"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
|
||||
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
|
||||
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
|
||||
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__"/>
|
||||
<listOptionValue builtIn="false" value="__VERSION__="4.2.1"/>
|
||||
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
|
||||
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
|
||||
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
|
||||
<listOptionValue builtIn="false" value="__CHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__WCHAR_UNSIGNED__=1"/>
|
||||
<listOptionValue builtIn="false" value="__XS1B__=1"/>
|
||||
<listOptionValue builtIn="false" value="__ELF__=1"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_YEAR=12"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MONTH=2"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MAJOR=1202"/>
|
||||
<listOptionValue builtIn="false" value="XCC_VERSION_MINOR=0"/>
|
||||
<listOptionValue builtIn="false" value="__XCC_HAVE_FLOAT__=1"/>
|
||||
</option>
|
||||
<option id = "com.xmos.cxx.compiler.option.include.paths.92945822" name="com.xmos.cxx.compiler.option.include.paths" superClass="com.xmos.cxx.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/gcc""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1""/>
|
||||
<listOptionValue builtIn="false" value=""${XMOS_TOOL_PATH}/target/include/c++/4.2.1/xcore-xmos-elf""/>
|
||||
|
||||
</option>
|
||||
<inputType id = "com.xmos.cdt.cxx.compiler.input.cpp.45814858" name="C++" superClass="com.xmos.cdt.cxx.compiler.input.cpp"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding=".build_*" flags="VALUE_WORKSPACE_PATH|RESOLVED"
|
||||
kind="sourcePath" name="" />
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-E -P -v -dD" command="" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath="" />
|
||||
<parser enabled="true" />
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments='-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'' command="sh" useDefault="true" />
|
||||
<parser enabled="true" />
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings" />
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping" />
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings" />
|
||||
</cconfiguration>
|
||||
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id = "lib_gpio.null.72009052" name="lib_gpio" />
|
||||
</storageModule>
|
||||
</cproject>
|
||||
@@ -1,75 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>lib_gpio</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?children?</key>
|
||||
<value>?name?=outputEntries\|?children?=?name?=entry\\\\|\\|\||</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value>CONFIG=Debug</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>xmake</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.xmos.cdt.core.XdeProjectNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,157 +0,0 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#ifndef __gpio_h__
|
||||
#define __gpio_h__
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __XC__
|
||||
|
||||
typedef uint16_t gpio_time_t;
|
||||
|
||||
/** This interface provides access to a GPIO that can perform input
|
||||
operations only. All GPIOs are single bit. */
|
||||
typedef interface input_gpio_if
|
||||
{
|
||||
/** Perform an input on a GPIO
|
||||
*
|
||||
* \returns The value input from the port in the least significant bit.
|
||||
* The rest of the value will be zero extended.
|
||||
*/
|
||||
unsigned input(void);
|
||||
|
||||
/** Perform an input on a GPIO and get a timestamp
|
||||
*
|
||||
* \param timestamp This pass-by-reference parameter will be set
|
||||
* to the time the value was input. This timestamp
|
||||
* is the 16-bit port timer value. The port timer is
|
||||
* driven at the rate of the port clock.
|
||||
*
|
||||
* \returns The value input from the port in the least significant bit.
|
||||
* The rest of the value will be zero extended.
|
||||
*/
|
||||
unsigned input_and_timestamp(gpio_time_t ×tamp);
|
||||
|
||||
/** Request an event when the pin is a certain value.
|
||||
*
|
||||
* This function will cause a notification to occur when the pins
|
||||
* match the specified value.
|
||||
*
|
||||
* \param val The least significant bit represents the 1-bit value to match.
|
||||
*/
|
||||
[[clears_notification]]
|
||||
void event_when_pins_eq(unsigned val);
|
||||
|
||||
/** A pin event has occurred.
|
||||
*
|
||||
* This notification will occur when a pin event has occurred.
|
||||
* Events can be requested using the event_when_pins_eq() call.
|
||||
*/
|
||||
[[notification]]
|
||||
slave void event(void);
|
||||
|
||||
} input_gpio_if;
|
||||
|
||||
/** This interface provides access to a GPIO that can perform output
|
||||
operations only. All GPIOs are single bit. */
|
||||
typedef interface output_gpio_if
|
||||
{
|
||||
/** Perform an output on a GPIO.
|
||||
*
|
||||
* \param data The value to be output. The least significant bit
|
||||
* represents the 1-bit value to be output.
|
||||
*/
|
||||
void output(unsigned data);
|
||||
|
||||
/** Perform an output on a GPIO and get a timestamp of when the output
|
||||
* occurs.
|
||||
*
|
||||
* \param data The value to be output. The least significant bit
|
||||
* represents the 1-bit value to be output.
|
||||
*
|
||||
* \returns The time the value was input. This timestamp
|
||||
* is the 16-bit port timer value. The port timer is driven
|
||||
* at the rate of the port clock.
|
||||
*/
|
||||
gpio_time_t output_and_timestamp(unsigned data);
|
||||
} output_gpio_if;
|
||||
|
||||
|
||||
/** Task that splits a multi-bit port into several 1-bit GPIO interfaces.
|
||||
*
|
||||
* This component allows other tasks to access the individual bits of
|
||||
* a multi-bit output port.
|
||||
*
|
||||
* \param i The array of interfaces to connect to other tasks.
|
||||
* \param n The number of interfaces connected.
|
||||
* \param p The output port to be split.
|
||||
* \param pin_map This array maps the connected interfaces to the pin
|
||||
* of the port. For example, if 3 clients are connected
|
||||
* to split a 8-bit port and the array {2,5,3} is supplied.
|
||||
* Then bit 2 will go to interface 0, bit 5 to inteface 1
|
||||
* and bit 3 to inteface 2. If null is supplied for this
|
||||
* argument then the pin map is assumed to be {0,1,2...}.
|
||||
*/
|
||||
[[distributable]]
|
||||
void output_gpio(server output_gpio_if i[n], static const size_t n, out port p,
|
||||
char (&?pin_map)[n]);
|
||||
|
||||
/** Task that splits a multi-bit input port into several 1-bit GPIO interfaces
|
||||
* (no events).
|
||||
*
|
||||
* This component allows other tasks to access the individual bits of
|
||||
* a multi-bit input port. It does not support events but is distributable so
|
||||
* requires no specific logical core to run on. If the event_when_pins_eq()
|
||||
* function is called then the component will trap.
|
||||
*
|
||||
* \param i The array of interfaces to connect to other tasks.
|
||||
* \param n The number of interfaces connected.
|
||||
* \param p The input port to be split.
|
||||
* \param pin_map This array maps the connected interfaces to the pin
|
||||
* of the port. For example, if 3 clients are connected
|
||||
* to split a 8-bit port and the array {2,5,3} is supplied.
|
||||
* Then bit 2 will go to interface 0, bit 5 to inteface 1
|
||||
* and bit 3 to inteface 2. If null is supplied for this
|
||||
* argument then the pin map is assumed to be {0,1,2...}.
|
||||
*/
|
||||
[[distributable]]
|
||||
void input_gpio(server input_gpio_if i[n], static const size_t n, in port p,
|
||||
char (&?pin_map)[n]);
|
||||
|
||||
/* Task that splits a multi-bit input port into several 1-bit GPIO interfaces
|
||||
* (with events).
|
||||
*
|
||||
* This component allows other tasks to access the individual bits of
|
||||
* a multi-bit input port. It does support events so requires a logical
|
||||
* core to run on (but can be combined with other tasks on the same core).
|
||||
*
|
||||
* \param i The array of interfaces to connect to other tasks.
|
||||
* \param n The number of interfaces connected.
|
||||
* \param p The input port to be split.
|
||||
* \param pin_map This array maps the connected interfaces to the pin
|
||||
* of the port. For example, if 3 clients are connected
|
||||
* to split a 8-bit port and the array {2,5,3} is supplied.
|
||||
* Then bit 2 will go to interface 0, bit 5 to inteface 1
|
||||
* and bit 3 to inteface 2. If null is supplied for this
|
||||
* argument then the pin map is assumed to be {0,1,2...}.
|
||||
*/
|
||||
[[combinable]]
|
||||
void input_gpio_with_events(server input_gpio_if i[n],
|
||||
static const size_t n,
|
||||
in port p,
|
||||
char (&?pin_map)[n]);
|
||||
|
||||
/** Convert a 1-bit port to a single 1-bit GPIO interface.
|
||||
*
|
||||
* This component allows other tasks to access a 1-bit port as a GPIO
|
||||
* interface. It is more efficient that using input_gpio_with_events() for the
|
||||
* restricted case where a 1-bit port is used.
|
||||
*
|
||||
* \param i The interface to connect to other tasks.
|
||||
* \param p The input port.
|
||||
*/
|
||||
[[combinable]]
|
||||
void input_gpio_1bit_with_events(server input_gpio_if i, in port p);
|
||||
|
||||
#endif
|
||||
#endif // __gpio_h__
|
||||
@@ -1,19 +0,0 @@
|
||||
ODGS = $(wildcard *.odg)
|
||||
PDFS = $(ODGS:.odg=.pdf)
|
||||
|
||||
all: $(PDFS)
|
||||
@echo PDFs created
|
||||
|
||||
_uncropped:
|
||||
mkdir _uncropped
|
||||
|
||||
_uncropped/%.pdf: %.odg | _uncropped
|
||||
soffice -env:UserInstallation=file:///home/$(USER)/.libreoffice-alt --headless --convert-to pdf $< --outdir _uncropped
|
||||
|
||||
%.pdf: _uncropped/%.pdf
|
||||
pdfcrop $< $@
|
||||
|
||||
clean:
|
||||
-rm $(PDFS)
|
||||
-rm _uncropped/*.pdf
|
||||
-rmdir _uncropped
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,264 +0,0 @@
|
||||
.. include:: ../../../README.rst
|
||||
|
||||
Connecting external signals to multi-bit ports
|
||||
----------------------------------------------
|
||||
|
||||
Multi-bit ports can be connected to independent signals in either an
|
||||
all output configuration (see :ref:`lib_gpio_n_bit_output`) or an all
|
||||
input configuration (see :ref:`lib_gpio_n_bit_input`). This implies
|
||||
two important restrictions:
|
||||
|
||||
* **Bi-directional signals cannot use this library**
|
||||
* **The signals on the same port must go in the same direction**
|
||||
|
||||
To use bi-directional signals, a dedicated 1-bit hardware port needs
|
||||
to be used.
|
||||
|
||||
.. _lib_gpio_n_bit_input:
|
||||
|
||||
.. figure:: images/n_bit_input.*
|
||||
|
||||
Input configuration
|
||||
|
||||
.. _lib_gpio_n_bit_output:
|
||||
|
||||
.. figure:: images/n_bit_output.*
|
||||
|
||||
Output configuration
|
||||
|
||||
Performance restrictions
|
||||
........................
|
||||
|
||||
This library allows independent access to the pins of mulit-bit ports
|
||||
by multiplexing the port output or input in software. This means that
|
||||
there are some performance implications, namely:
|
||||
|
||||
* The internal buffering, serializing and de-serializing features of
|
||||
the xCORE port are not available.
|
||||
* The software locking and multiplexing between individual bits of
|
||||
the port limits performance. As such, toggling
|
||||
pins at speed above 1Mhz, for example, is not achievable (on a
|
||||
62.5Mhz logical core). The limit may be lower depending on the other
|
||||
code is running on the core and how the other pins of the port are being
|
||||
driven.
|
||||
|
||||
As such, sharing multi-bit ports is most suitable for slow I/O such as
|
||||
LEDs, buttons and reset lines.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Output GPIO usage
|
||||
.................
|
||||
|
||||
Output GPIO components are instantiated as parallel tasks that run in a
|
||||
``par`` statement. These components connect to the hardware ports of
|
||||
the xCORE device. The application
|
||||
can connect via an interface connection using an array of the ``output_gpio_if``
|
||||
interface type:
|
||||
|
||||
.. figure:: images/output_gpio_task_diag.*
|
||||
|
||||
Output GPIO task diagram
|
||||
|
||||
For example, the following code instantiates an output GPIO component
|
||||
for the first 3 pins of a port and connects to it::
|
||||
|
||||
port p = XS1_PORT_4C;
|
||||
|
||||
int main(void) {
|
||||
output_gpio_if i_gpio[3];
|
||||
par {
|
||||
output_gpio(i_gpio, 3, p, null);
|
||||
task1(i_gpio[0], i_gpio[1]);
|
||||
task2(i_gpio[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Note that the connection is an array of interfaces, so several tasks
|
||||
can connect to the same component instance, each controlling
|
||||
different pins of the port.
|
||||
|
||||
The application can use the client end of the interface connection to
|
||||
perform GPIO operations e.g.::
|
||||
|
||||
void task1(client output_gpio_if gpio1, client output_gpio_if gpio2)
|
||||
{
|
||||
...
|
||||
gpio1.output(1);
|
||||
gpio2.output(0);
|
||||
delay_milliseconds(200);
|
||||
gpio1.output(0);
|
||||
gpio2.output(1);
|
||||
...
|
||||
}
|
||||
|
||||
More information on interfaces and tasks can be be found in
|
||||
the :ref:`XMOS Programming Guide<programming_guide>`. By default the
|
||||
output GPIO component does not use any logical cores of its
|
||||
own. It is a *distributed* task which means it will perform its
|
||||
function on the logical core of the application task connected to
|
||||
it (provided the application task is on the same tile).
|
||||
|
||||
Input GPIO usage
|
||||
................
|
||||
|
||||
There are two types of input GPIO component: those that support events
|
||||
and those that do not support events. In both cases,
|
||||
input GPIO components are instantiated as parallel tasks that run in a
|
||||
``par`` statement. These components connect to the hardware ports of
|
||||
the xCORE device. The application
|
||||
can connect via an interface connection using an array of the ``input_gpio_if``
|
||||
interface type:
|
||||
|
||||
.. figure:: images/input_gpio_task_diag.*
|
||||
|
||||
Input GPIO task diagram
|
||||
|
||||
For example, the following code instantiates an input GPIO component
|
||||
for the first 3 pins of a port and connects to it::
|
||||
|
||||
port p = XS1_PORT_4C;
|
||||
|
||||
int main(void) {
|
||||
input_gpio_if i_gpio[3];
|
||||
par {
|
||||
input_gpio(i_gpio, 3, p, null);
|
||||
task1(i_gpio[0], i_gpio[1]);
|
||||
task2(i_gpio[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Note that the connection is an array of interfaces, so several tasks
|
||||
can connect to the same component instance, each controlling
|
||||
different pins of the port.
|
||||
|
||||
|newpage|
|
||||
|
||||
The application can use the client end of the interface connection to
|
||||
perform GPIO operations e.g.::
|
||||
|
||||
void task1(client input_gpio_if gpio1, client input_gpio_if gpio2)
|
||||
{
|
||||
...
|
||||
val1 = gpio1.input();
|
||||
val2 = gpio2.input();
|
||||
...
|
||||
...
|
||||
val1 = gpio1.input();
|
||||
val2 = gpio2.input();
|
||||
...
|
||||
}
|
||||
|
||||
More information on interfaces and tasks can be be found in
|
||||
the :ref:`XMOS Programming Guide<programming_guide>`. By default the
|
||||
output GPIO component does not use any logical cores of its
|
||||
own. It is a *distributed* task which means it will perform its
|
||||
function on the logical core of the application task connected to
|
||||
it (provided the application task is on the same tile).
|
||||
|
||||
Using events
|
||||
............
|
||||
|
||||
The :c:func:`input_gpio_with_events` and
|
||||
:c:func:`input_gpio_1bit_with_events` functions support the event
|
||||
based functions of the input GPIO interface::
|
||||
|
||||
port p = XS1_PORT_4C;
|
||||
|
||||
int main(void) {
|
||||
input_gpio_if i_gpio[3];
|
||||
par {
|
||||
input_gpio_with_events(i_gpio, 3, p, null);
|
||||
task1(i_gpio[0], i_gpio[1]);
|
||||
task2(i_gpio[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
In this case the application can request an event on a pin change and
|
||||
then select on the event happening e.g.::
|
||||
|
||||
gpio.event_when_pins_eq(1);
|
||||
select {
|
||||
case gpio.event():
|
||||
// This event was caused by the pin value being 1
|
||||
...
|
||||
break;
|
||||
}
|
||||
|
||||
|newpage|
|
||||
|
||||
Pin maps
|
||||
........
|
||||
|
||||
The GPIO tasks all take a ``pin_map`` argument. If this is ``null``
|
||||
then the elements of the inteface array will correspond with the a bit
|
||||
of the port based on the array element index. So the first element of
|
||||
the array will control bit 0, the second with control bit 1 and so on.
|
||||
|
||||
Alternatively an array can be provided mapping array elements to
|
||||
pins. For example, the following will map the array indices to pins 3,
|
||||
2 and 7 of the port::
|
||||
|
||||
char pin_map[3] = {3, 2, 7};
|
||||
|
||||
int main() {
|
||||
...
|
||||
par {
|
||||
output_gpio(i_gpio, 3, p, pin_map);
|
||||
...
|
||||
|
||||
Output GPIO API
|
||||
---------------
|
||||
|
||||
All GPIO functions can be accessed via the ``gpio.h`` header::
|
||||
|
||||
#include <gpio.h>
|
||||
|
||||
You will also have to add ``lib_gpio`` to the
|
||||
``USED_MODULES`` field of your application Makefile.
|
||||
|
||||
Output GPIO components
|
||||
......................
|
||||
|
||||
.. doxygenfunction:: output_gpio
|
||||
|
||||
|newpage|
|
||||
|
||||
Output GPIO interface
|
||||
.....................
|
||||
|
||||
.. doxygeninterface:: output_gpio_if
|
||||
|
||||
Input GPIO API
|
||||
--------------
|
||||
|
||||
Input GPIO components
|
||||
......................
|
||||
|
||||
.. doxygenfunction:: input_gpio
|
||||
.. doxygenfunction:: input_gpio_with_events
|
||||
|
||||
|newpage|
|
||||
|
||||
.. doxygenfunction:: input_gpio_1bit_with_events
|
||||
|
||||
|newpage|
|
||||
|
||||
Input GPIO interface
|
||||
....................
|
||||
|
||||
.. doxygeninterface:: input_gpio_if
|
||||
|
||||
|
||||
|appendix|
|
||||
|
||||
Known Issues
|
||||
------------
|
||||
|
||||
No known issues.
|
||||
|
||||
.. include:: ../../../CHANGELOG.rst
|
||||
@@ -1,2 +0,0 @@
|
||||
XMOSNEWSTYLE = 1
|
||||
DOXYGEN_DIRS=../../api
|
||||
@@ -1,6 +0,0 @@
|
||||
set(LIB_NAME lib_gpio)
|
||||
set(LIB_VERSION 2.2.0)
|
||||
set(LIB_INCLUDES api)
|
||||
set(LIB_COMPILER_FLAGS -Os)
|
||||
|
||||
XMOS_REGISTER_MODULE()
|
||||
@@ -1,14 +0,0 @@
|
||||
VERSION = 2.2.0
|
||||
|
||||
DEPENDENT_MODULES = lib_xassert(>=4.0.0)
|
||||
|
||||
MODULE_XCC_FLAGS = $(XCC_FLAGS) \
|
||||
-O3
|
||||
|
||||
OPTIONAL_HEADERS +=
|
||||
|
||||
EXPORT_INCLUDE_DIRS = api
|
||||
|
||||
INCLUDE_DIRS = $(EXPORT_INCLUDE_DIRS)
|
||||
|
||||
SOURCE_DIRS = src
|
||||
@@ -1,163 +0,0 @@
|
||||
// Copyright 2014-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <xs1.h>
|
||||
#include <gpio.h>
|
||||
#include <xassert.h>
|
||||
#include <print.h>
|
||||
|
||||
[[distributable]]
|
||||
void input_gpio(server input_gpio_if i[n], static const size_t n,
|
||||
in port p, char (&?pin_map)[n])
|
||||
{
|
||||
char *pmap;
|
||||
char default_pmap[n];
|
||||
if (!isnull(pin_map)) {
|
||||
pmap = pin_map;
|
||||
}
|
||||
else {
|
||||
pmap = default_pmap;
|
||||
for (size_t i = 0; i < n; i++)
|
||||
pmap[i] = i;
|
||||
}
|
||||
while (1) {
|
||||
select {
|
||||
case i[int j].input() -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].input_and_timestamp(gpio_time_t &ts) -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result @ ts;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].event_when_pins_eq(unsigned value):
|
||||
fail("input_gpio task does not support events.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma unsafe arrays
|
||||
[[combinable]]
|
||||
void input_gpio_with_events(server input_gpio_if i[n],
|
||||
static const size_t n,
|
||||
in port p,
|
||||
char (&?pin_map)[n])
|
||||
{
|
||||
char *pmap;
|
||||
char default_pmap[32];
|
||||
if (!isnull(pin_map)) {
|
||||
pmap = pin_map;
|
||||
}
|
||||
else {
|
||||
pmap = default_pmap;
|
||||
for (size_t i = 0; i < n; i++)
|
||||
pmap[i] = i;
|
||||
}
|
||||
unsigned pval = 0;
|
||||
char test_vals[32];
|
||||
unsigned waiting = 0;
|
||||
for (size_t j = 0; j < n; j++)
|
||||
test_vals[j] = -1;
|
||||
while (1) {
|
||||
select {
|
||||
case i[int j].input() -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].input_and_timestamp(gpio_time_t &ts) -> unsigned result:
|
||||
unsigned pos = pmap[j];
|
||||
p :> result @ ts;
|
||||
result = (result >> pos) & 1;
|
||||
break;
|
||||
case i[int j].event_when_pins_eq(unsigned value):
|
||||
unsigned val;
|
||||
p :> val;
|
||||
unsigned pos = pmap[j];
|
||||
unsigned bit = (val >> pos) & 1;
|
||||
if (bit == value)
|
||||
i[j].event();
|
||||
else {
|
||||
if (test_vals[j] != -1)
|
||||
waiting++;
|
||||
test_vals[j] = value;
|
||||
}
|
||||
break;
|
||||
case waiting => p when pinsneq(pval) :> pval:
|
||||
for (size_t j = 0; j < n; j++) {
|
||||
unsigned pos = pmap[j];
|
||||
unsigned bit = (pval >> pos) & 1;
|
||||
if (bit == test_vals[j]) {
|
||||
test_vals[j] = -1;
|
||||
waiting--;
|
||||
i[j].event();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[[combinable]]
|
||||
void input_gpio_1bit_with_events(server input_gpio_if i, in port p)
|
||||
{
|
||||
unsigned test_val = -1;
|
||||
while (1) {
|
||||
select {
|
||||
case i.input() -> unsigned result:
|
||||
p :> result;
|
||||
break;
|
||||
case i.input_and_timestamp(gpio_time_t &ts) -> unsigned result:
|
||||
p :> result @ ts;
|
||||
break;
|
||||
case i.event_when_pins_eq(unsigned value):
|
||||
test_val = value;
|
||||
break;
|
||||
case (test_val != -1) => p when pinseq(test_val) :> int:
|
||||
i.event();
|
||||
test_val = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[[distributable]]
|
||||
void output_gpio(server output_gpio_if i[n], static const size_t n, out port p,
|
||||
char (&?pin_map)[n])
|
||||
{
|
||||
char *pmap;
|
||||
char default_pmap[n];
|
||||
if (!isnull(pin_map)) {
|
||||
pmap = pin_map;
|
||||
}
|
||||
else {
|
||||
pmap = default_pmap;
|
||||
for (size_t i = 0; i < n; i++)
|
||||
pmap[i] = i;
|
||||
}
|
||||
unsigned current_val = 0;
|
||||
while (1) {
|
||||
select {
|
||||
case i[int j].output(unsigned data):
|
||||
unsigned pos = pmap[j];
|
||||
current_val &= ~(1 << pos);
|
||||
current_val |= ((data & 1) << pos);
|
||||
p <: current_val;
|
||||
break;
|
||||
|
||||
case i[int j].output_and_timestamp(unsigned data) -> gpio_time_t ts:
|
||||
unsigned pos = pmap[j];
|
||||
current_val &= ~(1 << pos);
|
||||
current_val |= ((data & 1) << pos);
|
||||
p <: current_val @ ts;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
# Copyright 2020-2024 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import setuptools
|
||||
|
||||
# Another repository might depend on python code defined in this one. The
|
||||
# procedure to set up a suitable python environment for that repository may
|
||||
# pip-install this one as editable using this setup.py file. To minimise the
|
||||
# chance of version conflicts while ensuring a minimal degree of conformity,
|
||||
# the 3rd-party modules listed here require the same major version and at
|
||||
# least the same minor version as specified in the requirements.txt file.
|
||||
# The same modules should appear in the requirements.txt file as given below.
|
||||
setuptools.setup(
|
||||
name='lib_gpio',
|
||||
packages=setuptools.find_packages(),
|
||||
install_requires=[
|
||||
'flake8~=7.0',
|
||||
],
|
||||
dependency_links=[
|
||||
],
|
||||
)
|
||||
@@ -1,34 +0,0 @@
|
||||
# python_version 3.12
|
||||
#
|
||||
# The parse_version_from_requirements() function in the installPipfile.groovy
|
||||
# file of the Jenkins Shared Library uses the python_version comment to set
|
||||
# the version of python used.
|
||||
|
||||
# Distributed (released) dependencies
|
||||
#
|
||||
# The python modules listed below specify a known working combination required
|
||||
# by the python code in this repository. The procedure used to set up a
|
||||
# suitable python environment for it installs the version of each module in
|
||||
# the list. Using a specific version ensures a controlled infrastructure for
|
||||
# development, testing and release of this repository.
|
||||
#
|
||||
# Another repository might depend on python code defined in this one. The
|
||||
# procedure to set up a suitable python environment for that repository may
|
||||
# pip-install this one as editable using this repository's setup.py file. The
|
||||
# same modules should appear in the setup.py list as given below.
|
||||
|
||||
flake8==7.0.0
|
||||
|
||||
# Development dependencies
|
||||
#
|
||||
# Each link listed below specifies the path to a setup.py file which are
|
||||
# installed in editable mode with '-e $PATH' (without the quotes).
|
||||
#
|
||||
# If python code in this repository depends on python code under development
|
||||
# in another repository, then an entry for that other respository should
|
||||
# appear in this list instead of the released dependencies list.
|
||||
#
|
||||
# If this repository uses the setup functionality (e.g., script entry points)
|
||||
# of its own setup.py file, then this list must include an entry for that
|
||||
# setup.py file, e.g., '-e .' or '-e ./python' (without the quotes).
|
||||
-e ./python
|
||||
@@ -1,74 +0,0 @@
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
|
||||
class GPIOBasicChecker(xmostest.SimThread):
|
||||
"""
|
||||
This simulator thread will read and write to pins.
|
||||
"""
|
||||
|
||||
def __init__(self, mode, test_port, expected_test_port_data, num_clients,
|
||||
trigger_port = None):
|
||||
self._mode = mode
|
||||
if self._mode != 'input' and self._mode != 'output':
|
||||
print("ERROR: Checker initialised in unsupported mode %s" %
|
||||
(self._mode))
|
||||
self._test_port = test_port
|
||||
self._expected_test_port_data = expected_test_port_data
|
||||
self._num_clients = num_clients
|
||||
self._trigger_port = trigger_port
|
||||
|
||||
print("Checking %s on port %s with %d clients" % (self._mode,
|
||||
self._test_port, self._num_clients))
|
||||
if self._trigger_port != None:
|
||||
print("Using port %s as trigger" % (self._trigger_port))
|
||||
|
||||
def drive_port(self, xsi):
|
||||
# Check the xCORE is not trying to drive the port
|
||||
if xsi.is_port_driving(self._test_port):
|
||||
print("ERROR: xCORE driving port %s which expected to be input only"
|
||||
% (self._test_port))
|
||||
# Drive the port
|
||||
xsi.drive_port_pins(self._test_port, self._expected_test_port_data)
|
||||
print("Checker driving port")
|
||||
|
||||
def read_port(self, xsi):
|
||||
pin_values = []
|
||||
for client in range(0, self._num_clients):
|
||||
pin_values.append(-1)
|
||||
|
||||
correct_pin_count = 0
|
||||
while (correct_pin_count < self._num_clients):
|
||||
# Wait for the xCORE to drive the port
|
||||
self.wait_for_port_pins_change([self._test_port])
|
||||
port_data = xsi.sample_port_pins(self._test_port)
|
||||
for client in range(0, self._num_clients):
|
||||
# Check for the updated pin
|
||||
pin_data = ((port_data >> client) & 1)
|
||||
if pin_values[client] == -1:
|
||||
# Not yet seen the correct pin data yet
|
||||
if pin_data == ((self._expected_test_port_data >>
|
||||
client) & 1):
|
||||
pin_values[client] = pin_data
|
||||
correct_pin_count +=1
|
||||
print("Checker has seen correct value on pin %d " %
|
||||
(client))
|
||||
else: # Check valid pin data has not been overwritten
|
||||
if pin_values[client] != ((self._expected_test_port_data >>
|
||||
client) & 1):
|
||||
print("ERROR: Data on pin %d changed unexpected" %
|
||||
(client))
|
||||
print("Checker has seen all pins change")
|
||||
|
||||
# Drive trigger port to allow xCORE program to terminate
|
||||
xsi.drive_port_pins(self._trigger_port, 1)
|
||||
print("Checker driving termination trigger")
|
||||
|
||||
def run(self):
|
||||
if self._mode == 'input':
|
||||
# xCORE testing 'input' functionality means checker must drive port
|
||||
self.drive_port(self.xsi)
|
||||
elif self._mode == 'output':
|
||||
# xCORE testing 'output' functionality means checker must read port
|
||||
self.read_port(self.xsi)
|
||||
print("Checker complete")
|
||||
@@ -1,49 +0,0 @@
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
|
||||
class GPIOEventsChecker(xmostest.SimThread):
|
||||
"""
|
||||
This simulator thread will write to pins to allow xCORE to event.
|
||||
"""
|
||||
|
||||
def __init__(self, test_port, expected_test_port_data, num_clients,
|
||||
trigger_port):
|
||||
self._test_port = test_port
|
||||
self._expected_test_port_data = expected_test_port_data
|
||||
self._num_clients = num_clients
|
||||
self._trigger_port = trigger_port
|
||||
|
||||
print("Checking events on port %s with %d clients" % (self._test_port,
|
||||
self._num_clients))
|
||||
print("Using port %s as trigger" % (self._trigger_port))
|
||||
|
||||
def drive_port(self, xsi):
|
||||
# Check the xCORE is not trying to drive the port
|
||||
if xsi.is_port_driving(self._test_port):
|
||||
print("ERROR: xCORE driving port %s which expected to be input only"
|
||||
% (self._test_port))
|
||||
# Drive the test port
|
||||
xsi.drive_port_pins(self._test_port, self._expected_test_port_data)
|
||||
print("Checker driving port")
|
||||
# Flip bits of expected data for second part of test
|
||||
self._expected_test_port_data = ~self._expected_test_port_data
|
||||
# Delay driving new data to test port until num_client bits of
|
||||
# trigger_port go high
|
||||
expected_trigger_data = 0
|
||||
for i in range(0, self._num_clients):
|
||||
expected_trigger_data = (expected_trigger_data << 1) + 1
|
||||
print("Checker expecting 0x%x as trigger data" % (expected_trigger_data))
|
||||
while True:
|
||||
self.wait_for_port_pins_change([self._trigger_port])
|
||||
trigger_data = xsi.sample_port_pins(self._trigger_port)
|
||||
if trigger_data == expected_trigger_data:
|
||||
print("Checker received correct trigger")
|
||||
break
|
||||
# Drive the test port
|
||||
xsi.drive_port_pins(self._test_port, self._expected_test_port_data)
|
||||
print("Checker driving port")
|
||||
|
||||
def run(self):
|
||||
self.drive_port(self.xsi)
|
||||
print("Checker complete")
|
||||
@@ -1,36 +0,0 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report
|
||||
|
||||
XCC_FLAGS_input_basic = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0
|
||||
XCC_FLAGS_input_events = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=0
|
||||
XCC_FLAGS_input_timestamps = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
@@ -1,105 +0,0 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <timer.h>
|
||||
#include <syscall.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#define NUM_TEST_EVENTS (2)
|
||||
#define TIMESTAMP_TEST_DELAY_MICROSECONDS (5)
|
||||
#define TIMESTAMP_TEST_DELAY_CLOCKS (TIMESTAMP_TEST_DELAY_MICROSECONDS * XS1_TIMER_MHZ)
|
||||
#define TIMESTAMP_TEST_DELAY_SLACK_CLOCKS (100)
|
||||
|
||||
port input_port = XS1_PORT_1A;
|
||||
port trigger_port = XS1_PORT_4B;
|
||||
|
||||
void read_port_on_event(client input_gpio_if input_port) {
|
||||
unsigned int completed_events = 0;
|
||||
unsigned int expected_value = 1;
|
||||
|
||||
/* Setup event that should trigger immediately */
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE setup pins eq event\n");
|
||||
|
||||
while (1) {
|
||||
select {
|
||||
case input_port.event():
|
||||
debug_printf("xCORE got input port event\n");
|
||||
completed_events++;
|
||||
// Read value on pin to make sure it's correct
|
||||
unsigned int pin_data = input_port.input();
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read does not match expected data 0x%x\n",
|
||||
pin_data, expected_value);
|
||||
}
|
||||
|
||||
if (completed_events < NUM_TEST_EVENTS) {
|
||||
/* Setup event that should trigger later */
|
||||
// Flip expected_value each iteration of test
|
||||
expected_value = !expected_value;
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE setup pins eq event\n");
|
||||
// Trigger simulator to output new expected_value
|
||||
debug_printf("xCORE driving trigger port\n");
|
||||
trigger_port <: 1;
|
||||
} else {
|
||||
_exit(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void read_port(client input_gpio_if input_port) {
|
||||
unsigned int pin_data;
|
||||
unsigned int expected_value = 1;
|
||||
|
||||
if (TIMESTAMPS) {
|
||||
gpio_time_t ts1, ts2;
|
||||
pin_data = input_port.input_and_timestamp(ts1);
|
||||
// Wait known time before second input with timestamp
|
||||
delay_microseconds(TIMESTAMP_TEST_DELAY_MICROSECONDS);
|
||||
input_port.input_and_timestamp(ts2);
|
||||
// Check that the second ts is a later time than the first
|
||||
if (porttimeafter(ts1, ts2)) {
|
||||
debug_printf("ERROR: Second timestamp (%d) read appears to be earlier than first (%d)\n",
|
||||
ts2, ts1);
|
||||
}
|
||||
// Sanity check difference between timestamps
|
||||
if ((ts2 - ts1) <
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS - TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read smaller than expected\n",
|
||||
ts1, ts2);
|
||||
}
|
||||
if ((ts2 - ts1) >
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS + TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read larger than expected\n",
|
||||
ts1, ts2);
|
||||
}
|
||||
} else {
|
||||
pin_data = input_port.input();
|
||||
}
|
||||
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read does not match expected data 0x%x\n",
|
||||
pin_data, expected_value);
|
||||
} else {
|
||||
debug_printf("xCORE input data correctly\n");
|
||||
}
|
||||
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
interface input_gpio_if i_input_port;
|
||||
par {
|
||||
input_gpio_1bit_with_events(i_input_port, input_port);
|
||||
#if EVENTS
|
||||
read_port_on_event(i_input_port);
|
||||
#else
|
||||
read_port(i_input_port);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
@@ -1,40 +0,0 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report
|
||||
|
||||
XCC_FLAGS_input_basic = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_events = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_timestamps = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_events_timestamps = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_supply_pin_map = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=1 -DCROSSTILE=0
|
||||
XCC_FLAGS_input_crosstile = $(COMMON_FLAGS) -DEVENTS=0 -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0 -DCROSSTILE=1
|
||||
XCC_FLAGS_input_events_timestamps_supply_pin_map_crosstile = $(COMMON_FLAGS) -DEVENTS=1 -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=1 -DCROSSTILE=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
@@ -1,85 +0,0 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <timer.h>
|
||||
#include <syscall.h>
|
||||
#include <platform.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#ifndef CROSSTILE
|
||||
#define CROSSTILE 0
|
||||
#endif
|
||||
|
||||
#define NUM_CLIENTS (4)
|
||||
#define TIMESTAMP_TEST_DELAY_MICROSECONDS (5)
|
||||
#define TIMESTAMP_TEST_DELAY_CLOCKS (TIMESTAMP_TEST_DELAY_MICROSECONDS * XS1_TIMER_MHZ)
|
||||
#define TIMESTAMP_TEST_DELAY_SLACK_CLOCKS (100 + CROSSTILE?100:0)
|
||||
|
||||
on tile[0] : port input_port = XS1_PORT_4D;
|
||||
|
||||
void read_port(client input_gpio_if input_port, unsigned int client_num) {
|
||||
unsigned int pin_data;
|
||||
unsigned int expected_value = (client_num & 1);
|
||||
if (SUPPLY_PIN_MAP) {
|
||||
expected_value = !expected_value;
|
||||
}
|
||||
|
||||
if (TIMESTAMPS) {
|
||||
gpio_time_t ts1, ts2;
|
||||
pin_data = input_port.input_and_timestamp(ts1);
|
||||
// Wait known time before second input with timestamp
|
||||
delay_microseconds(TIMESTAMP_TEST_DELAY_MICROSECONDS);
|
||||
input_port.input_and_timestamp(ts2);
|
||||
// Check that the second ts is a later time than the first
|
||||
if (porttimeafter(ts1, ts2)) {
|
||||
debug_printf("ERROR: Second timestamp (%d) read by client %d appears to be earlier than first (%d)\n",
|
||||
ts2, client_num, ts1);
|
||||
}
|
||||
// Sanity check difference between timestamps
|
||||
if ((ts2 - ts1) <
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS - TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read by client %d smaller than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
if ((ts2 - ts1) >
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS + TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) read by client %d larger than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
} else {
|
||||
pin_data = input_port.input();
|
||||
}
|
||||
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read by client %d does not match expected data 0x%x\n",
|
||||
pin_data, client_num, expected_value);
|
||||
} else {
|
||||
debug_printf("xCORE client %d input data correctly\n", client_num);
|
||||
}
|
||||
|
||||
// Allow other cores to complete
|
||||
delay_microseconds(5);
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
#if SUPPLY_PIN_MAP
|
||||
static char pin_map[NUM_CLIENTS] = {1, 0, 3, 2};
|
||||
#else
|
||||
#define pin_map null
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
interface input_gpio_if i_input_port[NUM_CLIENTS];
|
||||
par {
|
||||
#if EVENTS
|
||||
on tile[0] : input_gpio_with_events(i_input_port, NUM_CLIENTS, input_port, pin_map);
|
||||
#else
|
||||
on tile[0] : input_gpio(i_input_port, NUM_CLIENTS, input_port, pin_map);
|
||||
#endif
|
||||
par (int i = 0; i < NUM_CLIENTS; i++) {
|
||||
on tile[CROSSTILE?i%2:0] : read_port(i_input_port[i], i);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
@@ -1,35 +0,0 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report -DXASSERT_ENABLE_ASSERTIONS=1 -DXASSERT_ENABLE_DEBUG=1
|
||||
|
||||
XCC_FLAGS_input_basic = $(COMMON_FLAGS) -DEVENTS=0
|
||||
XCC_FLAGS_input_events = $(COMMON_FLAGS) -DEVENTS=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
@@ -1,70 +0,0 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <timer.h>
|
||||
#include <syscall.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#define NUM_CLIENTS (4)
|
||||
#define NUM_TEST_EVENTS (2)
|
||||
|
||||
port input_port = XS1_PORT_4D;
|
||||
port trigger_port = XS1_PORT_4B;
|
||||
|
||||
void read_port_on_event(client input_gpio_if input_port, unsigned int client_num,
|
||||
client output_gpio_if trigger_port) {
|
||||
unsigned int completed_events = 0;
|
||||
unsigned int expected_value = (client_num & 1);
|
||||
|
||||
/* Setup event that should trigger immediately */
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE client %d setup pins eq event\n", client_num);
|
||||
|
||||
while (1) {
|
||||
select {
|
||||
case input_port.event():
|
||||
debug_printf("xCORE client %d got input port event\n", client_num);
|
||||
completed_events++;
|
||||
// Read value on pin to make sure it's correct
|
||||
unsigned int pin_data = input_port.input();
|
||||
if (pin_data != expected_value) {
|
||||
debug_printf("ERROR: Data 0x%x read by client %d does not match expected data 0x%x\n",
|
||||
pin_data, client_num, expected_value);
|
||||
}
|
||||
|
||||
if (completed_events < NUM_TEST_EVENTS) {
|
||||
/* Setup event that should trigger later */
|
||||
// Flip expected_value each iteration of test
|
||||
expected_value = !expected_value;
|
||||
input_port.event_when_pins_eq(expected_value);
|
||||
debug_printf("xCORE client %d setup pins eq event\n", client_num);
|
||||
// Trigger simulator to output new expected_value
|
||||
debug_printf("xCORE client %d driving trigger port\n", client_num);
|
||||
trigger_port.output(1);
|
||||
} else {
|
||||
// Allow other cores to complete
|
||||
delay_microseconds(5);
|
||||
_exit(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
interface input_gpio_if i_input_port[NUM_CLIENTS];
|
||||
interface output_gpio_if i_trigger_port[NUM_CLIENTS];
|
||||
par {
|
||||
#if EVENTS
|
||||
input_gpio_with_events(i_input_port, NUM_CLIENTS, input_port, null);
|
||||
#else
|
||||
input_gpio(i_input_port, NUM_CLIENTS, input_port, null);
|
||||
#endif
|
||||
output_gpio(i_trigger_port, NUM_CLIENTS, trigger_port, null);
|
||||
par (int i = 0; i < NUM_CLIENTS; i++) {
|
||||
read_port_on_event(i_input_port[i], i, i_trigger_port[i]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
@@ -1,36 +0,0 @@
|
||||
# The TARGET variable determines what target system the application is
|
||||
# compiled for. It either refers to an XN file in the source directories
|
||||
# or a valid argument for the --target option when compiling.
|
||||
|
||||
TARGET = SLICEKIT-L16
|
||||
|
||||
# The APP_NAME variable determines the name of the final .xe file. It should
|
||||
# not include the .xe postfix. If left blank the name will default to
|
||||
# the project name
|
||||
|
||||
APP_NAME =
|
||||
|
||||
# The flags passed to xcc when building the application
|
||||
# You can also set the following to override flags for a particular language:
|
||||
#
|
||||
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
|
||||
#
|
||||
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
|
||||
# xcc for the final link (mapping) stage.
|
||||
|
||||
COMMON_FLAGS = -O2 -g -save-temps -DDEBUG_PRINT_ENABLE=1 -report
|
||||
|
||||
XCC_FLAGS_output_basic = $(COMMON_FLAGS) -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=0
|
||||
XCC_FLAGS_output_timestamps = $(COMMON_FLAGS) -DTIMESTAMPS=1 -DSUPPLY_PIN_MAP=0
|
||||
XCC_FLAGS_output_supply_pin_map = $(COMMON_FLAGS) -DTIMESTAMPS=0 -DSUPPLY_PIN_MAP=1
|
||||
|
||||
# The USED_MODULES variable lists other module used by the application.
|
||||
|
||||
USED_MODULES = lib_gpio lib_logging
|
||||
|
||||
#=============================================================================
|
||||
# The following part of the Makefile includes the common build infrastructure
|
||||
# for compiling XMOS applications. You should not need to edit below here.
|
||||
|
||||
XMOS_MAKE_PATH ?= ../..
|
||||
include $(XMOS_MAKE_PATH)/xcommon/module_xcommon/build/Makefile.common
|
||||
@@ -1,75 +0,0 @@
|
||||
// Copyright 2015-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#include <gpio.h>
|
||||
#include <xs1.h>
|
||||
#include <syscall.h>
|
||||
#include "debug_print.h"
|
||||
|
||||
#define NUM_CLIENTS (4)
|
||||
#define TIMESTAMP_TEST_DELAY_MICROSECONDS (5)
|
||||
#define TIMESTAMP_TEST_DELAY_CLOCKS (TIMESTAMP_TEST_DELAY_MICROSECONDS * XS1_TIMER_MHZ)
|
||||
#define TIMESTAMP_TEST_DELAY_SLACK_CLOCKS (100)
|
||||
|
||||
port output_port = XS1_PORT_4D;
|
||||
port trigger_port = XS1_PORT_4B;
|
||||
|
||||
void wait_for_termination_signal() {
|
||||
debug_printf("xCORE waiting for termination signal\n");
|
||||
select {
|
||||
case trigger_port when pinsneq(0) :> int _:
|
||||
_exit(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void drive_port(client output_gpio_if output_port, unsigned int client_num) {
|
||||
unsigned int expected_pin_data = (client_num & 1);
|
||||
if (SUPPLY_PIN_MAP) {
|
||||
expected_pin_data = !expected_pin_data;
|
||||
}
|
||||
|
||||
if (TIMESTAMPS) {
|
||||
gpio_time_t ts1, ts2;
|
||||
debug_printf("xCORE client %d driving port\n", client_num);
|
||||
ts1 = output_port.output_and_timestamp(expected_pin_data);
|
||||
// Wait known time before second input with timestamp
|
||||
delay_microseconds(TIMESTAMP_TEST_DELAY_MICROSECONDS);
|
||||
ts2 = output_port.output_and_timestamp(expected_pin_data);
|
||||
// Check that the second ts is a later time than the first
|
||||
if (porttimeafter(ts1, ts2)) {
|
||||
debug_printf("ERROR: Second timestamp (%d) received by client %d appears to be earlier than first (%d)\n",
|
||||
ts2, client_num, ts1);
|
||||
}
|
||||
// Sanity check difference between timestamps
|
||||
if ((ts2 - ts1) <
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS - TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) received by client %d smaller than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
if ((ts2 - ts1) >
|
||||
(TIMESTAMP_TEST_DELAY_CLOCKS + TIMESTAMP_TEST_DELAY_SLACK_CLOCKS)) {
|
||||
debug_printf("ERROR: Difference between timestamps (%d, %d) received by client %d larger than expected\n",
|
||||
ts1, ts2, client_num);
|
||||
}
|
||||
} else {
|
||||
debug_printf("xCORE client %d driving port\n", client_num);
|
||||
output_port.output(expected_pin_data);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
interface output_gpio_if i_output_port[NUM_CLIENTS];
|
||||
#if SUPPLY_PIN_MAP
|
||||
char pin_map[NUM_CLIENTS] = {1, 0, 3, 2};
|
||||
#else
|
||||
#define pin_map null
|
||||
#endif
|
||||
par {
|
||||
output_gpio(i_output_port, NUM_CLIENTS, output_port, pin_map);
|
||||
par (int i = 0; i < NUM_CLIENTS; i++) {
|
||||
drive_port(i_output_port[i], i);
|
||||
}
|
||||
wait_for_termination_signal();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
def options(opt):
|
||||
opt.load('xwaf.xcommon')
|
||||
|
||||
def configure(conf):
|
||||
conf.load('xwaf.xcommon')
|
||||
|
||||
def build(bld):
|
||||
bld.do_xcommon()
|
||||
|
||||
def dist(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
|
||||
def distcheck(ctx):
|
||||
ctx.load('xwaf.xcommon')
|
||||
@@ -1,3 +0,0 @@
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE input data correctly
|
||||
@@ -1,10 +0,0 @@
|
||||
Checker driving port
|
||||
Checker expecting 0x1 as trigger data
|
||||
xCORE setup pins eq event
|
||||
xCORE got input port event
|
||||
xCORE setup pins eq event
|
||||
xCORE driving trigger port
|
||||
Checker received correct trigger
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE got input port event
|
||||
@@ -1,6 +0,0 @@
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE client \d input data correctly
|
||||
xCORE client \d input data correctly
|
||||
xCORE client \d input data correctly
|
||||
xCORE client \d input data correctly
|
||||
@@ -1,3 +0,0 @@
|
||||
Checker driving port
|
||||
Checker expecting 0x\w as trigger data
|
||||
input_gpio task does not support events.
|
||||
@@ -1,25 +0,0 @@
|
||||
Checker driving port
|
||||
Checker expecting 0x\w as trigger data
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d setup pins eq event
|
||||
xCORE client \d driving trigger port
|
||||
xCORE client \d driving trigger port
|
||||
xCORE client \d driving trigger port
|
||||
xCORE client \d driving trigger port
|
||||
Checker received correct trigger
|
||||
Checker driving port
|
||||
Checker complete
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
xCORE client \d got input port event
|
||||
@@ -1,12 +0,0 @@
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE waiting for termination signal
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen all pins change
|
||||
Checker driving termination trigger
|
||||
Checker complete
|
||||
@@ -1,12 +0,0 @@
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE client \d driving port
|
||||
xCORE waiting for termination signal
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen correct value on pin \d
|
||||
Checker has seen all pins change
|
||||
Checker driving termination trigger
|
||||
Checker complete
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
|
||||
if __name__ == "__main__":
|
||||
xmostest.init()
|
||||
|
||||
xmostest.register_group("lib_gpio",
|
||||
"gpio_sim_tests",
|
||||
"GPIO simulator tests",
|
||||
"""
|
||||
Tests are performed by running the GPIO library connected to a simulator model
|
||||
(written as a python plugin to xsim). The simulator model checks that the pins
|
||||
are driven and read by the ports as expected. Tests are run to test the
|
||||
following features:
|
||||
|
||||
* Inputting on a multibit port with multiple clients using the default pin map
|
||||
* Inputting on a multibit port with multiple clients using a specified pin map
|
||||
* Inputting on a 1bit port
|
||||
* Inputting with timestamps
|
||||
* Eventing on a multibit input port
|
||||
* Eventing on a 1bit input port
|
||||
* Outputting on a multibit port with multiple clients using the default pin map
|
||||
* Outputting on a multibit port with multiple clients using a specified pin map
|
||||
* Outputting with timestamps
|
||||
""")
|
||||
|
||||
xmostest.runtests()
|
||||
|
||||
xmostest.finish()
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_basic_checker import GPIOBasicChecker
|
||||
|
||||
def do_input_1bit_basic_test(timestamps):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not timestamps:
|
||||
path += '_basic'
|
||||
else:
|
||||
if timestamps:
|
||||
path += '_timestamps'
|
||||
|
||||
binary = 'gpio_input_1bit_test/bin/input' + path + \
|
||||
'/gpio_input_1bit_test_input' + path + '.xe'
|
||||
|
||||
checker = GPIOBasicChecker(mode="input",
|
||||
test_port="tile[0]:XS1_PORT_1A",
|
||||
expected_test_port_data=0b1,
|
||||
num_clients=1)
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_1bit_basic_test.expected'),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_1bit_basic_test',
|
||||
{'timestamps':timestamps,},
|
||||
regexp=False)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_1bit_basic_test(timestamps=False)
|
||||
do_input_1bit_basic_test(timestamps=True)
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_events_checker import GPIOEventsChecker
|
||||
|
||||
def do_input_1bit_events_test():
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
binary = 'gpio_input_1bit_test/bin/input_events/gpio_input_1bit_test_input_events.xe'
|
||||
|
||||
checker = GPIOEventsChecker(test_port="tile[0]:XS1_PORT_1A",
|
||||
expected_test_port_data=0b1,
|
||||
num_clients=1,
|
||||
trigger_port="tile[0]:XS1_PORT_4B")
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_1bit_events_test.expected'),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_1bit_events_test',
|
||||
regexp=False)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_1bit_events_test()
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_basic_checker import GPIOBasicChecker
|
||||
|
||||
def do_input_basic_test(events, timestamps, supply_pin_map, crosstile):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not events and not timestamps and not supply_pin_map and not crosstile:
|
||||
path += '_basic'
|
||||
else:
|
||||
if events:
|
||||
path += '_events'
|
||||
if timestamps:
|
||||
path += '_timestamps'
|
||||
if supply_pin_map:
|
||||
path += '_supply_pin_map'
|
||||
if crosstile:
|
||||
path += '_crosstile'
|
||||
|
||||
binary = 'gpio_input_basic_test/bin/input' + path + \
|
||||
'/gpio_input_basic_test_input' + path + '.xe'
|
||||
|
||||
checker = GPIOBasicChecker(mode="input",
|
||||
test_port="tile[0]:XS1_PORT_4D",
|
||||
expected_test_port_data=0b1010,
|
||||
num_clients=4)
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_basic_test.expected'),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_basic_test',
|
||||
{'events':events,
|
||||
'timestamps':timestamps,
|
||||
'supply_pin_map':supply_pin_map,
|
||||
'crosstile':crosstile},
|
||||
regexp=True)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_basic_test(events=False, timestamps=False, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=False, timestamps=False, supply_pin_map=True, crosstile=False)
|
||||
do_input_basic_test(events=False, timestamps=True, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=True, timestamps=False, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=True, timestamps=True, supply_pin_map=False, crosstile=False)
|
||||
do_input_basic_test(events=False, timestamps=False, supply_pin_map=False, crosstile=True)
|
||||
do_input_basic_test(events=True, timestamps=True, supply_pin_map=True, crosstile=True)
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_events_checker import GPIOEventsChecker
|
||||
|
||||
def do_input_events_test(events):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not events:
|
||||
path += '_basic'
|
||||
else:
|
||||
if events:
|
||||
path += '_events'
|
||||
|
||||
binary = 'gpio_input_events_test/bin/input' + path + \
|
||||
'/gpio_input_events_test_input' + path + '.xe'
|
||||
|
||||
checker = GPIOEventsChecker(test_port="tile[0]:XS1_PORT_4D",
|
||||
expected_test_port_data=0b1010,
|
||||
num_clients=4,
|
||||
trigger_port="tile[0]:XS1_PORT_4B")
|
||||
|
||||
tester = xmostest.ComparisonTester(open('input_events_test%s.expected' % path),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'input_events_test',
|
||||
{'events':events},
|
||||
regexp=True)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_input_events_test(events=False)
|
||||
do_input_events_test(events=True)
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import xmostest
|
||||
from gpio_basic_checker import GPIOBasicChecker
|
||||
|
||||
def do_output_test(timestamps, supply_pin_map):
|
||||
resources = xmostest.request_resource("xsim")
|
||||
|
||||
path = ''
|
||||
if not timestamps and not supply_pin_map:
|
||||
path += '_basic'
|
||||
else:
|
||||
if timestamps:
|
||||
path += '_timestamps'
|
||||
if supply_pin_map:
|
||||
path += '_supply_pin_map'
|
||||
|
||||
binary = 'gpio_output_test/bin/output' + path + \
|
||||
'/gpio_output_test_output' + path + '.xe'
|
||||
|
||||
checker = GPIOBasicChecker(mode="output",
|
||||
test_port="tile[0]:XS1_PORT_4D",
|
||||
expected_test_port_data=0b1010,
|
||||
num_clients=4,
|
||||
trigger_port="tile[0]:XS1_PORT_4B")
|
||||
|
||||
if supply_pin_map:
|
||||
expected_result = 'output_supply_pin_map_test.expected'
|
||||
else:
|
||||
expected_result = 'output_test.expected'
|
||||
tester = xmostest.ComparisonTester(open(expected_result),
|
||||
'lib_gpio', 'gpio_sim_tests',
|
||||
'output_test',
|
||||
{'timestamps':timestamps,
|
||||
'supply_pin_map':supply_pin_map},
|
||||
regexp=True)
|
||||
|
||||
xmostest.run_on_simulator(resources['xsim'], binary, simthreads = [checker],
|
||||
tester = tester)
|
||||
|
||||
def runtest():
|
||||
do_output_test(timestamps=False, supply_pin_map=False)
|
||||
do_output_test(timestamps=False, supply_pin_map=True)
|
||||
do_output_test(timestamps=True, supply_pin_map=False)
|
||||
34
lib_src/.gitignore
vendored
34
lib_src/.gitignore
vendored
@@ -1,34 +0,0 @@
|
||||
**/.build*/*
|
||||
**/bin/*
|
||||
*.o
|
||||
*.xe
|
||||
*.vcd
|
||||
*.xi
|
||||
*.i
|
||||
*.a
|
||||
**/_build/
|
||||
**/run_*.log
|
||||
**/pdf/*
|
||||
*.pyc
|
||||
test_results.csv
|
||||
*.xmt
|
||||
output*.dat
|
||||
*.swp
|
||||
.*.swp
|
||||
.*.*.swp
|
||||
*.swo
|
||||
*.todo
|
||||
org.eclipse.cdt.core.prefs
|
||||
xsim.args
|
||||
tests/src_output
|
||||
*.bak
|
||||
**/.venv/**
|
||||
build/
|
||||
tests/tmp
|
||||
tests/vpu_ff3_test/autogen
|
||||
tests/vpu_rat_test/autogen
|
||||
*.csv
|
||||
python/lib_src.egg-info
|
||||
**/tmp_models/
|
||||
*.bak
|
||||
make_docs.sh
|
||||
3
lib_src/.gitmodules
vendored
3
lib_src/.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
[submodule "xmos_cmake_toolchain"]
|
||||
path = xmos_cmake_toolchain
|
||||
url = git@github.com:xmos/xmos_cmake_toolchain.git
|
||||
@@ -1,32 +0,0 @@
|
||||
tests/asrc_test/model/ASRC.c
|
||||
tests/asrc_test/model/ASRC.h
|
||||
tests/asrc_test/model/FIR.c
|
||||
tests/asrc_test/model/FIR.h
|
||||
tests/asrc_test/model/FilterDefs.c
|
||||
tests/asrc_test/model/FilterDefs.h
|
||||
tests/asrc_test/model/IntArithmetic.c
|
||||
tests/asrc_test/model/IntArithmetic.h
|
||||
tests/asrc_test/model/Main.c
|
||||
tests/asrc_test/model/Main.h
|
||||
tests/ds3_test/model/FIRDS3.c
|
||||
tests/ds3_test/model/FIRDS3.h
|
||||
tests/ds3_test/model/IntArithmetic.c
|
||||
tests/ds3_test/model/IntArithmetic.h
|
||||
tests/ds3_test/model/Main.c
|
||||
tests/ds3_test/model/Main.h
|
||||
tests/os3_test/model/FIROS3.c
|
||||
tests/os3_test/model/FIROS3.h
|
||||
tests/os3_test/model/IntArithmetic.c
|
||||
tests/os3_test/model/IntArithmetic.h
|
||||
tests/os3_test/model/Main.c
|
||||
tests/os3_test/model/Main.h
|
||||
tests/ssrc_test/model/FIR.c
|
||||
tests/ssrc_test/model/FIR.h
|
||||
tests/ssrc_test/model/FilterDefs.c
|
||||
tests/ssrc_test/model/FilterDefs.h
|
||||
tests/ssrc_test/model/IntArithmetic.c
|
||||
tests/ssrc_test/model/IntArithmetic.h
|
||||
tests/ssrc_test/model/Main.c
|
||||
tests/ssrc_test/model/Main.h
|
||||
tests/ssrc_test/model/SSRC.c
|
||||
tests/ssrc_test/model/SSRC.h
|
||||
@@ -1,111 +0,0 @@
|
||||
lib_src change log
|
||||
==================
|
||||
|
||||
2.5.0
|
||||
-----
|
||||
|
||||
* ADDED: VPU enabled ASRC and SSRC providing a 2x speed improvement
|
||||
* ADDED: Asynchronous FIFO with phase detector and PID rate controller for
|
||||
ASRC usage
|
||||
* ADDED: Support for XCommon CMake build system
|
||||
* FIXED: Function pointer annotation avoid stack corruption when using
|
||||
multiple instances of SSRC or ASRC.
|
||||
|
||||
* Changes to dependencies:
|
||||
|
||||
- lib_logging: 3.1.1 -> 3.2.0
|
||||
|
||||
- lib_xassert: Removed dependency
|
||||
|
||||
2.4.0
|
||||
-----
|
||||
|
||||
* ADDED: Support for building the core ASRC code in the C emulator as a
|
||||
library
|
||||
* ADDED: Auto-generated ASRC and SSRC performance plots in documentation
|
||||
* ADDED: Documentation warning about overflow in XS3 optimized SRC components
|
||||
* CHANGED: Documents built under Jenkins instead of Github Actions
|
||||
* CHANGED: Tested against fwk_core v1.0.2 updated from v1.0.0
|
||||
|
||||
2.3.0
|
||||
-----
|
||||
|
||||
* ADDED: XS3 VPU optimised voice fixed factor of 3 upsampling/downsampling
|
||||
* ADDED: XS3 VPU optimised voice fixed factor of 3/2 upsampling/downsampling
|
||||
* CHANGED: OS3 uses firos3_144.dat coefficients by default inline with model
|
||||
* CHANGED: Replaced xmostest with pytest for all SRC automated tests
|
||||
* CHANGED: Used XMOS doc builder for documentation
|
||||
* CHANGED: Golden reference test signals now generated automatically by CI
|
||||
* RESOLVED: Linker warning on channel ends
|
||||
* REMOVED: AN00231 ASRC App Note. See github.com/xmos/sln_voice/examples
|
||||
* CHANGED: Increased precision of the fFsRatioDeviation used in the C emulator
|
||||
from float to double
|
||||
* CHANGED: Allow for 64 bits in the rate ratio passed to asrc_process() for
|
||||
extra precision
|
||||
|
||||
* Changes to dependencies:
|
||||
|
||||
- lib_logging: 2.0.1 -> 3.1.1
|
||||
|
||||
- lib_xassert: 2.0.1 -> 4.1.0
|
||||
|
||||
2.2.0
|
||||
-----
|
||||
|
||||
* CHANGED: Made the FIR coefficient array that is used with the voice fixed
|
||||
factor of 3 up and down sampling functions usable from within C files as
|
||||
well as XC files.
|
||||
* CHANGED: Aligned the FIR coefficient array to an 8-byte boundary. This
|
||||
ensures that the voice fixed factor of 3 up and down sampling functions do
|
||||
not crash with a LOAD_STORE exception.
|
||||
* ADDED: Missing device attributes to the .xn file of the AN00231 app note.
|
||||
* ADDED: Minimal cmake support.
|
||||
|
||||
2.1.0
|
||||
-----
|
||||
|
||||
* CHANGED: Use XMOS Public License Version 1
|
||||
|
||||
2.0.1
|
||||
-----
|
||||
|
||||
* CHANGED: Pin Python package versions
|
||||
* REMOVED: not necessary cpanfile
|
||||
|
||||
2.0.0
|
||||
-----
|
||||
|
||||
* CHANGED: Build files updated to support new "xcommon" behavior in xwaf.
|
||||
|
||||
1.1.2
|
||||
-----
|
||||
|
||||
* CHANGED: initialisation lists to avoid warnings when building
|
||||
|
||||
1.1.1
|
||||
-----
|
||||
|
||||
* RESOLVED: correct compensation factor for voice upsampling
|
||||
* ADDED: test of voice unity gain
|
||||
|
||||
1.1.0
|
||||
-----
|
||||
|
||||
* ADDED: Fixed factor of 3 conversion functions for downsampling and
|
||||
oversampling
|
||||
* ADDED: Fixed factor of 3 downsampling function optimised for use with voice
|
||||
(reduced memory and compute footprint)
|
||||
* ADDED: Fixed factor of 3 upsampling function optimised for use with voice
|
||||
(reduced memory and compute footprint)
|
||||
|
||||
1.0.0
|
||||
-----
|
||||
|
||||
* Initial version
|
||||
|
||||
* Changes to dependencies:
|
||||
|
||||
- lib_logging: Added dependency 2.0.1
|
||||
|
||||
- lib_xassert: Added dependency 2.0.1
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.21.0)
|
||||
|
||||
project(lib_src LANGUAGES C ASM)
|
||||
|
||||
if(PROJECT_IS_TOP_LEVEL)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
fwk_core
|
||||
GIT_REPOSITORY https://github.com/xmos/fwk_core.git
|
||||
GIT_TAG v1.0.2
|
||||
)
|
||||
FetchContent_MakeAvailable(fwk_core)
|
||||
endif()
|
||||
|
||||
add_subdirectory(tests)
|
||||
|
||||
# XS3 only libraries that use the Vector Processing Unit
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL XCORE_XS3A)
|
||||
## Source files
|
||||
file(GLOB_RECURSE LIB_C_SOURCES_XS3 lib_src/src/fixed_factor_vpu_voice/*.c )
|
||||
file(GLOB_RECURSE LIB_XC_SOURCES_XS3 lib_src/src/fixed_factor_vpu_voice/*.xc)
|
||||
file(GLOB_RECURSE LIB_ASM_SOURCES_XS3 lib_src/src/fixed_factor_vpu_voice/*.S )
|
||||
|
||||
set(ADDITIONAL_INCLUDE_DIRS_XS3 lib_src/src/fixed_factor_vpu_voice
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if((${CMAKE_SYSTEM_PROCESSOR} STREQUAL XCORE_XS3A) OR (${CMAKE_SYSTEM_PROCESSOR} STREQUAL XCORE_XS2A))
|
||||
## Source files
|
||||
file(GLOB_RECURSE LIB_C_SOURCES lib_src/src/fixed_factor_of_3/*.c
|
||||
lib_src/src/fixed_factor_of_3_voice/*.c
|
||||
lib_src/src/multirate_hifi/*.c
|
||||
)
|
||||
file(GLOB LIB_C_SOURCES_FIFO lib_src/src/*.c
|
||||
)
|
||||
file(GLOB_RECURSE LIB_XC_SOURCES lib_src/src/fixed_factor_of_3/*.xc
|
||||
lib_src/src/fixed_factor_of_3_voice/*.xc
|
||||
lib_src/src/multirate_hifi/*.xc
|
||||
)
|
||||
file(GLOB_RECURSE LIB_ASM_SOURCES lib_src/src/fixed_factor_of_3/*.S
|
||||
lib_src/src/fixed_factor_of_3_voice/*.S
|
||||
lib_src/src/multirate_hifi/*.S
|
||||
)
|
||||
|
||||
## Create library target
|
||||
add_library(lib_src STATIC EXCLUDE_FROM_ALL ${LIB_C_SOURCES}
|
||||
${LIB_C_SOURCES_FIFO}
|
||||
${LIB_C_SOURCES_XS3}
|
||||
${LIB_ASM_SOURCES}
|
||||
${LIB_XC_SOURCES_XS3}
|
||||
${LIB_XC_SOURCES}
|
||||
${LIB_ASM_SOURCES_XS3}
|
||||
)
|
||||
|
||||
target_include_directories(lib_src
|
||||
PUBLIC
|
||||
lib_src/api
|
||||
lib_src/src/fixed_factor_of_3
|
||||
lib_src/src/fixed_factor_of_3/ds3
|
||||
lib_src/src/fixed_factor_of_3/os3
|
||||
lib_src/src/fixed_factor_of_3_voice
|
||||
lib_src/src/fixed_factor_of_3_voice/ds3_voice
|
||||
lib_src/src/fixed_factor_of_3_voice/us3_voice
|
||||
lib_src/src/multirate_hifi
|
||||
lib_src/src/multirate_hifi/asrc
|
||||
lib_src/src/multirate_hifi/ssrc
|
||||
${ADDITIONAL_INCLUDE_DIRS_XS3}
|
||||
)
|
||||
|
||||
target_compile_options(lib_src
|
||||
PRIVATE
|
||||
-O3
|
||||
-g
|
||||
)
|
||||
|
||||
target_link_libraries(lib_src
|
||||
PUBLIC
|
||||
# defined in fwk_core
|
||||
framework_core_legacy_compat
|
||||
)
|
||||
|
||||
|
||||
endif()
|
||||
178
lib_src/Jenkinsfile
vendored
178
lib_src/Jenkinsfile
vendored
@@ -1,178 +0,0 @@
|
||||
@Library('xmos_jenkins_shared_library@v0.25.0')
|
||||
|
||||
def runningOn(machine) {
|
||||
println "Stage running on:"
|
||||
println machine
|
||||
}
|
||||
|
||||
// run pytest with common flags for project. any passed in though extra args will
|
||||
// be appended
|
||||
def localRunPytest(String extra_args="") {
|
||||
catchError{
|
||||
sh "python -m pytest --junitxml=pytest_result.xml -rA -v --durations=0 -o junit_logging=all ${extra_args}"
|
||||
}
|
||||
junit "pytest_result.xml"
|
||||
}
|
||||
|
||||
getApproval()
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
environment {
|
||||
REPO = 'lib_src'
|
||||
VIEW = getViewName(REPO)
|
||||
PYTHON_VERSION = "3.10.5"
|
||||
VENV_DIRNAME = ".venv"
|
||||
XMOSDOC_VERSION = "v4.0"
|
||||
}
|
||||
options {
|
||||
skipDefaultCheckout()
|
||||
timestamps()
|
||||
}
|
||||
parameters {
|
||||
string(
|
||||
name: 'TOOLS_VERSION',
|
||||
defaultValue: '15.2.1',
|
||||
description: 'The XTC tools version'
|
||||
)
|
||||
}
|
||||
stages {
|
||||
stage('Build and Test') {
|
||||
when {
|
||||
expression { !env.GH_LABEL_DOC_ONLY.toBoolean() }
|
||||
}
|
||||
agent {
|
||||
label 'x86_64&&docker' // These agents have 24 cores so good for parallel xsim runs
|
||||
}
|
||||
stages {
|
||||
stage('Get repo') {
|
||||
steps {
|
||||
sh "mkdir ${REPO}"
|
||||
// source checks require the directory
|
||||
// name to be the same as the repo name
|
||||
dir("${REPO}") {
|
||||
// checkout repo
|
||||
checkout scm
|
||||
sh 'git submodule update --init --recursive --depth 1'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Create Python environment") {
|
||||
steps {
|
||||
dir("${REPO}") {
|
||||
createVenv('requirements.txt')
|
||||
withVenv {
|
||||
sh 'pip install -r requirements.txt'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Library checks') {
|
||||
steps {
|
||||
dir("${REPO}") {
|
||||
sh 'git clone git@github.com:xmos/infr_apps.git'
|
||||
sh 'git clone git@github.com:xmos/infr_scripts_py.git'
|
||||
// These are needed for xmake legacy build and also changelog check
|
||||
sh 'git clone git@github.com:xmos/lib_logging.git'
|
||||
sh 'git clone git@github.com:xmos/lib_xassert.git'
|
||||
withVenv {
|
||||
sh 'pip install -e infr_scripts_py'
|
||||
sh 'pip install -e infr_apps'
|
||||
dir("tests") {
|
||||
withEnv(["XMOS_ROOT=.."]) {
|
||||
localRunPytest('-s test_lib_checks.py -vv')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Test xmake build') {
|
||||
steps {
|
||||
runningOn(env.NODE_NAME)
|
||||
dir("${REPO}") {
|
||||
withTools(params.TOOLS_VERSION) {
|
||||
withVenv {
|
||||
dir("tests") {
|
||||
localRunPytest('-k "legacy" -vv')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Run doc python') {
|
||||
steps {
|
||||
runningOn(env.NODE_NAME)
|
||||
dir("${REPO}") {
|
||||
withTools(params.TOOLS_VERSION) {
|
||||
withVenv {
|
||||
sh "sh doc/build_docs_ci.sh $XMOSDOC_VERSION"
|
||||
archiveArtifacts artifacts: "doc_build.zip", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Tests XS2') {
|
||||
steps {
|
||||
runningOn(env.NODE_NAME)
|
||||
dir("${REPO}") {
|
||||
withTools(params.TOOLS_VERSION) {
|
||||
withVenv {
|
||||
sh 'mkdir -p build'
|
||||
dir("build") {
|
||||
sh 'rm CMakeCache.txt'
|
||||
sh 'cmake --toolchain ../xmos_cmake_toolchain/xs2a.cmake ..'
|
||||
sh 'make test_ds3_voice test_us3_voice test_unity_gain_voice -j'
|
||||
}
|
||||
dir("tests") {
|
||||
localRunPytest('-n auto -k "xs2" -vv')
|
||||
}
|
||||
dir("build") {
|
||||
sh 'rm CMakeCache.txt' // Cleanup XS2 cmake cache for next stage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Tests XS3') {
|
||||
steps {
|
||||
runningOn(env.NODE_NAME)
|
||||
dir("${REPO}") {
|
||||
withTools(params.TOOLS_VERSION) {
|
||||
withVenv {
|
||||
dir("tests") {
|
||||
localRunPytest('-m prepare') // Do all pre work like building and generating golden ref where needed
|
||||
|
||||
// FF3 HiFi tests for OS3 and DS3
|
||||
localRunPytest('-m main -n auto -k "hifi_ff3" -vv')
|
||||
|
||||
// ASRC and SSRC tests across all in/out freqs and deviations (asrc only)
|
||||
localRunPytest('-m main -n auto -k "mrhf" -vv')
|
||||
archiveArtifacts artifacts: "mips_report*.csv", allowEmptyArchive: true
|
||||
|
||||
// VPU enabled ff3 and rat tests
|
||||
localRunPytest('-m main -k "vpu" -vv') // xdist not working yet so no -n auto
|
||||
|
||||
// Profile the ASRC
|
||||
localRunPytest('-m main -k "profile_asrc" -vv')
|
||||
sh 'tree'
|
||||
archiveArtifacts artifacts: "gprof_results/*.png", allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
cleanup {
|
||||
xcoreCleanSandbox()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
*******************************
|
||||
XMOS PUBLIC LICENCE: Version 1
|
||||
*******************************
|
||||
|
||||
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
|
||||
|
||||
**1. Definitions**
|
||||
|
||||
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
|
||||
|
||||
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
|
||||
|
||||
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
|
||||
|
||||
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
|
||||
|
||||
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
|
||||
|
||||
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
|
||||
|
||||
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
|
||||
|
||||
|
||||
**2. Licence**
|
||||
|
||||
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
|
||||
|
||||
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
|
||||
|
||||
2.1.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
|
||||
|
||||
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
|
||||
|
||||
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
|
||||
|
||||
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
|
||||
|
||||
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
|
||||
|
||||
2.2.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
|
||||
|
||||
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
|
||||
|
||||
(b) you must copy (to the extent it doesn’t already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
|
||||
|
||||
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
|
||||
|
||||
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
|
||||
|
||||
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
|
||||
|
||||
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOS’s licence under clause 2.2 above.
|
||||
|
||||
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
|
||||
|
||||
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
|
||||
|
||||
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
|
||||
|
||||
**7. IPR and Ownership**
|
||||
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
|
||||
|
||||
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
|
||||
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
|
||||
|
||||
**8. Termination**
|
||||
|
||||
8.1 This Licence will automatically terminate immediately, without notice to you, if:
|
||||
|
||||
(a) you fail to comply with the terms of this Licence; and/or
|
||||
|
||||
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
|
||||
|
||||
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
|
||||
|
||||
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
|
||||
|
||||
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOS’s TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
|
||||
|
||||
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.
|
||||
@@ -1,76 +0,0 @@
|
||||
Sample Rate Conversion Library
|
||||
==============================
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The XMOS Sample Rate Conversion (SRC) library provides both synchronous and asynchronous audio sample rate conversion functions for use on xCORE multicore micro-controllers.
|
||||
|
||||
In systems where the rate change is exactly equal to the ratio of nominal rates, synchronous sample rate conversion (SSRC) provides efficient and high performance rate conversion. Where the input and output rates are not locked by a common clock or clocked by an exact rational frequency ratio, the Asynchronous Sample Rate Converter (ASRC) provides a way of streaming high quality audio between the two different clock domains, at the cost of higher processing resource usage. ASRC can ease interfacing in cases where there are multiple digital audio inputs or allow cost saving by removing the need for physical clock recovery using a PLL.
|
||||
|
||||
Features
|
||||
........
|
||||
|
||||
Multi-rate Hi-Fi functionality:
|
||||
|
||||
* Conversion between 44.1, 48, 88.2, 96, 176.4 and 192 KHz input and output sample rates.
|
||||
* 32 bit PCM input and output data in Q1.31 signed format.
|
||||
* Optional output dithering to 24 bit using Triangular Probability Density Function (TPDF).
|
||||
* Optimized for xCORE-200 instruction set with dual-issue and compatible with XCORE-AI.
|
||||
* Block based processing - Minimum 4 samples input per call, must be power of 2.
|
||||
* Up to 10000 ppm sample rate ratio deviation from nominal rate (ASRC only).
|
||||
* Very high quality - SNR greater than 135 dB (ASRC) or 140 dB (SSRC), with THD of less than 0.0001% (reference 1KHz).
|
||||
* Configurable number of audio channels per SRC instance.
|
||||
* Reentrant library permitting multiple instances with differing configurations and channel count.
|
||||
* No external components (PLL or memory) required.
|
||||
|
||||
Fixed factor functionality:
|
||||
|
||||
* Synchronous fixed factor of 3 downsample and oversample functions supporting either HiFi quality or reduced resource requirements for voice applications.
|
||||
* Synchronous fixed factor of 3 and 3/2 downsample and oversample functions for voice applications optimized for the XS3 Vector Processing Unit.
|
||||
|
||||
Building
|
||||
........
|
||||
|
||||
The library can be built under `cmake` or `xcommon` via `xmake` offering backwards compatibility for legacy applications.
|
||||
It is recommended to use `cmake` where the library name `lib_src` is included in the cmake files. See `Related application notes`_ for example usage.
|
||||
The library has no dependencies when building under `cmake` although does require `lib_logging` and `lib_xassert` when using `xcommon`.
|
||||
|
||||
Components
|
||||
..........
|
||||
|
||||
* Synchronous Sample Rate Converter function (ssrc)
|
||||
* Asynchronous Sample Rate Converter function (asrc)
|
||||
|
||||
* Synchronous factor of 3 downsample function (ds3)
|
||||
* Synchronous factor of 3 oversample function (os3)
|
||||
|
||||
* Synchronous factor of 3 downsample function optimized for use with voice (src_ds3_voice)
|
||||
* Synchronous factor of 3 oversample function optimised for use with voice (src_us3_voice)
|
||||
|
||||
* Synchronous factor of 3 downsample function for use with voice optimized for XS3 (ff3_96t_ds)
|
||||
* Synchronous factor of 3 oversample function for use with voice optimized for XS3 (ff3_96t_us)
|
||||
|
||||
* Synchronous factor of 3/2 downsample function for use with voice optimized for XS3 (rat_2_3_96t_ds)
|
||||
* Synchronous factor of 3/2 oversample function for use with voice optimized for XS3 (rat_3_2_96t_us)
|
||||
|
||||
There are three different component options that support fixed factor of 3 up/downsampling. To help choose which one to use follow these steps:
|
||||
|
||||
#. If HiFi quality (130 dB SNR) up/downsampling is required, use ds3 or os3.
|
||||
#. If voice quality (65 dB SNR) is required running on xCORE-200, use ds3_voice or us3_voice.
|
||||
#. If voice quality (75 dB SNR) is required running xcore-ai, use ff3_96t_ds or ff3_96t_us.
|
||||
|
||||
.. warning::
|
||||
Synchronous fixed factor of 3 and 3/2 downsample and oversample functions for voice applications optimized for the XS3 Vector Processing Unit
|
||||
currently overflow rather than saturate in cases where a full scale input causes a perturbation above full scale at the output.
|
||||
To avoid this scenario, please ensure that the input amplitude is always 3.5 dB below full scale.
|
||||
The overflow behavior of these SRC components will be replaced by saturating behavior (to match all other SRC components) in a future release.
|
||||
|
||||
|
||||
Related Application Notes
|
||||
.........................
|
||||
|
||||
An adaptive USB Audio ASRC example can be found in https://github.com/xmos/sln_voice/tree/develop/examples.
|
||||
|
||||
Simple file-based test applications may be found in this repo under `tests/xxxx_test` where xxxx is either `asrc`, `ssrc`, `ds3`, `os3`, `ds3_voice`, `os3_voice`, `vpu_ff3` or `vpu_rat`.
|
||||
These test applications may be used as basic examples to show how these components are used in a minimal application.
|
||||
@@ -1,10 +0,0 @@
|
||||
######################
|
||||
SAMPLE RATE CONVERSION
|
||||
######################
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 5
|
||||
|
||||
./doc/programming_guide/index.rst
|
||||
./doc/python/_build/rst/allPlots.rst
|
||||
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.xmos.cdt.toolchain.603026229">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.xmos.cdt.toolchain.603026229" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.xmos.cdt.core.XEBinaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.xmos.cdt.core.XdeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration buildProperties="" description="" id="com.xmos.cdt.toolchain.603026229" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.xmos.cdt.toolchain.603026229.1562368492" name="/" resourcePath="">
|
||||
<toolChain id="com.xmos.cdt.toolchain.224082132" name="com.xmos.cdt.toolchain" superClass="com.xmos.cdt.toolchain">
|
||||
<targetPlatform archList="all" binaryParser="com.xmos.cdt.core.XEBinaryParser;org.eclipse.cdt.core.GNU_ELF" id="com.xmos.cdt.core.platform.758545727" isAbstract="false" osList="linux,win32,macosx" superClass="com.xmos.cdt.core.platform"/>
|
||||
<builder arguments="-f .makefile" id="com.xmos.cdt.builder.base.1807975194" keepEnvironmentInBuildfile="false" managedBuildOn="false" superClass="com.xmos.cdt.builder.base">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="outputPath" name="bin"/>
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id="com.xmos.cdt.xc.compiler.1603773068" name="com.xmos.cdt.xc.compiler" superClass="com.xmos.cdt.xc.compiler">
|
||||
<option id="com.xmos.xc.compiler.option.include.paths.217515459" superClass="com.xmos.xc.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert/api}""/>
|
||||
</option>
|
||||
<inputType id="com.xmos.cdt.xc.compiler.input.1097491589" name="XC" superClass="com.xmos.cdt.xc.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="com.xmos.cdt.c.compiler.76882869" name="com.xmos.cdt.c.compiler" superClass="com.xmos.cdt.c.compiler">
|
||||
<option id="com.xmos.c.compiler.option.include.paths.433678025" superClass="com.xmos.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert/api}""/>
|
||||
</option>
|
||||
<inputType id="com.xmos.cdt.c.compiler.input.c.1056834722" name="C" superClass="com.xmos.cdt.c.compiler.input.c"/>
|
||||
</tool>
|
||||
<tool id="com.xmos.cdt.cxx.compiler.1841285623" name="com.xmos.cdt.cxx.compiler" superClass="com.xmos.cdt.cxx.compiler">
|
||||
<option id="com.xmos.cxx.compiler.option.include.paths.463620766" superClass="com.xmos.cxx.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_logging/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lib_xassert/api}""/>
|
||||
</option>
|
||||
<inputType id="com.xmos.cdt.cxx.compiler.input.cpp.1143236111" name="C++" superClass="com.xmos.cdt.cxx.compiler.input.cpp"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding=".build*" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="lib_src.null.1142937535" name="lib_src"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
</cproject>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>lib_src</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.xmos.cdt.core.LegacyProjectCheckerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.xmos.cdt.core.ProjectInfoSyncBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.xmos.cdt.core.ModulePathBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.xmos.cdt.core.XdeProjectNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,84 +0,0 @@
|
||||
*******************************
|
||||
XMOS PUBLIC LICENCE: Version 1
|
||||
*******************************
|
||||
|
||||
Subject to the conditions and limitations below, permission is hereby granted by XMOS LIMITED (“XMOS”), free of charge, to any person or entity obtaining a copy of the XMOS Software.
|
||||
|
||||
**1. Definitions**
|
||||
|
||||
**“Applicable Patent Rights”** means: (a) where XMOS is the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to XMOS and (ii) that cover subject matter contained in the Software, but only to the extent it is necessary to use, reproduce or distribute the Software without infringement; and (b) where you are the grantor of the rights, (i) claims of patents that are now or in future owned by or assigned to you and (ii) that cover the subject matter contained in your Derivatives, taken alone or in combination with the Software.
|
||||
|
||||
**“Compiled Code”** means any compiled, binary, machine readable or executable version of the Source Code.
|
||||
|
||||
**“Contributor”** means any person or entity that creates or contributes to the creation of Derivatives.
|
||||
|
||||
**“Derivatives”** means any addition to, deletion from and/or change to the substance, structure of the Software, any previous Derivatives, the combination of the Derivatives and the Software and/or any respective portions thereof.
|
||||
|
||||
**“Source Code”** means the human readable code that is suitable for making modifications but excluding any Compiled Code.
|
||||
|
||||
**“Software”** means the software and associated documentation files which XMOS makes available and which contain a notice identifying the software as original XMOS software and referring to the software being subject to the terms of this XMOS Public Licence.
|
||||
|
||||
This Licence refers to XMOS Software and does not relate to any XMOS hardware or devices which are protected by intellectual property rights (including patent and trade marks) which may be sold to you under a separate agreement.
|
||||
|
||||
|
||||
**2. Licence**
|
||||
|
||||
**Permitted Uses, Conditions and Restrictions.** Subject to the conditions below, XMOS grants you a worldwide, royalty free, non-exclusive licence, to the extent of any Patent Rights to do the following:
|
||||
|
||||
2.1 **Unmodified Software.** You may use, copy, display, publish, distribute and make available unmodified copies of the Software:
|
||||
|
||||
2.1.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.1.2 for commercial purposes provided the Software is at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.1.1 and 2.1.2):
|
||||
|
||||
(a) you must retain and reproduce in all copies of the Software the copyright and proprietary notices and disclaimers of XMOS as they appear in the Software, and keep intact all notices and disclaimers in the Software files that refer to this Licence; and
|
||||
|
||||
(b) you must include a copy of this Licence with every copy of the Software and documentation you publish, distribute and make available and you may not offer or impose any terms on such Software that alter or restrict this Licence or the intent of such Licence, except as permitted below (Additional Terms).
|
||||
|
||||
The licence above does not include any Compiled Code which XMOS may make available under a separate support and licence agreement.
|
||||
|
||||
2.2 **Derivatives.** You may create and modify Derivatives and use, copy, display, publish, distribute and make available Derivatives:
|
||||
|
||||
2.2.1 for personal or academic, non-commercial purposes; or
|
||||
|
||||
2.2.2 for commercial purposes, provided the Derivatives are at all times used on a device designed, licensed or developed by XMOS and, provided that in each instance (2.2.1 and 2.2.2):
|
||||
|
||||
(a) you must comply with the terms of clause 2.1 with respect to the Derivatives;
|
||||
|
||||
(b) you must copy (to the extent it doesn’t already exist) the notice below in each file of the Derivatives, and ensure all the modified files carry prominent notices stating that you have changed the files and the date of any change; and
|
||||
|
||||
(c) if you sublicence, distribute or otherwise make the Software and/or the Derivatives available for commercial purposes, you must provide that the Software and Derivatives are at all times used on a device designed, licensed or developed by XMOS.
|
||||
|
||||
Without limitation to these terms and clause 3 below, the Source Code and Compiled Code to your Derivatives may at your discretion (but without obligation) be released, copied, displayed, published, distributed and made available; and if you elect to do so, it must be under the terms of this Licence including the terms of the licence at clauses 2.2.1, 2.2.2 and clause 3 below.
|
||||
|
||||
2.3 **Distribution of Executable Versions.** If you distribute or make available Derivatives, you must include a prominent notice in the code itself as well as in all related documentation, stating that the Source Code of the Software from which the Derivatives are based is available under the terms of this Licence, with information on how and where to obtain such Source Code.
|
||||
|
||||
**3. Your Grant of Rights.** In consideration and as a condition to this Licence, you grant to any person or entity receiving or distributing any Derivatives, a non-exclusive, royalty free, perpetual, irrevocable license under your Applicable Patent Rights and all other intellectual property rights owned or controlled by you, to use, copy, display, publish, distribute and make available your Derivatives of the same scope and extent as XMOS’s licence under clause 2.2 above.
|
||||
|
||||
**4. Combined Products.** You may create a combined product by combining Software, Derivatives and other code not covered by this Licence as a single application or product. In such instance, you must comply with the requirements of this Licence for any portion of the Software and/or Derivatives.
|
||||
|
||||
**5. Additional Terms.** You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the term of this Licence (“Additional Terms”) to any legitimate recipients of the Software and/or Derivatives. The terms on which you provide such Additional Terms are on your sole responsibility and you shall indemnify, defend and hold XMOS harmless against any claims asserted against XMOS.
|
||||
|
||||
**6. New Versions.** XMOS may publish revised and/or new versions of this Licence from time to time to accommodate changes to the Licence terms, new versions, updates and bug fixes of the Software. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this Licence, you may continue to use it under the terms of that version. You may also choose to use the latest version of the Software under any subsequent version published by XMOS. Only XMOS shall have the right to modify these terms.
|
||||
|
||||
**7. IPR and Ownership**
|
||||
Any rights, including all intellectual property rights and all trademarks not expressly granted herein are reserved in full by the authors or copyright holders. Any requests for additional permissions by XMOS including any rights to use XMOS trademarks, should be made (without obligation) to XMOS at **support@xmos.com**
|
||||
|
||||
Nothing herein shall limit any rights that XMOS is otherwise entitled to under the doctrines of patent exhaustion, implied license, or legal estoppel. Neither the name of the authors, the copyright holders or any contributors may be used to endorse or promote any Derivatives from this Software without specific written permission. Any attempt to deal with the Software which does not comply with this Licence shall be void and shall automatically terminate any rights granted under this licence (including any licence of any intellectual property rights granted herein).
|
||||
Subject to the licences granted under this Licence any Contributor retains all rights, title and interest in and to any Derivatives made by Contributor subject to the underlying rights of XMOS in the Software. XMOS shall retain all rights, title and interest in the Software and any Derivatives made by XMOS (“XMOS Derivatives”). XMOS Derivatives will not automatically be subject to this Licence and XMOS shall be entitled to licence such rights on any terms (without obligation) as it sees fit.
|
||||
|
||||
**8. Termination**
|
||||
|
||||
8.1 This Licence will automatically terminate immediately, without notice to you, if:
|
||||
|
||||
(a) you fail to comply with the terms of this Licence; and/or
|
||||
|
||||
(b) you directly or indirectly commence any action for patent or intellectual property right infringement against XMOS, or any parent, group, affiliate or subsidiary of XMOS; provided XMOS did not first commence an action or patent infringement against you in that instance; and/or
|
||||
|
||||
(c) the terms of this Licence are held by any court of competent jurisdiction to be unenforceable in whole or in part.
|
||||
|
||||
**9. Critical Applications.** Unless XMOS has agreed in writing with you an agreement specifically governing use of the Goods in military, aerospace, automotive or medically related functions (collectively and individually hereinafter referred to as "Special Use"), any permitted use of the Software excludes Special Use. Notwithstanding any agreement between XMOS and you for Special Use, Special Use shall be at your own risk, and you shall fully indemnify XMOS against any damages, losses, costs and claims (direct and indirect) arising out of any Special Use.
|
||||
|
||||
**10. NO WARRANTY OR SUPPORT.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL XMOS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, WARRANTY, CIVIL TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE INCLUDING GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOT WITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE. IN SOME JURISDICTIONS PARTIES ARE UNABLE TO LIMIT LIABILTY IN THIS WAY, IF THIS APPLIES TO YOUR JURISDICTION THIS LIABILITY CLAUSE ABOVE MAY NOT APPLY. NOTWITHSTANDING THE ABOVE, IN NO EVENT SHALL XMOS’s TOTAL LIABILITY TO YOU FOR ALL DAMAGES, LOSS OR OTHERWISE EXCEED $50.
|
||||
|
||||
**11. Governing Law and Jurisdiction.** This Licence constitutes the entire agreement between the parties with respect to the subject matter hereof. The Licence shall be governed by the laws of England and the conflict of laws and UN Convention on Contracts for the International Sale of Goods, shall not apply.
|
||||
@@ -1,41 +0,0 @@
|
||||
// Copyright 2024 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#ifndef _asrc_timestamp_interpolation_h_
|
||||
#define _asrc_timestamp_interpolation_h_
|
||||
|
||||
#include "src.h"
|
||||
|
||||
#ifdef __XC__
|
||||
#define UNSAFE unsafe
|
||||
#else
|
||||
#define UNSAFE
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \addtogroup src_fifo_interp src_fifo_interp
|
||||
*
|
||||
* The public API for using Asynchronous FIFO.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function that interpolates a timestamp for a sample generated by the ASRC.
|
||||
* Given a measured timestamp for the sample going into the ASRC, the asrc control
|
||||
* structure, and the expected output frequency, this function returns a timestamp
|
||||
* for when the last sample was produced by the ASRC.
|
||||
*
|
||||
* @param timestamp Value of the reference clock taken when the last sample
|
||||
* fed into the ASRC was sampled.
|
||||
*
|
||||
* @param asrc_ctrl ASRC control block
|
||||
*
|
||||
* @param ideal_freq Expected base frequency to which the ASRC is operating;
|
||||
* eg, 48000 or 44100
|
||||
*/
|
||||
int asrc_timestamp_interpolation(int timestamp, asrc_ctrl_t * UNSAFE asrc_ctrl, int ideal_freq);
|
||||
|
||||
/**@}*/ // END: addtogroup src_fifo_interp
|
||||
|
||||
#endif
|
||||
@@ -1,224 +0,0 @@
|
||||
// Copyright 2023-2024 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#ifndef _asynchronous_fifo_h__
|
||||
#define _asynchronous_fifo_h__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <xccompat.h>
|
||||
|
||||
#define FREQUENCY_RATIO_EXPONENT (32)
|
||||
|
||||
#ifdef __XC__
|
||||
#define UNSAFE unsafe
|
||||
#else
|
||||
#define UNSAFE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \addtogroup src_fifo src_fifo
|
||||
*
|
||||
* The public API for using Asynchronous FIFO.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Data structure that holds the status of an asynchronous FIFO
|
||||
*/
|
||||
typedef struct asynchronous_fifo_t {
|
||||
// Updated on initialisation only
|
||||
int32_t channel_count; /* Number of audio channels */
|
||||
int32_t copy_mask; /* Number of audio channels */
|
||||
int32_t max_fifo_depth; /* Length of buffer[] in channel_counts */
|
||||
int32_t ideal_phase_error_ticks; /* Ideal ticks between samples */
|
||||
int32_t Ki; /* Ki PID coefficient */
|
||||
int32_t Kp; /* Kp PID coefficient */
|
||||
|
||||
// Updated on the producer side only
|
||||
int skip_ctr; /* Set to indicate initialisation runs */
|
||||
int32_t write_ptr; /* Write index in the buffer */
|
||||
int64_t last_phase_error; /* previous error, used for proportional */
|
||||
int64_t frequency_ratio; /* Current ratio of frequencies in 64.64 */
|
||||
int32_t stop_producing; /* In case of overflow, stops producer until consumer restarts and requests a reset */
|
||||
|
||||
// Updated on the consumer side only
|
||||
uint32_t read_ptr; /* Read index in the buffer */
|
||||
|
||||
// Set by producer, reset by consumer
|
||||
uint32_t reset; /* Set to 1 if consumer wants a reset */
|
||||
|
||||
// Updated from both sides
|
||||
uint32_t * UNSAFE timestamps; /* Timestamps of samples */
|
||||
int32_t buffer[0]; /* Buffer of data */
|
||||
} asynchronous_fifo_t;
|
||||
|
||||
|
||||
/**
|
||||
* Function that must be called to initialise the asynchronous FIFO.
|
||||
* The ``state`` argument should be an int64_t array of
|
||||
* ``ASYNCHRONOUS_FIFO_INT64_ELEMENTS`` elements that is cast to
|
||||
* ``asynchronous_fifo_t*``.
|
||||
*
|
||||
* That pointer should also be used for all other operations, including operations
|
||||
* both the consumer and producer sides.
|
||||
*
|
||||
* After initialising, you must initialise the PID by calling one of
|
||||
* asynchronous_fifo_init_PID_fs_codes() or
|
||||
* asynchronous_fifo_init_PID_raw()
|
||||
*
|
||||
* @param state Asynchronous FIFO to be initialised
|
||||
*
|
||||
* @param channel_count Number of audio channels
|
||||
*
|
||||
* @param max_fifo_depth Length of the FIFO, delay when stable will be max_fifo_depth/2
|
||||
*/
|
||||
void asynchronous_fifo_init(asynchronous_fifo_t * UNSAFE state,
|
||||
int channel_count,
|
||||
int max_fifo_depth);
|
||||
|
||||
/**
|
||||
* Function that that initialises the PID of a FIFO. Either this function
|
||||
* or asynchronous_fifo_init_PID_raw() should be called. This function
|
||||
* uses frequency codes as defined in the ASRC for a quick default setup,
|
||||
* the raw function allows full control
|
||||
*
|
||||
* @param state Asynchronous FIFO to be initialised
|
||||
*
|
||||
* @param fs_input Input FS ratio, used to pick appropriate Kp, and Ki.
|
||||
* Must be a number less than 6.
|
||||
*
|
||||
* @param fs_output Input FS ratio, used to pick appropriate Kp, Ki,
|
||||
* ideal phase. Must be a number less than 6.
|
||||
*/
|
||||
void asynchronous_fifo_init_PID_fs_codes(asynchronous_fifo_t * UNSAFE state,
|
||||
int fs_input,
|
||||
int fs_output);
|
||||
|
||||
/**
|
||||
* Function that that initialises the PID of a FIFO. Either this function
|
||||
* or asynchronous_fifo_init_PID_raw() should be called. This function
|
||||
* uses frequency codes as defined in the ASRC for a quick default setup,
|
||||
* the raw function allows full control.
|
||||
*
|
||||
* This function may be called at any time by the producer in order to alter the PID
|
||||
* and midpoint settings. It does not reset the error; one of the
|
||||
* asynchronous_fifo_init_reset_producer() or
|
||||
* asynchronous_fifo_init_reset_consumer() functions should be called for that.
|
||||
*
|
||||
* @param state Asynchronous FIFO to be initialised
|
||||
*
|
||||
* @param Kp Proportional constant for the FIFO.
|
||||
* This gets multiplied by the differential
|
||||
* error measured in ticks (typically -2..2)
|
||||
* and added to the ratio_error. A typical
|
||||
* value is 30,000,000 - 60,000,000.
|
||||
*
|
||||
* @param Ki Integral constant for the FIFO.
|
||||
* This gets multiplied by the phase error
|
||||
* measured in ticks (typically -20,000 - 20,000)
|
||||
* and added to the ratio_error.
|
||||
* A typical value is 200 - 300.
|
||||
*
|
||||
* @param ticks_between_samples The number of ticks between samples is used to
|
||||
* estimate the expected phase error halfway down
|
||||
* the FIFO.
|
||||
*/
|
||||
void asynchronous_fifo_init_PID_raw(asynchronous_fifo_t * UNSAFE state,
|
||||
int Kp,
|
||||
int Ki,
|
||||
int ticks_between_samples);
|
||||
|
||||
/**
|
||||
* Function that that resets the FIFO from the producer side. Either this function should
|
||||
* be called on the producing side, or ``asynchronous_fifo_reset_consumer``
|
||||
* should be called on the consumer side. In both cases the whole FIFO will be reset back
|
||||
*
|
||||
* @param state Asynchronous FIFO to be initialised
|
||||
*/
|
||||
void asynchronous_fifo_reset_producer(asynchronous_fifo_t * UNSAFE state);
|
||||
|
||||
/**
|
||||
* Function that that resets the FIFO from the consumer side. Either this function should
|
||||
* be called on the consuming side, or asynchronous_fifo_reset_producer()
|
||||
* should be called on the producer side. In both cases the whole FIFO will be reset back
|
||||
*
|
||||
* @param state Asynchronous FIFO to be initialised
|
||||
*/
|
||||
void asynchronous_fifo_reset_consumer(asynchronous_fifo_t * UNSAFE state);
|
||||
|
||||
/**
|
||||
* Function that must be called to deinitalise the asynchronous FIFO
|
||||
*
|
||||
* @param state ASRC structure to be de-initialised
|
||||
*/
|
||||
void asynchronous_fifo_exit(asynchronous_fifo_t * UNSAFE state);
|
||||
|
||||
/**
|
||||
* Function that provides the next samples to the asynchronous FIFO.
|
||||
*
|
||||
* This function and asynchronous_fifo_consumer_get() function both need a timestamp,
|
||||
* which is the time that the last sample was input (this function) or
|
||||
* output (asynchronous_fifo_consumer_get()). The asynchronous FIFO will hand the
|
||||
* samples across from producer to consumer through an elastic queue, and run
|
||||
* a PID algorithm to calculate the best way to equalise the input clock relative
|
||||
* to the output clock. Therefore, the timestamps
|
||||
* have to be measured on either the same clock or two very similar clocks.
|
||||
* It is probably fine to use the reference clocks on two tiles, provided
|
||||
* the tiles came out of reset at more or less the same time. Using the
|
||||
* clocks from two different chips would require the two chips to share an
|
||||
* oscillator, and for them to come out of reset simultaneously.
|
||||
*
|
||||
* @param state ASRC structure to push the sample into
|
||||
*
|
||||
* @param samples The sample values.
|
||||
*
|
||||
* @param n The number of samples
|
||||
*
|
||||
* @param timestamp The number of ticks when this sample was input.
|
||||
*
|
||||
* @param xscope_used Set to 1 if the PID values should be output over
|
||||
* xscope. Used for debugging. This parameter is subject to be removed in future revisions.
|
||||
*
|
||||
* @returns The current estimate of the mismatch of input and output frequencies.
|
||||
* This is represented as a 32-bit signed number. Zero means no mismatch,
|
||||
* a value less than zero means that the producer is faster than the consumer,
|
||||
* a value greater than zero means that the producer is slower than the consumer.
|
||||
* The value should be scaled by 2**-32. That is, the current best
|
||||
* approximation for consumer_speed/producer_speed is 1 + (return_value * 2**-32)
|
||||
*
|
||||
* The output is filtered and should be applied directly as a correction factor
|
||||
* eg, multiplied into an ASRC ratio, or multiplied into a PLL timing.
|
||||
*/
|
||||
int32_t asynchronous_fifo_producer_put(asynchronous_fifo_t * UNSAFE state,
|
||||
int32_t * UNSAFE samples,
|
||||
int n,
|
||||
int32_t timestamp,
|
||||
int xscope_used);
|
||||
|
||||
|
||||
/**
|
||||
* Function that gets an output sample from the asynchronous FIFO
|
||||
*
|
||||
* @param state ASRC structure to read a sample out off.
|
||||
*
|
||||
* @param samples The array where the frame with output
|
||||
* samples will be stored.
|
||||
*
|
||||
* @param timestamp A timestamp taken at the time that the
|
||||
* last sample was output. See
|
||||
* ``asynchronous_fifo_produce`` for requirements.
|
||||
*/
|
||||
void asynchronous_fifo_consumer_get(asynchronous_fifo_t * UNSAFE state,
|
||||
int32_t * UNSAFE samples,
|
||||
int32_t timestamp);
|
||||
|
||||
|
||||
/**
|
||||
* macro that calculates the number of int64_t to be allocated for the fifo
|
||||
* for a FIFO of N elements and C channels
|
||||
*/
|
||||
#define ASYNCHRONOUS_FIFO_INT64_ELEMENTS(N, C) (sizeof(asynchronous_fifo_t)/sizeof(int64_t) + (N*(C+1))/2+1)
|
||||
#endif
|
||||
|
||||
/**@}*/ // END: addtogroup src_fifo
|
||||
@@ -1,243 +0,0 @@
|
||||
// Copyright 2016-2023 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#ifndef _SRC_H_
|
||||
#define _SRC_H_
|
||||
#include "src_mrhf_ssrc.h"
|
||||
#include "src_mrhf_asrc.h"
|
||||
#include "src_ff3_ds3.h"
|
||||
#include "src_ff3_os3.h"
|
||||
#include "src_ff3v_fir.h"
|
||||
#if (defined(__XS3A__)) // Only available for XS3 with VPU
|
||||
#include "src_poly.h"
|
||||
#endif // __XS3A__
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__cplusplus) || defined(__XC__)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** List of sample rate codes allowing the core SRC algorithms to use an index value */
|
||||
typedef enum fs_code_t {
|
||||
FS_CODE_44 = 0,
|
||||
FS_CODE_48 = 1,
|
||||
FS_CODE_88 = 2,
|
||||
FS_CODE_96 = 3,
|
||||
FS_CODE_176 = 4,
|
||||
FS_CODE_192 = 5
|
||||
} fs_code_t;
|
||||
|
||||
/** Flag to switch dither processing to 24b (from 32b) on or off */
|
||||
typedef enum dither_flag_t {
|
||||
OFF = 0,
|
||||
ON = 1
|
||||
} dither_flag_t;
|
||||
|
||||
/**
|
||||
* \addtogroup src_ssrc src_ssrc
|
||||
*
|
||||
* The public API for using SSRC.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** initializes synchronous sample rate conversion instance.
|
||||
* \param sr_in Nominal sample rate code of input stream
|
||||
* \param sr_out Nominal sample rate code of output stream
|
||||
* \param ssrc_ctrl Reference to array of SSRC control stuctures
|
||||
* \param n_channels_per_instance Number of channels handled by this instance of SSRC
|
||||
* \param n_in_samples Number of input samples per SSRC call
|
||||
* \param dither_on_off Dither to 24b on/off
|
||||
*/
|
||||
void ssrc_init(const fs_code_t sr_in, const fs_code_t sr_out, ssrc_ctrl_t ssrc_ctrl[],
|
||||
const unsigned n_channels_per_instance, const unsigned n_in_samples,
|
||||
const dither_flag_t dither_on_off);
|
||||
|
||||
/** Perform synchronous sample rate conversion processing on block of input samples using previously initialized settings.
|
||||
*
|
||||
* \param in_buff Reference to input sample buffer array
|
||||
* \param out_buff Reference to output sample buffer array
|
||||
* \param ssrc_ctrl Reference to array of SSRC control stuctures
|
||||
* \returns The number of output samples produced by the SRC operation
|
||||
*/
|
||||
unsigned ssrc_process(int in_buff[], int out_buff[], ssrc_ctrl_t ssrc_ctrl[]);
|
||||
|
||||
/**@}*/ // END: addtogroup src_ssrc
|
||||
|
||||
/**
|
||||
* \addtogroup src_asrc src_asrc
|
||||
*
|
||||
* The public API for using ASRC.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** initializes asynchronous sample rate conversion instance.
|
||||
*
|
||||
* \param sr_in Nominal sample rate code of input stream
|
||||
* \param sr_out Nominal sample rate code of output stream
|
||||
* \param asrc_ctrl Reference to array of ASRC control structures
|
||||
* \param n_channels_per_instance Number of channels handled by this instance of SSRC
|
||||
* \param n_in_samples Number of input samples per SSRC call
|
||||
* \param dither_on_off Dither to 24b on/off
|
||||
* \returns The nominal sample rate ratio of in to out in Q4.60 format
|
||||
*/
|
||||
uint64_t asrc_init(const fs_code_t sr_in, const fs_code_t sr_out,
|
||||
asrc_ctrl_t asrc_ctrl[], const unsigned n_channels_per_instance,
|
||||
const unsigned n_in_samples, const dither_flag_t dither_on_off);
|
||||
|
||||
/** Perform asynchronous sample rate conversion processing on block of input samples using previously initialized settings.
|
||||
*
|
||||
* \param in_buff Reference to input sample buffer array
|
||||
* \param out_buff Reference to output sample buffer array
|
||||
* \param fs_ratio Fixed point ratio of in/out sample rates in Q4.60 format
|
||||
* \param asrc_ctrl Reference to array of ASRC control structures
|
||||
* \returns The number of output samples produced by the SRC operation.
|
||||
*/
|
||||
unsigned asrc_process(int in_buff[], int out_buff[], uint64_t fs_ratio,
|
||||
asrc_ctrl_t asrc_ctrl[]);
|
||||
|
||||
/**@}*/ // END: addtogroup src_asrc
|
||||
|
||||
|
||||
// To avoid C type definitions when including this file from assembler
|
||||
#ifndef INCLUDE_FROM_ASM
|
||||
|
||||
/** Fixed factor of 3 return codes
|
||||
*
|
||||
* This type describes the possible error status states from calls to the DS3
|
||||
* and OS3 API.
|
||||
*/
|
||||
typedef enum src_ff3_return_code_t
|
||||
{
|
||||
SRC_FF3_NO_ERROR = 0,
|
||||
SRC_FF3_ERROR = 1
|
||||
} src_ff3_return_code_t;
|
||||
|
||||
/** Downsample by 3 control structure */
|
||||
typedef struct src_ds3_ctrl_t
|
||||
{
|
||||
int* in_data; //!< Pointer to input data (3 samples)
|
||||
int* out_data; //!< Pointer to output data (1 sample)
|
||||
int* delay_base; //!< Pointer to delay line base
|
||||
unsigned int delay_len; //!< Total length of delay line
|
||||
int* delay_pos; //!< Pointer to current position in delay line
|
||||
int* delay_wrap; //!< Delay buffer wrap around address (for circular buffer simulation)
|
||||
unsigned int delay_offset; //!< Delay line offset for second write (for circular buffer simulation)
|
||||
unsigned int inner_loops; //!< Number of inner loop iterations
|
||||
unsigned int num_coeffs; //!< Number of coefficients
|
||||
int* coeffs; //!< Pointer to coefficients
|
||||
} src_ds3_ctrl_t;
|
||||
|
||||
/** This function initializes the decimate by 3 function for a given instance
|
||||
*
|
||||
* \param src_ds3_ctrl DS3 control structure
|
||||
* \returns SRC_FF3_NO_ERROR on success, SRC_FF3_ERROR on failure
|
||||
*/
|
||||
src_ff3_return_code_t src_ds3_init(src_ds3_ctrl_t* src_ds3_ctrl);
|
||||
|
||||
/** This function clears the decimate by 3 delay line for a given instance
|
||||
*
|
||||
* \param src_ds3_ctrl DS3 control structure
|
||||
* \returns SRC_FF3_NO_ERROR on success, SRC_FF3_ERROR on failure
|
||||
*/
|
||||
src_ff3_return_code_t src_ds3_sync(src_ds3_ctrl_t* src_ds3_ctrl);
|
||||
|
||||
/** This function performs the decimation on three input samples and outputs one sample.
|
||||
* The input and output buffers are pointed to by members of the src_ds3_ctrl structure
|
||||
*
|
||||
* \param src_ds3_ctrl DS3 control structure
|
||||
* \returns SRC_FF3_NO_ERROR on success, SRC_FF3_ERROR on failure
|
||||
*/
|
||||
src_ff3_return_code_t src_ds3_proc(src_ds3_ctrl_t* src_ds3_ctrl);
|
||||
|
||||
/** Oversample by 3 control structure */
|
||||
typedef struct src_os3_ctrl_t
|
||||
{
|
||||
int in_data; //!< Input data (to be updated every 3 output samples, i.e. when iPhase == 0)
|
||||
int out_data; //!< Output data (1 sample)
|
||||
int phase; //!< Current output phase (when reaching '0', a new input sample is required)
|
||||
int* delay_base; //!< Pointer to delay line base
|
||||
unsigned int delay_len; //!< Total length of delay line
|
||||
int* delay_pos; //!< Pointer to current position in delay line
|
||||
int* delay_wrap; //!< Delay buffer wrap around address (for circular buffer simulation)
|
||||
unsigned int delay_offset; //!< Delay line offset for second write (for circular buffer simulation)
|
||||
unsigned int inner_loops; //!< Number of inner loop iterations
|
||||
unsigned int num_coeffs; //!< Number of coefficients
|
||||
int* coeffs; //!< Pointer to coefficients
|
||||
} src_os3_ctrl_t;
|
||||
|
||||
/** This function initializes the oversample by 3 function for a given instance
|
||||
*
|
||||
* \param src_os3_ctrl OS3 control structure
|
||||
* \returns SRC_FF3_NO_ERROR on success, SRC_FF3_ERROR on failure
|
||||
*/
|
||||
src_ff3_return_code_t src_os3_init(src_os3_ctrl_t* src_os3_ctrl);
|
||||
|
||||
/** This function clears the oversample by 3 delay line for a given instance
|
||||
*
|
||||
* \param src_os3_ctrl OS3 control structure
|
||||
* \returns SRC_FF3_NO_ERROR on success, SRC_FF3_ERROR on failure
|
||||
*/
|
||||
src_ff3_return_code_t src_os3_sync(src_os3_ctrl_t* src_os3_ctrl);
|
||||
|
||||
/** This function pushes a single input sample into the filter.
|
||||
* It should be called three times for each FIROS3_proc call
|
||||
*
|
||||
* \param src_os3_ctrl OS3 control structure
|
||||
* \returns SRC_FF3_NO_ERROR on success, SRC_FF3_ERROR on failure
|
||||
*/
|
||||
src_ff3_return_code_t src_os3_input(src_os3_ctrl_t* src_os3_ctrl);
|
||||
|
||||
/** This function performs the oversampling by 3 and outputs one sample.
|
||||
* The input and output buffers are pointed to by members of the src_os3_ctrl structure
|
||||
*
|
||||
* \param src_os3_ctrl OS3 control structure
|
||||
* \returns SRC_FF3_NO_ERROR on success, SRC_FF3_ERROR on failure
|
||||
*/
|
||||
src_ff3_return_code_t src_os3_proc(src_os3_ctrl_t* src_os3_ctrl);
|
||||
|
||||
#endif // INCLUDE_FROM_ASM
|
||||
|
||||
#if defined(__cplusplus) || defined(__XC__)
|
||||
}
|
||||
#endif
|
||||
|
||||
/** This function performs the first two iterations of the downsampling process
|
||||
*
|
||||
* \param sum Partially accumulated value returned during previous cycle
|
||||
* \param data Data delay line
|
||||
* \param coefs FIR filter coefficients
|
||||
* \param sample The newest sample
|
||||
* \returns Partially accumulated value, passed as ``sum`` parameter next cycle
|
||||
*/
|
||||
int64_t src_ds3_voice_add_sample(int64_t sum, int32_t data[],
|
||||
const int32_t coefs[], int32_t sample);
|
||||
|
||||
/** This function performs the final iteration of the downsampling process
|
||||
*
|
||||
* \param sum Partially accumulated value returned during previous cycle
|
||||
* \param data Data delay line
|
||||
* \param coefs FIR filter coefficients
|
||||
* \param sample The newest sample
|
||||
* \returns The decimated sample
|
||||
*/
|
||||
int64_t src_ds3_voice_add_final_sample(int64_t sum, int32_t data[],
|
||||
const int32_t coefs[], int32_t sample);
|
||||
|
||||
/** This function performs the initial iteration of the upsampling process
|
||||
*
|
||||
* \param data Data delay line
|
||||
* \param coefs FIR filter coefficients
|
||||
* \param sample The newest sample
|
||||
* \returns A decimated sample
|
||||
*/
|
||||
int32_t src_us3_voice_input_sample(int32_t data[], const int32_t coefs[],
|
||||
int32_t sample);
|
||||
|
||||
/** This function performs the final two iterations of the upsampling process
|
||||
*
|
||||
* \param data Data delay line
|
||||
* \param coefs FIR filter coefficients
|
||||
* \returns A decimated sample
|
||||
*/
|
||||
int32_t src_us3_voice_get_next_sample(int32_t data[], const int32_t coefs[]);
|
||||
|
||||
#endif // _SRC_H_
|
||||
@@ -1,21 +0,0 @@
|
||||
set(LIB_NAME lib_src)
|
||||
set(LIB_VERSION 2.5.0)
|
||||
|
||||
set(LIB_DEPENDENT_MODULES "lib_logging(3.2.0)")
|
||||
|
||||
set(LIB_COMPILER_FLAGS -Wno-missing-braces -O3)
|
||||
|
||||
set(LIB_OPTIONAL_HEADERS src_conf.h)
|
||||
|
||||
set(LIB_INCLUDES api
|
||||
src/fixed_factor_of_3
|
||||
src/fixed_factor_of_3/ds3
|
||||
src/fixed_factor_of_3/os3
|
||||
src/fixed_factor_of_3_voice
|
||||
src/multirate_hifi
|
||||
src/multirate_hifi/asrc
|
||||
src/multirate_hifi/ssrc
|
||||
src/fixed_factor_vpu_voice)
|
||||
|
||||
XMOS_REGISTER_MODULE()
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
VERSION = 2.5.0
|
||||
|
||||
DEPENDENT_MODULES = lib_logging(>=3.2.0)
|
||||
|
||||
MODULE_XCC_FLAGS = $(XCC_FLAGS) \
|
||||
-Wno-missing-braces \
|
||||
-O3
|
||||
|
||||
OPTIONAL_HEADERS += src_conf.h
|
||||
|
||||
EXPORT_INCLUDE_DIRS = api \
|
||||
src/fixed_factor_of_3 \
|
||||
src/fixed_factor_of_3/ds3 \
|
||||
src/fixed_factor_of_3/os3 \
|
||||
src/fixed_factor_of_3_voice \
|
||||
src/multirate_hifi \
|
||||
src/multirate_hifi/asrc \
|
||||
src/multirate_hifi/ssrc \
|
||||
src/fixed_factor_vpu_voice \
|
||||
src/asrc_task
|
||||
|
||||
INCLUDE_DIRS = $(EXPORT_INCLUDE_DIRS)
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright 2024 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#include <stdint.h>
|
||||
#include "asrc_timestamp_interpolation.h"
|
||||
|
||||
// TODO: replace TODO with BASE and 8/24 with division with MAX
|
||||
|
||||
// TODO: check with 88200 and other input frequencies
|
||||
|
||||
int asrc_timestamp_interpolation(int timestamp, asrc_ctrl_t *asrc_ctrl, int interpolation_ticks) {
|
||||
// iTimeInt is an 8-bit number; fract a 32 bit number, with the two we make a 16-bit
|
||||
// fraction that we multiply with and then shift down by 16 bits.
|
||||
uint32_t fraction_away_from_final_ts = (((asrc_ctrl->iTimeInt - 128) << 8) |
|
||||
((asrc_ctrl->uiTimeFract >> 24) & 0xff));
|
||||
int32_t left_over_ticks = (fraction_away_from_final_ts * interpolation_ticks) >> 16;
|
||||
return timestamp + left_over_ticks;
|
||||
}
|
||||
@@ -1,217 +0,0 @@
|
||||
// Copyright 2023-2024 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#include <string.h>
|
||||
#include "asynchronous_fifo.h"
|
||||
|
||||
#include <xcore/chanend.h>
|
||||
#include <platform.h>
|
||||
#include <xs1.h>
|
||||
#include <print.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <xscope.h>
|
||||
#include "src.h"
|
||||
|
||||
|
||||
// TODO: Make fifo offset from N/2 a very small component in PID,
|
||||
|
||||
/**
|
||||
* Function that resets the producing side of the ASRC; called on initialisation, and
|
||||
* and called during reset by the producer after the consumer is known to have thrown
|
||||
* in the towel
|
||||
*/
|
||||
static void asynchronous_fifo_init_producing_side(asynchronous_fifo_t *state) {
|
||||
state->skip_ctr = state->max_fifo_depth / 2 + 2;
|
||||
state->write_ptr = (state->read_ptr + state->max_fifo_depth/2) % state->max_fifo_depth;
|
||||
state->last_phase_error = 0;
|
||||
state->frequency_ratio = 0; // Assume perfect match
|
||||
state->stop_producing = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that resets the consuming side of the ASRC; called on initialisation, and
|
||||
* and called during reset by the consumer before it notifies the producer that a reset
|
||||
* is needed.
|
||||
*/
|
||||
static void asynchronous_fifo_reset_consumer_flags(asynchronous_fifo_t *state) {
|
||||
state->reset = 0; // This has to be the last one
|
||||
}
|
||||
|
||||
#define K_SHIFT 16
|
||||
|
||||
static int ticks_between_samples_1D[6] = {
|
||||
2268,2083,1134,1042, 567, 521
|
||||
};
|
||||
|
||||
static int Ki_2D[6][6] = {
|
||||
{ 422, 422, 422, 422, 422, 422 },
|
||||
{ 422, 422, 422, 422, 422, 422 },
|
||||
{ 211, 211, 211, 211, 211, 211 },
|
||||
{ 211, 211, 211, 211, 211, 211 },
|
||||
{ 105, 105, 105, 105, 105, 105 },
|
||||
{ 105, 105, 105, 105, 105, 105 }
|
||||
};
|
||||
|
||||
static int Kp_2D[6][6] = {
|
||||
{ 28147498, 28147498, 56294996, 56294996, 112589992, 112589992 },
|
||||
{ 28147498, 28147498, 56294996, 56294996, 112589992, 112589992 },
|
||||
{ 14073749, 14073749, 28147498, 28147498, 56294996, 56294996 },
|
||||
{ 14073749, 14073749, 28147498, 28147498, 56294996, 56294996 },
|
||||
{ 7036874, 7036874, 14073749, 14073749, 28147498, 28147498 },
|
||||
{ 7036874, 7036874, 14073749, 14073749, 28147498, 28147498 }
|
||||
};
|
||||
|
||||
void asynchronous_fifo_init_PID_fs_codes(asynchronous_fifo_t *state,
|
||||
int fs_input, int fs_output) {
|
||||
int max_fifo_depth = state->max_fifo_depth;
|
||||
state->Kp = Kp_2D[fs_input][fs_output];
|
||||
state->Ki = Ki_2D[fs_input][fs_output];
|
||||
state->ideal_phase_error_ticks = ticks_between_samples_1D[fs_output] * (max_fifo_depth/2 + 1);
|
||||
}
|
||||
|
||||
void asynchronous_fifo_init_PID_raw(asynchronous_fifo_t *state,
|
||||
int Kp, int Ki, int ticks_between_samples) {
|
||||
int max_fifo_depth = state->max_fifo_depth;
|
||||
state->Kp = Kp;
|
||||
state->Ki = Ki;
|
||||
state->ideal_phase_error_ticks = ticks_between_samples * (max_fifo_depth/2 + 1);
|
||||
}
|
||||
|
||||
void asynchronous_fifo_init(asynchronous_fifo_t *state, int channel_count,
|
||||
int max_fifo_depth) {
|
||||
state->max_fifo_depth = max_fifo_depth;
|
||||
state->timestamps = (uint32_t *)state->buffer + max_fifo_depth * channel_count;
|
||||
state->channel_count = channel_count;
|
||||
state->copy_mask = (1 << (4*channel_count)) - 1;
|
||||
|
||||
// First initialise shared variables, or those that shouldn't reset on a RESET.
|
||||
state->read_ptr = 0;
|
||||
// Now clear the buffer.
|
||||
memset(state->buffer, 0, channel_count * max_fifo_depth * sizeof(int));
|
||||
// Finally initialise those parts that are reset on a RESET
|
||||
asynchronous_fifo_init_producing_side(state); // uses read_ptr
|
||||
asynchronous_fifo_reset_consumer_flags(state);
|
||||
}
|
||||
|
||||
void asynchronous_fifo_exit(asynchronous_fifo_t *state) {
|
||||
}
|
||||
|
||||
int async_resets = 0;
|
||||
|
||||
void asynchronous_fifo_reset_producer(asynchronous_fifo_t *state) {
|
||||
state->stop_producing = 1;
|
||||
}
|
||||
|
||||
void asynchronous_fifo_reset_consumer(asynchronous_fifo_t *state) {
|
||||
state->reset = 1;
|
||||
}
|
||||
|
||||
int32_t asynchronous_fifo_producer_put(asynchronous_fifo_t *state, int32_t *samples,
|
||||
int n,
|
||||
int32_t timestamp,
|
||||
int xscope_used) {
|
||||
int read_ptr = state->read_ptr;
|
||||
int write_ptr = state->write_ptr;
|
||||
int max_fifo_depth = state->max_fifo_depth;
|
||||
int channel_count = state->channel_count;
|
||||
int copy_mask = state->copy_mask;
|
||||
int len = (write_ptr - read_ptr + max_fifo_depth) % max_fifo_depth;
|
||||
if (state->reset) {
|
||||
async_resets++;
|
||||
asynchronous_fifo_init_producing_side(state); // uses read_ptr
|
||||
asynchronous_fifo_reset_consumer_flags(state); // Last step - clears reset
|
||||
} else if (len >= max_fifo_depth - 2 - n) {
|
||||
state->stop_producing = 1;
|
||||
} else if (!state->stop_producing && n) {
|
||||
for(int j = 0; j < n; j++) {
|
||||
|
||||
#ifdef __XS2A__
|
||||
memcpy(state->buffer + write_ptr * channel_count, samples, channel_count * sizeof(int));
|
||||
(void)copy_mask; // Remove unused var warning
|
||||
#else
|
||||
register int32_t *ptr asm("r11") = samples;
|
||||
asm("vldr %0[0]" :: "r" (ptr));
|
||||
asm("vstrpv %0[0], %1" :: "r" (state->buffer + write_ptr * channel_count), "r" (copy_mask));
|
||||
#endif
|
||||
samples += channel_count;
|
||||
write_ptr = (write_ptr + 1);
|
||||
if (write_ptr >= max_fifo_depth) {
|
||||
write_ptr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Difference between timestamp recorded by consumer and current timestamp */
|
||||
state->write_ptr = write_ptr;
|
||||
int32_t phase_error = state->timestamps[write_ptr] - timestamp;
|
||||
|
||||
/* Ideal phase error is the middle of the fifo measured in ticks */
|
||||
phase_error += state->ideal_phase_error_ticks;
|
||||
|
||||
/* Don't try and use timestamps that haven't been recorded yet! */
|
||||
if (state->skip_ctr != 0) {
|
||||
state->skip_ctr--;
|
||||
} else {
|
||||
// Now that we have a phase error, calculate the proportional error
|
||||
// and use that and the integral error to correct the ASRC factor
|
||||
int32_t diff_error = phase_error - state->last_phase_error;
|
||||
|
||||
state->frequency_ratio +=
|
||||
(diff_error * (int64_t) (state->Kp / n)) + // TODO: make this lookup table
|
||||
(phase_error * (int64_t) state->Ki);
|
||||
if (xscope_used) {
|
||||
#if defined(ASYNC_FIFO_XSCOPE_INSTRUMENTATION)
|
||||
xscope_int(1, phase_error);
|
||||
xscope_int(2, diff_error);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
state->last_phase_error = phase_error;
|
||||
}
|
||||
if (xscope_used) {
|
||||
#if defined(ASYNC_FIFO_XSCOPE_INSTRUMENTATION)
|
||||
xscope_int(3, len);
|
||||
xscope_int(4, state->frequency_ratio >> K_SHIFT);
|
||||
#endif
|
||||
}
|
||||
return (state->frequency_ratio + (1<<(K_SHIFT-1))) >> K_SHIFT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that implements the consumer interface. Control communication
|
||||
* happens through two variables: reset and sample_data_valid. These shall
|
||||
* only be set as the last action, as they signify to the production side
|
||||
* that the datastructure can now be read on that side.
|
||||
*
|
||||
* Note that the samples are filled in regardless of whether the FIFO is
|
||||
* operating or not; the consumer will repeatedly get the same sample if
|
||||
* the producer fails. The producer side is reset exactly once on reset.
|
||||
*/
|
||||
void asynchronous_fifo_consumer_get(asynchronous_fifo_t *state, int32_t *samples, int32_t timestamp) {
|
||||
int read_ptr = state->read_ptr;
|
||||
int write_ptr = state->write_ptr;
|
||||
int max_fifo_depth = state->max_fifo_depth;
|
||||
int channel_count = state->channel_count;
|
||||
int copy_mask = state->copy_mask;
|
||||
int len = (write_ptr - read_ptr + max_fifo_depth) % max_fifo_depth;
|
||||
#ifdef __XS2A__
|
||||
memcpy(samples, state->buffer + read_ptr * channel_count, channel_count * sizeof(int));
|
||||
(void)copy_mask; // Remove unused var warning
|
||||
#else
|
||||
register int32_t *ptr asm("r11") = state->buffer + read_ptr * channel_count;
|
||||
asm("vldr %0[0]" :: "r" (ptr));
|
||||
asm("vstrpv %0[0], %1" :: "r" (samples), "r" (copy_mask));
|
||||
#endif
|
||||
if (state->reset) {
|
||||
return;
|
||||
}
|
||||
if (len > 2) {
|
||||
// TODO: use IF not %
|
||||
read_ptr = (read_ptr + 1) % state->max_fifo_depth;
|
||||
state->read_ptr = read_ptr;
|
||||
state->timestamps[read_ptr] = timestamp;
|
||||
} else {
|
||||
state->reset = 1; // The rest must happen in the other thread
|
||||
}
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
5169,
|
||||
30344,
|
||||
92411,
|
||||
193562,
|
||||
296359,
|
||||
325691,
|
||||
212464,
|
||||
-32886,
|
||||
-281088,
|
||||
-341418,
|
||||
-112035,
|
||||
285533,
|
||||
533339,
|
||||
349745,
|
||||
-224229,
|
||||
-754969,
|
||||
-713889,
|
||||
29781,
|
||||
954818,
|
||||
1207943,
|
||||
354407,
|
||||
-1069372,
|
||||
-1818145,
|
||||
-983285,
|
||||
1015273,
|
||||
2503639,
|
||||
1899873,
|
||||
-695136,
|
||||
-3195220,
|
||||
-3129965,
|
||||
335,
|
||||
3791335,
|
||||
4673522,
|
||||
1182741,
|
||||
-4156430,
|
||||
-6496184,
|
||||
-2964398,
|
||||
4122422,
|
||||
8523843,
|
||||
5445729,
|
||||
-3488536,
|
||||
-10636309,
|
||||
-8712433,
|
||||
2021617,
|
||||
12663339,
|
||||
12833767,
|
||||
549205,
|
||||
-14379818,
|
||||
-17869463,
|
||||
-4551004,
|
||||
15495107,
|
||||
23889760,
|
||||
10412643,
|
||||
-15628264,
|
||||
-31023908,
|
||||
-18775924,
|
||||
14241822,
|
||||
39569514,
|
||||
30769234,
|
||||
-10463371,
|
||||
-50268906,
|
||||
-48765805,
|
||||
2543209,
|
||||
65155547,
|
||||
78974912,
|
||||
14229267,
|
||||
-91131385,
|
||||
-144396240,
|
||||
-60382423,
|
||||
169204108,
|
||||
453172545,
|
||||
648273655,
|
||||
648273655,
|
||||
453172545,
|
||||
169204108,
|
||||
-60382423,
|
||||
-144396240,
|
||||
-91131385,
|
||||
14229267,
|
||||
78974912,
|
||||
65155547,
|
||||
2543209,
|
||||
-48765805,
|
||||
-50268906,
|
||||
-10463371,
|
||||
30769234,
|
||||
39569514,
|
||||
14241822,
|
||||
-18775924,
|
||||
-31023908,
|
||||
-15628264,
|
||||
10412643,
|
||||
23889760,
|
||||
15495107,
|
||||
-4551004,
|
||||
-17869463,
|
||||
-14379818,
|
||||
549205,
|
||||
12833767,
|
||||
12663339,
|
||||
2021617,
|
||||
-8712433,
|
||||
-10636309,
|
||||
-3488536,
|
||||
5445729,
|
||||
8523843,
|
||||
4122422,
|
||||
-2964398,
|
||||
-6496184,
|
||||
-4156430,
|
||||
1182741,
|
||||
4673522,
|
||||
3791335,
|
||||
335,
|
||||
-3129965,
|
||||
-3195220,
|
||||
-695136,
|
||||
1899873,
|
||||
2503639,
|
||||
1015273,
|
||||
-983285,
|
||||
-1818145,
|
||||
-1069372,
|
||||
354407,
|
||||
1207943,
|
||||
954818,
|
||||
29781,
|
||||
-713889,
|
||||
-754969,
|
||||
-224229,
|
||||
349745,
|
||||
533339,
|
||||
285533,
|
||||
-112035,
|
||||
-341418,
|
||||
-281088,
|
||||
-32886,
|
||||
212464,
|
||||
325691,
|
||||
296359,
|
||||
193562,
|
||||
92411,
|
||||
30344,
|
||||
5169
|
||||
|
||||
Binary file not shown.
@@ -1,145 +0,0 @@
|
||||
-2395,
|
||||
-5393,
|
||||
-335,
|
||||
30919,
|
||||
106000,
|
||||
220880,
|
||||
330830,
|
||||
356898,
|
||||
231633,
|
||||
-34118,
|
||||
-315114,
|
||||
-418758,
|
||||
-215874,
|
||||
223879,
|
||||
613143,
|
||||
611221,
|
||||
97230,
|
||||
-651552,
|
||||
-1069755,
|
||||
-703606,
|
||||
360079,
|
||||
1408013,
|
||||
1539614,
|
||||
397969,
|
||||
-1370661,
|
||||
-2411112,
|
||||
-1652446,
|
||||
690618,
|
||||
2986814,
|
||||
3260739,
|
||||
821767,
|
||||
-2843947,
|
||||
-4868873,
|
||||
-3175486,
|
||||
1562920,
|
||||
5923006,
|
||||
6109316,
|
||||
1141587,
|
||||
-5743394,
|
||||
-9044604,
|
||||
-5277235,
|
||||
3660474,
|
||||
11106677,
|
||||
10454985,
|
||||
809636,
|
||||
-11221065,
|
||||
-15824164,
|
||||
-7781762,
|
||||
8274286,
|
||||
20081265,
|
||||
16848614,
|
||||
-1306239,
|
||||
-21547610,
|
||||
-26990688,
|
||||
-10324408,
|
||||
18264917,
|
||||
36552074,
|
||||
26888413,
|
||||
-7970879,
|
||||
-43212641,
|
||||
-48496417,
|
||||
-12420624,
|
||||
43678793,
|
||||
75992810,
|
||||
49227770,
|
||||
-31884005,
|
||||
-114708797,
|
||||
-124890019,
|
||||
-13609494,
|
||||
203956546,
|
||||
446378886,
|
||||
605431990,
|
||||
605431990,
|
||||
446378886,
|
||||
203956546,
|
||||
-13609494,
|
||||
-124890019,
|
||||
-114708797,
|
||||
-31884005,
|
||||
49227770,
|
||||
75992810,
|
||||
43678793,
|
||||
-12420624,
|
||||
-48496417,
|
||||
-43212641,
|
||||
-7970879,
|
||||
26888413,
|
||||
36552074,
|
||||
18264917,
|
||||
-10324408,
|
||||
-26990688,
|
||||
-21547610,
|
||||
-1306239,
|
||||
16848614,
|
||||
20081265,
|
||||
8274286,
|
||||
-7781762,
|
||||
-15824164,
|
||||
-11221065,
|
||||
809636,
|
||||
10454985,
|
||||
11106677,
|
||||
3660474,
|
||||
-5277235,
|
||||
-9044604,
|
||||
-5743394,
|
||||
1141587,
|
||||
6109316,
|
||||
5923006,
|
||||
1562920,
|
||||
-3175486,
|
||||
-4868873,
|
||||
-2843947,
|
||||
821767,
|
||||
3260739,
|
||||
2986814,
|
||||
690618,
|
||||
-1652446,
|
||||
-2411112,
|
||||
-1370661,
|
||||
397969,
|
||||
1539614,
|
||||
1408013,
|
||||
360079,
|
||||
-703606,
|
||||
-1069755,
|
||||
-651552,
|
||||
97230,
|
||||
611221,
|
||||
613143,
|
||||
223879,
|
||||
-215874,
|
||||
-418758,
|
||||
-315114,
|
||||
-34118,
|
||||
231633,
|
||||
356898,
|
||||
330830,
|
||||
220880,
|
||||
106000,
|
||||
30919,
|
||||
-335,
|
||||
-5393,
|
||||
-2395
|
||||
|
||||
Binary file not shown.
@@ -1,142 +0,0 @@
|
||||
// Copyright 2016-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
// ===========================================================================
|
||||
// ===========================================================================
|
||||
//
|
||||
// FIRDS3 functions implementation file
|
||||
//
|
||||
// ===========================================================================
|
||||
// ===========================================================================
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Includes
|
||||
//
|
||||
// ===========================================================================
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "src.h"
|
||||
#include "src_ff3_ds3.h"
|
||||
#include "src_ff3_fir_inner_loop_asm.h"
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
// ===========================================================================
|
||||
|
||||
|
||||
// State init value
|
||||
#define SRC_FF3_DS3_STATE_INIT 0
|
||||
|
||||
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Variables
|
||||
//
|
||||
// ===========================================================================
|
||||
|
||||
int src_ds3_coeffs[SRC_FF3_DS3_N_COEFS] = {
|
||||
#include SRC_FF3_DS3_COEFS_FILE
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Local Functions prototypes
|
||||
//
|
||||
// ===========================================================================
|
||||
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Functions implementations
|
||||
//
|
||||
// ===========================================================================
|
||||
|
||||
src_ff3_return_code_t src_ds3_init(src_ds3_ctrl_t* src_ds3_ctrl)
|
||||
{
|
||||
// Check that delay line base has been set
|
||||
if (src_ds3_ctrl->delay_base == 0) {
|
||||
return SRC_FF3_ERROR;
|
||||
}
|
||||
|
||||
// Setup from FIRDS2 descriptor
|
||||
src_ds3_ctrl->delay_len = SRC_FF3_DS3_N_COEFS<<1; // Double length for circular buffer simulation
|
||||
src_ds3_ctrl->delay_wrap = src_ds3_ctrl->delay_base + SRC_FF3_DS3_N_COEFS;
|
||||
src_ds3_ctrl->delay_offset = SRC_FF3_DS3_N_COEFS;
|
||||
src_ds3_ctrl->inner_loops = (SRC_FF3_DS3_N_COEFS>>1) / SRC_FF3_N_LOOPS_PER_ASM; // Right shift to 2 x 32bits read for coefs per inner loop
|
||||
src_ds3_ctrl->num_coeffs = SRC_FF3_DS3_N_COEFS;
|
||||
src_ds3_ctrl->coeffs = src_ds3_coeffs;
|
||||
|
||||
// Sync the FIRDS3
|
||||
if (src_ds3_sync(src_ds3_ctrl) != SRC_FF3_NO_ERROR) {
|
||||
return SRC_FF3_ERROR;
|
||||
}
|
||||
|
||||
return SRC_FF3_NO_ERROR;
|
||||
}
|
||||
|
||||
src_ff3_return_code_t src_ds3_sync(src_ds3_ctrl_t* src_ds3_ctrl)
|
||||
{
|
||||
// Set delay line index back to base
|
||||
src_ds3_ctrl->delay_pos = src_ds3_ctrl->delay_base;
|
||||
|
||||
// Clear delay line
|
||||
for (unsigned int ui = 0; ui < src_ds3_ctrl->delay_len; ui++) {
|
||||
src_ds3_ctrl->delay_base[ui] = SRC_FF3_DS3_STATE_INIT;
|
||||
}
|
||||
|
||||
return SRC_FF3_NO_ERROR;
|
||||
}
|
||||
|
||||
src_ff3_return_code_t src_ds3_proc(src_ds3_ctrl_t* src_ds3_ctrl)
|
||||
{
|
||||
int* data;
|
||||
int* coeffs;
|
||||
int data0;
|
||||
__int64_t accumulator;
|
||||
|
||||
// Get three new data samples to delay line (double write for circular buffer simulation)
|
||||
data0 = *src_ds3_ctrl->in_data;
|
||||
*src_ds3_ctrl->delay_pos = data0;
|
||||
*(src_ds3_ctrl->delay_pos + src_ds3_ctrl->delay_offset) = data0;
|
||||
|
||||
data0 = *(src_ds3_ctrl->in_data + 1);
|
||||
*(src_ds3_ctrl->delay_pos + 1) = data0;
|
||||
*(src_ds3_ctrl->delay_pos + src_ds3_ctrl->delay_offset + 1) = data0;
|
||||
|
||||
data0 = *(src_ds3_ctrl->in_data + 2);
|
||||
*(src_ds3_ctrl->delay_pos + 2) = data0;
|
||||
*(src_ds3_ctrl->delay_pos + src_ds3_ctrl->delay_offset + 2) = data0;
|
||||
|
||||
// Step delay with circular simulation (will also rewrite to control structure for next round)
|
||||
// Note as delay line length is a multiple of 3 (because filter coefficients length is a multiple of 3)
|
||||
// we only have to do the wrap around check after having written 3 input samples
|
||||
src_ds3_ctrl->delay_pos += 3;
|
||||
if (src_ds3_ctrl->delay_pos >= src_ds3_ctrl->delay_wrap) {
|
||||
src_ds3_ctrl->delay_pos = src_ds3_ctrl->delay_base;
|
||||
}
|
||||
|
||||
// Clear accumulator and set access pointers
|
||||
data = src_ds3_ctrl->delay_pos;
|
||||
coeffs = src_ds3_ctrl->coeffs;
|
||||
accumulator = 0;
|
||||
if ((unsigned)data & 0b0100) {
|
||||
src_ff3_fir_inner_loop_asm_odd(data, coeffs, &data0, src_ds3_ctrl->inner_loops);
|
||||
} else {
|
||||
src_ff3_fir_inner_loop_asm(data, coeffs, &data0, src_ds3_ctrl->inner_loops);
|
||||
}
|
||||
|
||||
*src_ds3_ctrl->out_data = data0;
|
||||
|
||||
return SRC_FF3_NO_ERROR;
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
// Copyright 2016-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#ifndef _SRC_FF3_DS3_H_
|
||||
#define _SRC_FF3_DS3_H_
|
||||
|
||||
#ifdef __XC__
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SRC_FF3_DS3_N_COEFS 144 // Number of coefficients must be a multiple of 6
|
||||
|
||||
/* Filters with "_b_" in their filenames have higher attenuation at
|
||||
* Nyquist (> 60dB compared with 20dB ) but with an earlier cutoff.
|
||||
*/
|
||||
#define SRC_FF3_DS3_COEFS_FILE "FilterData/firds3_b_144.dat"
|
||||
//#define SRC_FF3_DS3_COEFS_FILE "FilterData/firds3_144.dat"
|
||||
|
||||
#ifdef __XC__
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _SRC_FF3_DS3_H_
|
||||
@@ -1,145 +0,0 @@
|
||||
277234,
|
||||
977073,
|
||||
-843263,
|
||||
856598,
|
||||
-672686,
|
||||
89343,
|
||||
1063222,
|
||||
-2949854,
|
||||
5699618,
|
||||
-9389894,
|
||||
14020565,
|
||||
-19488553,
|
||||
25571530,
|
||||
-31908927,
|
||||
37990018,
|
||||
-43139454,
|
||||
46485321,
|
||||
-46884792,
|
||||
42725465,
|
||||
-31390114,
|
||||
7629628,
|
||||
42687800,
|
||||
-181147269,
|
||||
1944820965,
|
||||
507612325,
|
||||
-273394154,
|
||||
195466641,
|
||||
-150806718,
|
||||
118708541,
|
||||
-93071724,
|
||||
71669280,
|
||||
-53608390,
|
||||
38501300,
|
||||
-26137299,
|
||||
16337186,
|
||||
-8893195,
|
||||
3548222,
|
||||
1006,
|
||||
-2085407,
|
||||
3045819,
|
||||
-3208116,
|
||||
2864453,
|
||||
-2264906,
|
||||
1600018,
|
||||
-1024255,
|
||||
637393,
|
||||
580686,
|
||||
15508,
|
||||
91031,
|
||||
889077,
|
||||
-98659,
|
||||
-336105,
|
||||
1049234,
|
||||
-2141667,
|
||||
3623829,
|
||||
-5454434,
|
||||
7510918,
|
||||
-9585659,
|
||||
11374005,
|
||||
-12469289,
|
||||
12367266,
|
||||
-10465607,
|
||||
6064852,
|
||||
1647616,
|
||||
-13653011,
|
||||
31237928,
|
||||
-56327772,
|
||||
92307702,
|
||||
-146297414,
|
||||
236924736,
|
||||
-433188720,
|
||||
1359517635,
|
||||
1359517635,
|
||||
-433188720,
|
||||
236924736,
|
||||
-146297414,
|
||||
92307702,
|
||||
-56327772,
|
||||
31237928,
|
||||
-13653011,
|
||||
1647616,
|
||||
6064852,
|
||||
-10465607,
|
||||
12367266,
|
||||
-12469289,
|
||||
11374005,
|
||||
-9585659,
|
||||
7510918,
|
||||
-5454434,
|
||||
3623829,
|
||||
-2141667,
|
||||
1049234,
|
||||
-336105,
|
||||
-98659,
|
||||
889077,
|
||||
91031,
|
||||
15508,
|
||||
580686,
|
||||
637393,
|
||||
-1024255,
|
||||
1600018,
|
||||
-2264906,
|
||||
2864453,
|
||||
-3208116,
|
||||
3045819,
|
||||
-2085407,
|
||||
1006,
|
||||
3548222,
|
||||
-8893195,
|
||||
16337186,
|
||||
-26137299,
|
||||
38501300,
|
||||
-53608390,
|
||||
71669280,
|
||||
-93071724,
|
||||
118708541,
|
||||
-150806718,
|
||||
195466641,
|
||||
-273394154,
|
||||
507612325,
|
||||
1944820965,
|
||||
-181147269,
|
||||
42687800,
|
||||
7629628,
|
||||
-31390114,
|
||||
42725465,
|
||||
-46884792,
|
||||
46485321,
|
||||
-43139454,
|
||||
37990018,
|
||||
-31908927,
|
||||
25571530,
|
||||
-19488553,
|
||||
14020565,
|
||||
-9389894,
|
||||
5699618,
|
||||
-2949854,
|
||||
1063222,
|
||||
89343,
|
||||
-672686,
|
||||
856598,
|
||||
-843263,
|
||||
977073,
|
||||
277234
|
||||
|
||||
Binary file not shown.
@@ -1,144 +0,0 @@
|
||||
-1004,
|
||||
662641,
|
||||
694900,
|
||||
-1256274,
|
||||
1839429,
|
||||
-1954657,
|
||||
1080237,
|
||||
1193906,
|
||||
-4957339,
|
||||
9782217,
|
||||
-14606619,
|
||||
17769018,
|
||||
-17230183,
|
||||
10981423,
|
||||
2428909,
|
||||
-23345286,
|
||||
50545842,
|
||||
-80972064,
|
||||
109656222,
|
||||
-129637924,
|
||||
131036378,
|
||||
-95652015,
|
||||
-40828481,
|
||||
1816295970,
|
||||
611869637,
|
||||
-344126390,
|
||||
227978430,
|
||||
-145489250,
|
||||
80665240,
|
||||
-30973225,
|
||||
-3918718,
|
||||
24822859,
|
||||
-33663194,
|
||||
33320030,
|
||||
-27133813,
|
||||
18327949,
|
||||
-9526458,
|
||||
2465302,
|
||||
2071853,
|
||||
-4111983,
|
||||
4224039,
|
||||
-3209264,
|
||||
1833664,
|
||||
-647622,
|
||||
-102355,
|
||||
992489,
|
||||
92757,
|
||||
-7186,
|
||||
-16178,
|
||||
317999,
|
||||
1070693,
|
||||
-945343,
|
||||
671637,
|
||||
291690,
|
||||
-2110817,
|
||||
4618841,
|
||||
-7233336,
|
||||
8960442,
|
||||
-8531840,
|
||||
4688761,
|
||||
3424760,
|
||||
-15831706,
|
||||
31364955,
|
||||
-47472492,
|
||||
60243796,
|
||||
-64642830,
|
||||
54794752,
|
||||
-23912637,
|
||||
-37261872,
|
||||
147683310,
|
||||
-374670058,
|
||||
1339136657,
|
||||
1339136657,
|
||||
-374670058,
|
||||
147683310,
|
||||
-37261872,
|
||||
-23912637,
|
||||
54794752,
|
||||
-64642830,
|
||||
60243796,
|
||||
-47472492,
|
||||
31364955,
|
||||
-15831706,
|
||||
3424760,
|
||||
4688761,
|
||||
-8531840,
|
||||
8960442,
|
||||
-7233336,
|
||||
4618841,
|
||||
-2110817,
|
||||
291690,
|
||||
671637,
|
||||
-945343,
|
||||
1070693,
|
||||
317999,
|
||||
-16178,
|
||||
-7186,
|
||||
92757,
|
||||
992489,
|
||||
-102355,
|
||||
-647622,
|
||||
1833664,
|
||||
-3209264,
|
||||
4224039,
|
||||
-4111983,
|
||||
2071853,
|
||||
2465302,
|
||||
-9526458,
|
||||
18327949,
|
||||
-27133813,
|
||||
33320030,
|
||||
-33663194,
|
||||
24822859,
|
||||
-3918718,
|
||||
-30973225,
|
||||
80665240,
|
||||
-145489250,
|
||||
227978430,
|
||||
-344126390,
|
||||
611869637,
|
||||
1816295970,
|
||||
-40828481,
|
||||
-95652015,
|
||||
131036378,
|
||||
-129637924,
|
||||
109656222,
|
||||
-80972064,
|
||||
50545842,
|
||||
-23345286,
|
||||
2428909,
|
||||
10981423,
|
||||
-17230183,
|
||||
17769018,
|
||||
-14606619,
|
||||
9782217,
|
||||
-4957339,
|
||||
1193906,
|
||||
1080237,
|
||||
-1954657,
|
||||
1839429,
|
||||
-1256274,
|
||||
694900,
|
||||
662641,
|
||||
-1004
|
||||
Binary file not shown.
@@ -1,135 +0,0 @@
|
||||
// Copyright 2016-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
// ===========================================================================
|
||||
// ===========================================================================
|
||||
//
|
||||
// FIROS3 functions implementation file
|
||||
//
|
||||
// ===========================================================================
|
||||
// ===========================================================================
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Includes
|
||||
//
|
||||
// ===========================================================================
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "src.h"
|
||||
#include "src_ff3_os3.h"
|
||||
#include "src_ff3_fir_inner_loop_asm.h"
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
// ===========================================================================
|
||||
|
||||
// State init value
|
||||
#define SRC_OS3_STATE_INIT 0
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Variables
|
||||
//
|
||||
// ===========================================================================
|
||||
|
||||
int src_os3_coeffs[SRC_FF3_OS3_N_COEFS] = {
|
||||
#include SRC_FF3_OS3_COEFS_FILE
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
//
|
||||
// Functions implementations
|
||||
//
|
||||
// ===========================================================================
|
||||
|
||||
src_ff3_return_code_t src_os3_init(src_os3_ctrl_t* src_os3_ctrl)
|
||||
{
|
||||
// Check that delay line base has been set
|
||||
if (src_os3_ctrl->delay_base == 0) {
|
||||
return SRC_FF3_ERROR;
|
||||
}
|
||||
|
||||
// Setup from FIROS2 descriptor
|
||||
src_os3_ctrl->delay_len = (SRC_FF3_OS3_N_COEFS/SRC_FF3_OS3_N_PHASES)<<1; // Double length for circular buffer simulation. x3 over-sampler, so only 1/3rd of coefs length needed
|
||||
src_os3_ctrl->delay_wrap = src_os3_ctrl->delay_base + (SRC_FF3_OS3_N_COEFS/SRC_FF3_OS3_N_PHASES);
|
||||
src_os3_ctrl->delay_offset = (SRC_FF3_OS3_N_COEFS/SRC_FF3_OS3_N_PHASES);
|
||||
src_os3_ctrl->inner_loops = ((SRC_FF3_OS3_N_COEFS/SRC_FF3_OS3_N_PHASES)>>1) / SRC_FF3_N_LOOPS_PER_ASM; // Right shift due to 2 x 32bits read for coefs per inner loop and x3 over-sampler, so only 1/3rd of coefs length needed
|
||||
src_os3_ctrl->num_coeffs = SRC_FF3_OS3_N_COEFS;
|
||||
src_os3_ctrl->coeffs = src_os3_coeffs;
|
||||
|
||||
// Sync the FIROS3
|
||||
if (src_os3_sync(src_os3_ctrl) != SRC_FF3_NO_ERROR) {
|
||||
return SRC_FF3_ERROR;
|
||||
}
|
||||
|
||||
return SRC_FF3_NO_ERROR;
|
||||
}
|
||||
|
||||
src_ff3_return_code_t src_os3_sync(src_os3_ctrl_t* src_os3_ctrl)
|
||||
{
|
||||
// Set delay line index back to base
|
||||
src_os3_ctrl->delay_pos = src_os3_ctrl->delay_base;
|
||||
|
||||
// Clear delay line
|
||||
for (unsigned int ui = 0; ui < src_os3_ctrl->delay_len; ui++) {
|
||||
src_os3_ctrl->delay_base[ui] = SRC_OS3_STATE_INIT;
|
||||
}
|
||||
|
||||
// Set phase to '0' to indicate that a new input sample is needed
|
||||
src_os3_ctrl->phase = 0;
|
||||
|
||||
return SRC_FF3_NO_ERROR;
|
||||
}
|
||||
|
||||
src_ff3_return_code_t src_os3_input(src_os3_ctrl_t* src_os3_ctrl)
|
||||
{
|
||||
// Write new input sample from control structure to delay line
|
||||
// at both positions for circular buffer simulation
|
||||
*src_os3_ctrl->delay_pos = src_os3_ctrl->in_data;
|
||||
*(src_os3_ctrl->delay_pos + src_os3_ctrl->delay_offset) = src_os3_ctrl->in_data;
|
||||
|
||||
// Step delay index with circular buffer simulation
|
||||
src_os3_ctrl->delay_pos += 1;
|
||||
if (src_os3_ctrl->delay_pos >= src_os3_ctrl->delay_wrap) {
|
||||
src_os3_ctrl->delay_pos = src_os3_ctrl->delay_base;
|
||||
}
|
||||
|
||||
return SRC_FF3_NO_ERROR;
|
||||
}
|
||||
|
||||
src_ff3_return_code_t src_os3_proc(src_os3_ctrl_t* src_os3_ctrl)
|
||||
{
|
||||
int* data;
|
||||
int* coeffs;
|
||||
int data0;
|
||||
__int64_t accumulator;
|
||||
|
||||
// Clear accumulator and set data/coefs access pointers
|
||||
data = src_os3_ctrl->delay_pos;
|
||||
coeffs = src_os3_ctrl->coeffs + src_os3_ctrl->phase;
|
||||
accumulator = 0;
|
||||
|
||||
if ((unsigned)data & 0b0100) {
|
||||
src_ff3_fir_inner_loop_asm_odd(data, coeffs, &data0, src_os3_ctrl->inner_loops);
|
||||
} else {
|
||||
src_ff3_fir_inner_loop_asm(data, coeffs, &data0, src_os3_ctrl->inner_loops);
|
||||
}
|
||||
|
||||
// Write output
|
||||
src_os3_ctrl->out_data = data0;
|
||||
|
||||
// Step phase
|
||||
src_os3_ctrl->phase += (SRC_FF3_OS3_N_COEFS/SRC_FF3_OS3_N_PHASES);
|
||||
if (src_os3_ctrl->phase == SRC_FF3_OS3_N_COEFS) {
|
||||
src_os3_ctrl->phase = 0;
|
||||
}
|
||||
|
||||
return SRC_FF3_NO_ERROR;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// Copyright 2016-2023 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#ifndef _SRC_FF3_OS3_H_
|
||||
#define _SRC_FF3_OS3_H_
|
||||
|
||||
#ifdef __XC__
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SRC_FF3_OS3_N_COEFS 144 // Number of coefficients must be a multiple of 6
|
||||
#define SRC_FF3_OS3_N_PHASES 3 // Number of output phases (3 as OS3 over-sample by 3)
|
||||
|
||||
/* Filters with "_b_" in their filenames have higher attenuation at
|
||||
* 8kHz (> 60dB compared with 20dB ) but with an earlier cutoff.
|
||||
*/
|
||||
// #define SRC_FF3_OS3_COEFS_FILE "FilterData/firos3_b_144.dat"
|
||||
#define SRC_FF3_OS3_COEFS_FILE "FilterData/firos3_144.dat"
|
||||
|
||||
#ifdef __XC__
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _SRC_FF3_OS3_H_
|
||||
@@ -1,290 +0,0 @@
|
||||
// Copyright 2016-2023 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
.section .dp.data,"awd",@progbits
|
||||
.text
|
||||
|
||||
.cc_top src_ff3_fir_inner_loop_asm.function
|
||||
.globl src_ff3_fir_inner_loop_asm
|
||||
.align 8
|
||||
.type src_ff3_fir_inner_loop_asm,@function
|
||||
|
||||
src_ff3_fir_inner_loop_asm:
|
||||
|
||||
#define piData_p r0
|
||||
#define piCoefs_p r1
|
||||
#define iDataRet_p r2
|
||||
#define step r2
|
||||
#define counter r3
|
||||
#define iCoef0 r4
|
||||
#define iCoef1 r5
|
||||
#define iData0 r6
|
||||
#define iData1 r7
|
||||
#define Acc0_l r8
|
||||
#define Acc0_h r9
|
||||
|
||||
|
||||
|
||||
//In 32b words
|
||||
#define stack_size 8
|
||||
|
||||
.issue_mode dual
|
||||
//Push registers
|
||||
DUALENTSP_lu6 stack_size
|
||||
std r4, r5, sp[0]
|
||||
std r6, r7, sp[1]
|
||||
std r8, r9, sp[2]
|
||||
|
||||
//push return value pointers onto stack. Frees up r2
|
||||
stw iDataRet_p, sp[6]
|
||||
//Constant for adding onto stuff. Gets updated later
|
||||
ldc step, 0x60
|
||||
|
||||
//Initilise MACC regsiters to zero
|
||||
{ldc Acc0_h, 0; ldc Acc0_l, 0}
|
||||
|
||||
|
||||
bf counter, done
|
||||
main_loop:
|
||||
sub counter, counter, 1
|
||||
|
||||
ldd iData0, iData1, piData_p[0]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[0]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[1]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[1]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[2]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[2]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[3]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[3]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[4]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[4]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[5]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[5]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[6]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[6]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[7]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[7]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[8]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[8]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[9]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[9]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[10]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[10]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iData0, iData1, piData_p[11]
|
||||
ldd iCoef0, iCoef1, piCoefs_p[11]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
//Decrement loop counter and increment pointers and branch if still running
|
||||
{add piData_p, piData_p, step; add piCoefs_p, piCoefs_p, step}
|
||||
|
||||
bt counter, main_loop
|
||||
|
||||
done:
|
||||
//pop return value pointer from stack so we can use it to write back
|
||||
//Write back the two return values
|
||||
{ldw iDataRet_p, sp[6]; ldc counter, 31} //Reuse counter (r3)
|
||||
|
||||
lsats Acc0_h, Acc0_l, r3 //Saturate first
|
||||
lextract iData0, Acc0_h, Acc0_l, counter, 32 //Extract
|
||||
stw iData0, iDataRet_p[0]
|
||||
|
||||
//Pop registers
|
||||
ldd r4, r5, sp[0]
|
||||
ldd r6, r7, sp[1]
|
||||
ldd r8, r9, sp[2]
|
||||
retsp stack_size
|
||||
|
||||
.atmp:
|
||||
.size src_ff3_fir_inner_loop_asm, .atmp-src_ff3_fir_inner_loop_asm
|
||||
.align 8
|
||||
.cc_bottom src_ff3_fir_inner_loop_asm.function
|
||||
|
||||
.set src_ff3_fir_inner_loop_asm.nstackwords, stack_size
|
||||
.globl src_ff3_fir_inner_loop_asm.nstackwords
|
||||
.set src_ff3_fir_inner_loop_asm.maxcores, 1
|
||||
.globl src_ff3_fir_inner_loop_asm.maxcores
|
||||
.set src_ff3_fir_inner_loop_asm.maxtimers,0
|
||||
.globl src_ff3_fir_inner_loop_asm.maxtimers
|
||||
.set src_ff3_fir_inner_loop_asm.maxchanends,0
|
||||
.globl src_ff3_fir_inner_loop_asm.maxchanends
|
||||
|
||||
|
||||
.section .dp.data,"awd",@progbits
|
||||
.text
|
||||
|
||||
.cc_top src_ff3_fir_inner_loop_asm_odd.function
|
||||
.globl src_ff3_fir_inner_loop_asm_odd
|
||||
.align 8
|
||||
.type src_ff3_fir_inner_loop_asm_odd,@function
|
||||
|
||||
src_ff3_fir_inner_loop_asm_odd:
|
||||
|
||||
#define piData_p r0
|
||||
#define piCoefs_p r1
|
||||
#define iDataRet_p r2
|
||||
#define step r2
|
||||
#define counter r3
|
||||
#define iCoef0 r4
|
||||
#define iCoef1 r5
|
||||
#define iData0 r6
|
||||
#define iData1 r7
|
||||
#define Acc0_l r8
|
||||
#define Acc0_h r9
|
||||
|
||||
|
||||
|
||||
//In 32b words
|
||||
#define stack_size 8
|
||||
|
||||
.issue_mode dual
|
||||
//Push registers
|
||||
DUALENTSP_lu6 stack_size
|
||||
std r4, r5, sp[0]
|
||||
std r6, r7, sp[1]
|
||||
std r8, r9, sp[2]
|
||||
|
||||
//push return value pointers onto stack. Frees up r2
|
||||
stw iDataRet_p, sp[6]
|
||||
|
||||
//Initilise MACC regsiters to zero
|
||||
{ldc Acc0_h, 0; ldc Acc0_l, 0}
|
||||
|
||||
ldc step, 0x60
|
||||
bf counter, done
|
||||
main_loop_odd:
|
||||
|
||||
{sub counter, counter, 1; sub step, step, 8} //Sub gets loaded with 0x60 at end of loop
|
||||
//We actually want 0x58 so this is good
|
||||
|
||||
//Constant for adding onto stuff. Gets updated later
|
||||
|
||||
{ldw iData0, piData_p[0]; add piData_p, piData_p, 4} //Now 64b aligned
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[0]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[0]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[1]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[1]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[2]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[2]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[3]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[3]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[4]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[4]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[5]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[5]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[6]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[6]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[7]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[7]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[8]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[8]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[9]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[9]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[10]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
ldd iData0, iData1, piData_p[10]
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
ldd iCoef1, iCoef0, piCoefs_p[11]
|
||||
maccs Acc0_h, Acc0_l, iData0, iCoef0
|
||||
|
||||
add piData_p, piData_p, step
|
||||
|
||||
{ldw iData1, piData_p[0]; add piData_p, piData_p, 4} //0x4 + 0x58 + 0x4 = 0x60)
|
||||
maccs Acc0_h, Acc0_l, iData1, iCoef1
|
||||
|
||||
//Increment pointers and branch if still running
|
||||
ldc step, 0x60
|
||||
{bt counter, main_loop_odd; add piCoefs_p, piCoefs_p, step}
|
||||
|
||||
done_odd:
|
||||
//pop return value pointer from stack so we can use it to write back
|
||||
{ldw iDataRet_p, sp[6]; ldc counter, 31} //Reuse counter (r3)
|
||||
|
||||
//Write back the return value
|
||||
lsats Acc0_h, Acc0_l, r3 //Saturate first
|
||||
lextract iData0, Acc0_h, Acc0_l, counter, 32 //Extract
|
||||
stw iData0, iDataRet_p[0]
|
||||
|
||||
//Pop registers
|
||||
ldd r4, r5, sp[0]
|
||||
ldd r6, r7, sp[1]
|
||||
ldd r8, r9, sp[2]
|
||||
retsp stack_size
|
||||
|
||||
.atmp_odd:
|
||||
.size src_ff3_fir_inner_loop_asm_odd, .atmp-src_ff3_fir_inner_loop_asm_odd
|
||||
.align 8
|
||||
.cc_bottom src_ff3_fir_inner_loop_asm_odd.function
|
||||
|
||||
.set src_ff3_fir_inner_loop_asm_odd.nstackwords, stack_size
|
||||
.globl src_ff3_fir_inner_loop_asm_odd.nstackwords
|
||||
.set src_ff3_fir_inner_loop_asm_odd.maxcores, 1
|
||||
.globl src_ff3_fir_inner_loop_asm_odd.maxcores
|
||||
.set src_ff3_fir_inner_loop_asm_odd.maxtimers,0
|
||||
.globl src_ff3_fir_inner_loop_asm_odd.maxtimers
|
||||
.set src_ff3_fir_inner_loop_asm_odd.maxchanends,0
|
||||
.globl src_ff3_fir_inner_loop_asm_odd.maxchanends
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright 2016-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
#ifndef _SRC_FF3_FIR_INNER_LOOP_ASM_H_
|
||||
#define _SRC_FF3_FIR_INNER_LOOP_ASM_H_
|
||||
|
||||
#define SRC_FF3_N_LOOPS_PER_ASM 12
|
||||
|
||||
void src_ff3_fir_inner_loop_asm(int *piData, int *piCoefs, int iData[], int count);
|
||||
void src_ff3_fir_inner_loop_asm_odd(int *piData, int *piCoefs, int iData[], int count);
|
||||
|
||||
|
||||
#endif // _SRC_FF3_FIR_INNER_LOOP_ASM_H_
|
||||
@@ -1,94 +0,0 @@
|
||||
// Copyright 2016-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
.section .dp.data,"awd",@progbits
|
||||
.text
|
||||
|
||||
#define STACKWORDS 4
|
||||
|
||||
#define c0 r4
|
||||
#define c1 r5
|
||||
#define d0 r6
|
||||
|
||||
#define s r11
|
||||
|
||||
.cc_top src_ds3_voice_add_sample.function
|
||||
.globl src_ds3_voice_add_sample
|
||||
.align 4
|
||||
.type src_ds3_voice_add_sample,@function
|
||||
src_ds3_voice_add_sample://(int64_t sum, int32_t data[], int32_t coefs[], int32_t sample);
|
||||
|
||||
.issue_mode dual
|
||||
DUALENTSP_lu6 STACKWORDS
|
||||
|
||||
std r4, r5, sp[0]
|
||||
std r6, r7, sp[1]
|
||||
|
||||
ldw s, sp[STACKWORDS+1]
|
||||
|
||||
bl src_ff3v_fir_impl
|
||||
|
||||
ldd r4, r5, sp[0]
|
||||
ldd r6, r7, sp[1]
|
||||
retsp STACKWORDS
|
||||
|
||||
.src_ds3_voice_add_sample_tmp:
|
||||
.size src_ds3_voice_add_sample, .src_ds3_voice_add_sample_tmp-src_ds3_voice_add_sample
|
||||
.align 4
|
||||
.cc_bottom src_ds3_voice_add_sample.function
|
||||
|
||||
.set src_ds3_voice_add_sample.nstackwords, STACKWORDS
|
||||
.globl src_ds3_voice_add_sample.nstackwords
|
||||
.set src_ds3_voice_add_sample.maxcores,1
|
||||
.globl src_ds3_voice_add_sample.maxcores
|
||||
.set src_ds3_voice_add_sample.maxtimers,0
|
||||
.globl src_ds3_voice_add_sample.maxtimers
|
||||
.set src_ds3_voice_add_sample.maxchanends,0
|
||||
.globl src_ds3_voice_add_sample.maxchanends
|
||||
|
||||
.cc_top src_ds3_voice_add_final_sample.function
|
||||
.globl src_ds3_voice_add_final_sample
|
||||
.align 4
|
||||
.type src_ds3_voice_add_final_sample,@function
|
||||
src_ds3_voice_add_final_sample://(int64_t sum, int32_t data[], int32_t coefs[], int32_t sample);
|
||||
|
||||
.issue_mode dual
|
||||
DUALENTSP_lu6 STACKWORDS
|
||||
|
||||
std r4, r5, sp[0]
|
||||
std r6, r7, sp[1]
|
||||
|
||||
ldw s, sp[STACKWORDS+1]
|
||||
|
||||
bl src_ff3v_fir_impl
|
||||
|
||||
{ldc d0, 31; nop}
|
||||
lextract r0, r1, r0, d0, 32
|
||||
|
||||
ldaw s, cp[src_ff3v_fir_comp_ds]
|
||||
ldw s, s[0]
|
||||
{ldc c0, 0; ldc c1, 0}
|
||||
maccs c0, c1, r0, s
|
||||
|
||||
ldaw s, cp[src_ff3v_fir_comp_q_ds]
|
||||
ldw s, s[0]
|
||||
|
||||
lsats c0, c1, s
|
||||
lextract r0, c0, c1, s, 32
|
||||
|
||||
ldd r4, r5, sp[0]
|
||||
ldd r6, r7, sp[1]
|
||||
{retsp STACKWORDS; ldc r1, 0}
|
||||
|
||||
.src_ds3_voice_add_final_sample_tmp:
|
||||
.size src_ds3_voice_add_final_sample, .src_ds3_voice_add_final_sample_tmp-src_ds3_voice_add_final_sample
|
||||
.align 4
|
||||
.cc_bottom src_ds3_voice_add_final_sample.function
|
||||
|
||||
.set src_ds3_voice_add_final_sample.nstackwords, STACKWORDS
|
||||
.globl src_ds3_voice_add_final_sample.nstackwords
|
||||
.set src_ds3_voice_add_final_sample.maxcores,1
|
||||
.globl src_ds3_voice_add_final_sample.maxcores
|
||||
.set src_ds3_voice_add_final_sample.maxtimers,0
|
||||
.globl src_ds3_voice_add_final_sample.maxtimers
|
||||
.set src_ds3_voice_add_final_sample.maxchanends,0
|
||||
.globl src_ds3_voice_add_final_sample.maxchanends
|
||||
@@ -1,63 +0,0 @@
|
||||
// Copyright 2017-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
.section .dp.data,"awd",@progbits
|
||||
.text
|
||||
|
||||
#define sum_l r0
|
||||
#define sum_h r1
|
||||
#define data r2
|
||||
#define coefs r3
|
||||
|
||||
#define c0 r4
|
||||
#define c1 r5
|
||||
#define d0 r6
|
||||
#define d1 r7
|
||||
|
||||
#define s r11
|
||||
|
||||
#define EVEN_STEP(N) \
|
||||
ldd c1, c0, coefs[N];\
|
||||
maccs sum_h, sum_l, c0, s;\
|
||||
ldd d1, d0, data[N];\
|
||||
maccs sum_h, sum_l, c1, d0;\
|
||||
std d0, s, data[N];
|
||||
|
||||
#define ODD_STEP(N) \
|
||||
ldd c1, c0, coefs[N];\
|
||||
maccs sum_h, sum_l, c0, d1;\
|
||||
ldd s, d0, data[N];\
|
||||
maccs sum_h, sum_l, c1, d0;\
|
||||
std d0, d1, data[N];
|
||||
|
||||
.cc_top src_ff3v_fir_impl.function
|
||||
.globl src_ff3v_fir_impl
|
||||
.align 8
|
||||
.type src_ff3v_fir_impl,@function
|
||||
.issue_mode dual
|
||||
src_ff3v_fir_impl:
|
||||
EVEN_STEP(0);
|
||||
ODD_STEP(1);
|
||||
EVEN_STEP(2);
|
||||
ODD_STEP(3);
|
||||
EVEN_STEP(4);
|
||||
ODD_STEP(5);
|
||||
EVEN_STEP(6);
|
||||
ODD_STEP(7);
|
||||
EVEN_STEP(8);
|
||||
ODD_STEP(9);
|
||||
EVEN_STEP(10);
|
||||
ODD_STEP(11);
|
||||
{retsp 0; nop}
|
||||
.src_ff3v_fir_impl_tmp:
|
||||
.size src_ff3v_fir_impl, .src_ff3v_fir_impl_tmp-src_ff3v_fir_impl
|
||||
.align 4
|
||||
.cc_bottom src_ff3v_fir_impl.function
|
||||
|
||||
.set src_ff3v_fir_impl.nstackwords, 0
|
||||
.globl src_ff3v_fir_impl.nstackwords
|
||||
.set src_ff3v_fir_impl.maxcores,1
|
||||
.globl src_ff3v_fir_impl.maxcores
|
||||
.set src_ff3v_fir_impl.maxtimers,0
|
||||
.globl src_ff3v_fir_impl.maxtimers
|
||||
.set src_ff3v_fir_impl.maxchanends,0
|
||||
.globl src_ff3v_fir_impl.maxchanends
|
||||
@@ -1,33 +0,0 @@
|
||||
// Copyright 2016-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
//
|
||||
// This file is generated using src_ff3v_fir_generator.py
|
||||
//
|
||||
// Do not modify it directly, changes may be overwritten!
|
||||
//
|
||||
|
||||
#ifndef _SRC_FF3V_FIR_H_
|
||||
#define _SRC_FF3V_FIR_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define SRC_FF3V_FIR_NUM_PHASES (3)
|
||||
#define SRC_FF3V_FIR_TAPS_PER_PHASE (24)
|
||||
|
||||
extern const unsigned src_ff3v_fir_comp_q_ds;
|
||||
extern const int32_t src_ff3v_fir_comp_ds;
|
||||
|
||||
extern const unsigned src_ff3v_fir_comp_q_us;
|
||||
extern const int32_t src_ff3v_fir_comp_us;
|
||||
|
||||
extern int32_t src_ff3v_fir_coefs_debug[SRC_FF3V_FIR_NUM_PHASES * SRC_FF3V_FIR_TAPS_PER_PHASE];
|
||||
|
||||
#if defined(__XC__)
|
||||
extern const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE];
|
||||
#define src_ff3v_fir_coefs src_ff3v_fir_coefs_xc
|
||||
#else
|
||||
extern const int32_t (*src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE];
|
||||
#define src_ff3v_fir_coefs src_ff3v_fir_coefs_c
|
||||
#endif
|
||||
|
||||
#endif // _SRC_FF3V_FIR_H_
|
||||
@@ -1,67 +0,0 @@
|
||||
// Copyright 2016-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
//
|
||||
// This file is generated using src_ff3v_fir_generator.py
|
||||
//
|
||||
// Do not modify it directly, changes may be overwritten!
|
||||
//
|
||||
|
||||
#include "src_ff3v_fir.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/** Used for FIR compensation for decimation*/
|
||||
const unsigned src_ff3v_fir_comp_q_ds = 29;
|
||||
|
||||
/** Used for FIR compensation for decimation*/
|
||||
const int32_t src_ff3v_fir_comp_ds = 1112549167;
|
||||
|
||||
/** Used for FIR compensation for upsampling*/
|
||||
const unsigned src_ff3v_fir_comp_q_us = 27;
|
||||
|
||||
/** Used for FIR compensation for upsampling*/
|
||||
const int32_t src_ff3v_fir_comp_us = 834411870;
|
||||
|
||||
/** Used for self testing src_ds3_voice and src_us3_voice functionality */
|
||||
int32_t src_ff3v_fir_coefs_debug[SRC_FF3V_FIR_NUM_PHASES * SRC_FF3V_FIR_TAPS_PER_PHASE] = {
|
||||
1005142, 1367390, 29412, -4146838, -10154637, -14619962,
|
||||
-13776186, -6744830, 2692812, 8121360, 5508436, -2814524,
|
||||
-9285443, -7351357, 2193307, 10930750, 9953155, -1338213,
|
||||
-13227624, -13683020, -123797, 16201217, 19008511, 2582573,
|
||||
-20205295, -27041699, -6837031, 26249516, 40760231, 15085431,
|
||||
-37763299, -71330011, -37235961, 74585089, 219245690, 320542055,
|
||||
320542055, 219245690, 74585089, -37235961, -71330011, -37763299,
|
||||
15085431, 40760231, 26249516, -6837031, -27041699, -20205295,
|
||||
2582573, 19008511, 16201217, -123797, -13683020, -13227624,
|
||||
-1338213, 9953155, 10930750, 2193307, -7351357, -9285443,
|
||||
-2814524, 5508436, 8121360, 2692812, -6744830, -13776186,
|
||||
-14619962, -10154637, -4146838, 29412, 1367390, 1005142,
|
||||
|
||||
};
|
||||
|
||||
/** Coefficients for use with src_ds3_voice and src_us3_voice functions */
|
||||
static const int32_t [[aligned(8)]] src_ff3v_fir_coefs_i[SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE] = {
|
||||
{
|
||||
29412, -14619962, 2692812, -2814524, 2193307, -1338213,
|
||||
-123797, 2582573, -6837031, 15085431, -37235961, 320542055,
|
||||
74585089, -37763299, 26249516, -20205295, 16201217, -13227624,
|
||||
10930750, -9285443, 8121360, -13776186, -4146838, 1005142,
|
||||
},
|
||||
{
|
||||
1367390, -10154637, -6744830, 5508436, -7351357, 9953155,
|
||||
-13683020, 19008511, -27041699, 40760231, -71330011, 219245690,
|
||||
219245690, -71330011, 40760231, -27041699, 19008511, -13683020,
|
||||
9953155, -7351357, 5508436, -6744830, -10154637, 1367390,
|
||||
},
|
||||
{
|
||||
1005142, -4146838, -13776186, 8121360, -9285443, 10930750,
|
||||
-13227624, 16201217, -20205295, 26249516, -37763299, 74585089,
|
||||
320542055, -37235961, 15085431, -6837031, 2582573, -123797,
|
||||
-1338213, 2193307, -2814524, 2692812, -14619962, 29412,
|
||||
},
|
||||
};
|
||||
|
||||
unsafe {
|
||||
const int32_t (* unsafe src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;
|
||||
}
|
||||
|
||||
const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;
|
||||
@@ -1,168 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2016-2021 XMOS LIMITED.
|
||||
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
import os.path
|
||||
import numpy as np
|
||||
from scipy import signal
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def plot_response(fs, w, h, title):
|
||||
plt.figure()
|
||||
plt.plot(0.5*fs*w/np.pi, 20*np.log10(np.abs(h)))
|
||||
|
||||
plt.xlim(0, 0.5*fs)
|
||||
plt.grid(True)
|
||||
plt.xlabel('Frequency (Hz)')
|
||||
plt.ylabel('Gain (dB)')
|
||||
plt.title(title)
|
||||
plt.show()
|
||||
|
||||
def plot_response_passband(fs, w, h, title):
|
||||
plt.figure()
|
||||
plt.plot(0.5*fs*w/np.pi, 20*np.log10(np.abs(h)))
|
||||
plt.ylim(-1, 1)
|
||||
plt.xlim(0, 0.25*fs)
|
||||
plt.grid(True)
|
||||
plt.xlabel('Frequency (Hz)')
|
||||
plt.ylabel('Gain (dB)')
|
||||
plt.title(title)
|
||||
plt.show()
|
||||
|
||||
def generate_header_file(num_taps_per_phase, num_phases):
|
||||
header_template = """\
|
||||
// Copyright (c) 2016-2021, XMOS Ltd, All rights reserved
|
||||
//
|
||||
// This file is generated using src_ff3v_fir_generator.py
|
||||
//
|
||||
// Do not modify it directly, changes may be overwritten!
|
||||
//
|
||||
|
||||
#ifndef _SRC_FF3V_FIR_H_
|
||||
#define _SRC_FF3V_FIR_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define SRC_FF3V_FIR_NUM_PHASES (%(phases)s)
|
||||
#define SRC_FF3V_FIR_TAPS_PER_PHASE (%(taps_per_phase)s)
|
||||
|
||||
extern const unsigned src_ff3v_fir_comp_q_ds;
|
||||
extern const int32_t src_ff3v_fir_comp_ds;
|
||||
|
||||
extern const unsigned src_ff3v_fir_comp_q_us;
|
||||
extern const int32_t src_ff3v_fir_comp_us;
|
||||
|
||||
extern int32_t src_ff3v_fir_coefs_debug[SRC_FF3V_FIR_NUM_PHASES * SRC_FF3V_FIR_TAPS_PER_PHASE];
|
||||
|
||||
#if defined(__XC__)
|
||||
extern const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE];
|
||||
#define src_ff3v_fir_coefs src_ff3v_fir_coefs_xc
|
||||
#else
|
||||
extern const int32_t (*src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE];
|
||||
#define src_ff3v_fir_coefs src_ff3v_fir_coefs_c
|
||||
#endif
|
||||
|
||||
#endif // _SRC_FF3V_FIR_H_
|
||||
"""
|
||||
|
||||
header_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
'src_ff3v_fir.h')
|
||||
with open(header_path, "w") as header_file:
|
||||
header_file.writelines(header_template % {'taps_per_phase':num_taps_per_phase,
|
||||
'phases':num_phases})
|
||||
|
||||
def generate_xc_file(q_ds, q_us, comp_ds, comp_us, taps):
|
||||
xc_template = """\
|
||||
// Copyright (c) 2016-2021, XMOS Ltd, All rights reserved
|
||||
//
|
||||
// This file is generated using src_ff3v_fir_generator.py
|
||||
//
|
||||
// Do not modify it directly, changes may be overwritten!
|
||||
//
|
||||
|
||||
#include "src_ff3v_fir.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/** Used for FIR compensation for decimation*/
|
||||
const unsigned src_ff3v_fir_comp_q_ds = %(comp_q_ds)s;
|
||||
|
||||
/** Used for FIR compensation for decimation*/
|
||||
const int32_t src_ff3v_fir_comp_ds = %(comp_ds)s;
|
||||
|
||||
/** Used for FIR compensation for upsampling*/
|
||||
const unsigned src_ff3v_fir_comp_q_us = %(comp_q_us)s;
|
||||
|
||||
/** Used for FIR compensation for upsampling*/
|
||||
const int32_t src_ff3v_fir_comp_us = %(comp_us)s;
|
||||
|
||||
/** Used for self testing src_ds3_voice and src_us3_voice functionality */
|
||||
int32_t src_ff3v_fir_coefs_debug[SRC_FF3V_FIR_NUM_PHASES * SRC_FF3V_FIR_TAPS_PER_PHASE] = {
|
||||
%(coefs_debug)s
|
||||
};
|
||||
|
||||
/** Coefficients for use with src_ds3_voice and src_us3_voice functions */
|
||||
static const int32_t [[aligned(8)]] src_ff3v_fir_coefs_i[SRC_FF3V_FIR_NUM_PHASES][SRC_FF3V_FIR_TAPS_PER_PHASE] = {
|
||||
%(coefs)s};
|
||||
|
||||
unsafe {
|
||||
const int32_t (* unsafe src_ff3v_fir_coefs_c)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;
|
||||
}
|
||||
|
||||
const int32_t (*src_ff3v_fir_coefs_xc)[SRC_FF3V_FIR_TAPS_PER_PHASE] = src_ff3v_fir_coefs_i;
|
||||
"""
|
||||
|
||||
coefs_debug = ''
|
||||
i = 1
|
||||
for c in taps:
|
||||
coefs_debug += (' ' + str(int(c*(2**31 - 1))).rjust(12) + ',')
|
||||
if ((i % 6) == 0):
|
||||
coefs_debug += '\n'
|
||||
i+=1
|
||||
|
||||
coefs = ''
|
||||
|
||||
for step in range(num_phases-1, -1, -1):
|
||||
i = 1
|
||||
coefs += ' {\n '
|
||||
for j in range(step, len(taps), num_phases):
|
||||
coefs += ' ' + str(int(taps[j]*(2**31 - 1))).rjust(12) + ','
|
||||
if ((i % 6) == 0):
|
||||
coefs += '\n '
|
||||
i+=1
|
||||
coefs += '},\n'
|
||||
|
||||
xc_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
'src_ff3v_fir.xc')
|
||||
with open(xc_path, "w") as xc_file:
|
||||
|
||||
xc_file.writelines(xc_template % {'comp_q_ds':str(q_ds),
|
||||
'comp_ds':str(comp_ds),
|
||||
'comp_q_us':str(q_us),
|
||||
'comp_us':str(comp_us),
|
||||
'coefs_debug':coefs_debug,
|
||||
'coefs':coefs})
|
||||
|
||||
# Low-pass filter design parameters
|
||||
fs = 48000.0 # Sample rate, Hz
|
||||
num_phases = 3
|
||||
num_taps_per_phase = 2*12
|
||||
|
||||
taps = signal.remez((num_phases*num_taps_per_phase), [0, 7300, 8700, 0.5*fs], [1, 0], [.008, 1], Hz=fs)
|
||||
w, h = signal.freqz(taps)
|
||||
|
||||
pass_band_atten = sum(abs(taps))
|
||||
upsampling_atten = num_phases
|
||||
taps = taps / pass_band_atten # Guarantee no overflow
|
||||
|
||||
# generate the compensation factors
|
||||
q_ds = 30 - int(np.log2(pass_band_atten) + 0.5)
|
||||
q_us = 30 - int(np.log2(pass_band_atten * upsampling_atten) + 0.5)
|
||||
comp_ds = int(((2**q_ds)-1) * pass_band_atten)
|
||||
comp_us = int(((2**q_us)-1) * pass_band_atten * upsampling_atten)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# plot_response(fs, w, h, "Low-pass Filter")
|
||||
# plot_response_passband(fs, w, h, "Low-pass Filter")
|
||||
generate_header_file(num_taps_per_phase, num_phases)
|
||||
generate_xc_file(q_ds, q_us, comp_ds, comp_us, taps)
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
// Copyright 2017-2021 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
.section .dp.data,"awd",@progbits
|
||||
.text
|
||||
|
||||
#define STACKWORDS 4
|
||||
|
||||
#define sum_l r0
|
||||
#define sum_h r1
|
||||
#define data r2
|
||||
#define coefs r3
|
||||
|
||||
#define c0 r4
|
||||
#define c1 r5
|
||||
#define d0 r6
|
||||
#define d1 r7
|
||||
|
||||
#define s r11
|
||||
|
||||
#define TWO_TAPS_NO_STORE(N) \
|
||||
ldd c1, c0, coefs[N];\
|
||||
ldd d1, d0, data[N];\
|
||||
maccs sum_h, sum_l, c0, d0;\
|
||||
maccs sum_h, sum_l, c1, d1;
|
||||
|
||||
.cc_top src_us3_voice_input_sample.function
|
||||
.globl src_us3_voice_input_sample
|
||||
.align 4
|
||||
.type src_us3_voice_input_sample,@function
|
||||
src_us3_voice_input_sample://(int32_t data[], int32_t coefs[], int32_t sample);
|
||||
|
||||
.issue_mode dual
|
||||
DUALENTSP_lu6 STACKWORDS
|
||||
|
||||
std r4, r5, sp[0]
|
||||
std r6, r7, sp[1]
|
||||
|
||||
|
||||
// TODO: fix this by renaming the registers
|
||||
mov s, r2
|
||||
{mov r2, r0; mov r3, r1}
|
||||
{ldc r0, 0; ldc r1, 0}
|
||||
|
||||
bl src_ff3v_fir_impl
|
||||
|
||||
{ldc d0, 31; nop}
|
||||
lextract r0, r1, r0, d0, 32
|
||||
|
||||
ldaw s, cp[src_ff3v_fir_comp_us]
|
||||
ldw s, s[0]
|
||||
{ldc c0, 0; ldc c1, 0}
|
||||
maccs c0, c1, r0, s
|
||||
|
||||
ldaw s, cp[src_ff3v_fir_comp_q_us]
|
||||
ldw s, s[0]
|
||||
|
||||
lsats c0, c1, s
|
||||
lextract r0, c0, c1, s, 32
|
||||
|
||||
ldd r4, r5, sp[0]
|
||||
ldd r6, r7, sp[1]
|
||||
retsp STACKWORDS
|
||||
|
||||
.src_us3_voice_input_sample_tmp:
|
||||
.size src_us3_voice_input_sample, .src_us3_voice_input_sample_tmp-src_us3_voice_input_sample
|
||||
.align 4
|
||||
.cc_bottom src_us3_voice_input_sample.function
|
||||
|
||||
.set src_us3_voice_input_sample.nstackwords, STACKWORDS
|
||||
.globl src_us3_voice_input_sample.nstackwords
|
||||
.set src_us3_voice_input_sample.maxcores,1
|
||||
.globl src_us3_voice_input_sample.maxcores
|
||||
.set src_us3_voice_input_sample.maxtimers,0
|
||||
.globl src_us3_voice_input_sample.maxtimers
|
||||
.set src_us3_voice_input_sample.maxchanends,0
|
||||
.globl src_us3_voice_input_sample.maxchanends
|
||||
|
||||
.cc_top src_us3_voice_get_next_sample.function
|
||||
.globl src_us3_voice_get_next_sample
|
||||
.align 4
|
||||
.type src_us3_voice_get_next_sample,@function
|
||||
src_us3_voice_get_next_sample://(int32_t data[], int32_t coefs[], int32_t sample);
|
||||
|
||||
.issue_mode dual
|
||||
DUALENTSP_lu6 STACKWORDS
|
||||
|
||||
std r4, r5, sp[0]
|
||||
std r6, r7, sp[1]
|
||||
|
||||
// TODO: fix this by renaming the registers
|
||||
{mov r2, r0; mov r3, r1}
|
||||
{ldc r0, 0; ldc r1, 0}
|
||||
|
||||
TWO_TAPS_NO_STORE(0)
|
||||
TWO_TAPS_NO_STORE(1)
|
||||
TWO_TAPS_NO_STORE(2)
|
||||
TWO_TAPS_NO_STORE(3)
|
||||
TWO_TAPS_NO_STORE(4)
|
||||
TWO_TAPS_NO_STORE(5)
|
||||
TWO_TAPS_NO_STORE(6)
|
||||
TWO_TAPS_NO_STORE(7)
|
||||
TWO_TAPS_NO_STORE(8)
|
||||
TWO_TAPS_NO_STORE(9)
|
||||
TWO_TAPS_NO_STORE(10)
|
||||
TWO_TAPS_NO_STORE(11)
|
||||
|
||||
{ldc d0, 31; nop}
|
||||
lextract r0, r1, r0, d0, 32
|
||||
|
||||
ldaw s, cp[src_ff3v_fir_comp_us]
|
||||
ldw s, s[0]
|
||||
{ldc c0, 0; ldc c1, 0}
|
||||
maccs c0, c1, r0, s
|
||||
|
||||
ldaw s, cp[src_ff3v_fir_comp_q_us]
|
||||
ldw s, s[0]
|
||||
|
||||
lsats c0, c1, s
|
||||
lextract r0, c0, c1, s, 32
|
||||
|
||||
ldd r4, r5, sp[0]
|
||||
ldd r6, r7, sp[1]
|
||||
retsp STACKWORDS
|
||||
|
||||
.src_us3_voice_get_next_sample_tmp:
|
||||
.size src_us3_voice_get_next_sample, .src_us3_voice_get_next_sample_tmp-src_us3_voice_get_next_sample
|
||||
.align 4
|
||||
.cc_bottom src_us3_voice_get_next_sample.function
|
||||
|
||||
.set src_us3_voice_get_next_sample.nstackwords, STACKWORDS
|
||||
.globl src_us3_voice_get_next_sample.nstackwords
|
||||
.set src_us3_voice_get_next_sample.maxcores,1
|
||||
.globl src_us3_voice_get_next_sample.maxcores
|
||||
.set src_us3_voice_get_next_sample.maxtimers,0
|
||||
.globl src_us3_voice_get_next_sample.maxtimers
|
||||
.set src_us3_voice_get_next_sample.maxchanends,0
|
||||
.globl src_us3_voice_get_next_sample.maxchanends
|
||||
@@ -1,66 +0,0 @@
|
||||
// Copyright 2023-2024 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#define FUNCTION_NAME conv_s32_24t
|
||||
|
||||
#define NSTACKWORDS (8)
|
||||
#define STACK_VEC_TMP (NSTACKWORDS - 8)
|
||||
|
||||
#define state r0
|
||||
#define coef r1
|
||||
#define buff r2
|
||||
#define _32 r3
|
||||
|
||||
.text
|
||||
.issue_mode dual
|
||||
.globl FUNCTION_NAME;
|
||||
.type FUNCTION_NAME,@function
|
||||
.align 16
|
||||
.cc_top FUNCTION_NAME.function,FUNCTION_NAME
|
||||
|
||||
FUNCTION_NAME: // (int32_t * state, int32_t * coef)
|
||||
dualentsp NSTACKWORDS
|
||||
#if (defined(__XS3A__)) // Only available for XS3 with VPU
|
||||
// r4 - r10 are not used here
|
||||
|
||||
// Setting up the vpu and some constants
|
||||
{ ldaw buff, sp[STACK_VEC_TMP] ; ldc r11, 0 }
|
||||
{ ldc _32, 32 ; vsetc r11 }
|
||||
{ vclrdr ; mov r11, state }
|
||||
|
||||
// Do convolution
|
||||
{ ; vldc r11[0] }
|
||||
{ add r11, r11, _32 ; vlmaccr coef[0] }
|
||||
|
||||
{ add coef, coef, _32 ; vldc r11[0] }
|
||||
{ add r11, r11, _32 ; vlmaccr coef[0] }
|
||||
|
||||
{ add coef, coef, _32 ; vldc r11[0] }
|
||||
{ ; vlmaccr coef[0] }
|
||||
// vR [0 - 2] has 3 macc results, store them
|
||||
{ ; vstr buff[0] }
|
||||
|
||||
#undef state
|
||||
#define out r0
|
||||
|
||||
#undef coef
|
||||
#define tmp0 r1
|
||||
|
||||
#undef _32
|
||||
#define tmp1 r3
|
||||
|
||||
// Load all the results and add them together
|
||||
ldd out, tmp1, buff[0]
|
||||
|
||||
{ add out, out, tmp1 ; ldw tmp0, buff[2] }
|
||||
{ add out, out, tmp0 ; }
|
||||
#endif // Only available for XS3 with VPU
|
||||
retsp NSTACKWORDS
|
||||
|
||||
.cc_bottom FUNCTION_NAME.function;
|
||||
.set FUNCTION_NAME.nstackwords,NSTACKWORDS; .global FUNCTION_NAME.nstackwords;
|
||||
.set FUNCTION_NAME.maxcores,1; .global FUNCTION_NAME.maxcores;
|
||||
.set FUNCTION_NAME.maxtimers,0; .global FUNCTION_NAME.maxtimers;
|
||||
.set FUNCTION_NAME.maxchanends,0; .global FUNCTION_NAME.maxchanends;
|
||||
|
||||
#undef FUNCTION_NAME
|
||||
@@ -1,71 +0,0 @@
|
||||
// Copyright 2023-2024 XMOS LIMITED.
|
||||
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
||||
|
||||
#define FUNCTION_NAME conv_s32_32t
|
||||
|
||||
#define NSTACKWORDS (8)
|
||||
#define STACK_VEC_TMP (NSTACKWORDS - 8)
|
||||
|
||||
#define state r0
|
||||
#define coef r1
|
||||
#define buff r2
|
||||
#define _32 r3
|
||||
|
||||
.text
|
||||
.issue_mode dual
|
||||
.globl FUNCTION_NAME;
|
||||
.type FUNCTION_NAME,@function
|
||||
.align 16
|
||||
.cc_top FUNCTION_NAME.function,FUNCTION_NAME
|
||||
|
||||
FUNCTION_NAME: // (int32_t * state, int32_t * coef)
|
||||
dualentsp NSTACKWORDS
|
||||
#if (defined(__XS3A__)) // Only available for XS3 with VPU
|
||||
// r4 - r10 are not used here
|
||||
|
||||
// Setting up the vpu and some constants
|
||||
{ ldaw buff, sp[STACK_VEC_TMP] ; ldc r11, 0 }
|
||||
{ ldc _32, 32 ; vsetc r11 }
|
||||
{ vclrdr ; mov r11, state }
|
||||
|
||||
// Do convolution
|
||||
{ ; vldc r11[0] }
|
||||
{ add r11, r11, _32 ; vlmaccr coef[0] }
|
||||
|
||||
{ add coef, coef, _32 ; vldc r11[0] }
|
||||
{ add r11, r11, _32 ; vlmaccr coef[0] }
|
||||
|
||||
{ add coef, coef, _32 ; vldc r11[0] }
|
||||
{ add r11, r11, _32 ; vlmaccr coef[0] }
|
||||
|
||||
{ add coef, coef, _32 ; vldc r11[0] }
|
||||
{ ; vlmaccr coef[0] }
|
||||
// vR [0 - 3] has 4 macc results, store them
|
||||
{ ; vstr buff[0] }
|
||||
|
||||
#undef state
|
||||
#define out r0
|
||||
|
||||
#undef coef
|
||||
#define tmp0 r1
|
||||
|
||||
#undef _32
|
||||
#define tmp1 r3
|
||||
|
||||
// Load all the results and add them together
|
||||
ldd out, tmp1, buff[0]
|
||||
|
||||
{ add out, out, tmp1 ; ldw tmp0, buff[2] }
|
||||
{ add out, out, tmp0 ; ldw tmp1, buff[3] }
|
||||
{ add out, out, tmp1 ; }
|
||||
#endif // Only available for XS3 with VPU
|
||||
retsp NSTACKWORDS
|
||||
|
||||
.cc_bottom FUNCTION_NAME.function;
|
||||
.set FUNCTION_NAME.nstackwords,NSTACKWORDS; .global FUNCTION_NAME.nstackwords;
|
||||
.set FUNCTION_NAME.maxcores,1; .global FUNCTION_NAME.maxcores;
|
||||
.set FUNCTION_NAME.maxtimers,0; .global FUNCTION_NAME.maxtimers;
|
||||
.set FUNCTION_NAME.maxchanends,0; .global FUNCTION_NAME.maxchanends;
|
||||
|
||||
#undef FUNCTION_NAME
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user