From ce1db9d3985acbf3010976b9ac75437766b9cce7 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 17 Oct 2024 15:00:07 +0100 Subject: [PATCH] - Parameterise INFR_APPS_VERSION - Add dev repo to readme - Sentence case titles as per style guide --- CHANGELOG.rst | 2 +- Jenkinsfile | 29 +- README.rst | 16 +- __generator_rx/.cproject | 494 ------------- __generator_rx/.project | 76 -- __generator_rx/.xproject | 1 - __generator_rx/adatReceiver-100.xc | 955 ------------------------- __generator_rx/adatReceiver-99.9375.xc | 955 ------------------------- doc/Doxyfile.inc | 2 +- doc/rst/lib_adat.rst | 18 +- settings.yml | 2 +- 11 files changed, 41 insertions(+), 2509 deletions(-) delete mode 100644 __generator_rx/.cproject delete mode 100644 __generator_rx/.project delete mode 100644 __generator_rx/.xproject delete mode 100644 __generator_rx/adatReceiver-100.xc delete mode 100644 __generator_rx/adatReceiver-99.9375.xc diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 49a6278..11af18d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,7 +4,7 @@ lib_adat change log 2.0.1 ----- - * CHANGED: Run standard library tests as part of Jenkins testing + * CHANGED: Documentation updated 2.0.0 ----- diff --git a/Jenkinsfile b/Jenkinsfile index bc01e56..5cfac3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,11 @@ pipeline { defaultValue: 'v6.1.2', description: 'The xmosdoc version' ) + string( + name: 'INFR_APPS_VERSION', + defaultValue: 'v2.0.1', + description: 'The infr_apps version' + ) } environment { REPO = 'lib_adat' @@ -30,7 +35,7 @@ pipeline { PYTHON_VERSION = "3.12.1" } stages { - stage('Get sandbox') { + stage('Checkout') { steps { println "Stage running on: ${env.NODE_NAME}" @@ -56,18 +61,20 @@ pipeline { } // Build examples stage('Library checks') { - steps { - runLibraryChecks("${WORKSPACE}/${REPO}", "v2.0.1") - } // steps - } // Library checks + steps { + runLibraryChecks("${WORKSPACE}/${REPO}", "${params.INFR_APPS_VERSION}") + } + } stage('Documentation') { - steps { - dir("${REPO}") { - buildDocs() - } // dir("${REPO}") - } // steps - } // stage('Documentation') + steps { + dir("${REPO}") { + warnError("Docs") { + buildDocs() + } + } + } + } } // stages post { cleanup { diff --git a/README.rst b/README.rst index 11c90b2..177bbfb 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ :orphan: ######################## -lib_adat: ADAT Lightpipe +lib_adat: ADAT lightpipe ######################## :vendor: XMOS @@ -29,26 +29,32 @@ Features * Application for loopback testing on Simulator or hardware ************ -Known Issues +Known issues ************ * ADAT Rx: Requirement for 100 MHz reference clock (#18) * ADAT Tx: No support for 256x master clock (i.e. 48 kHz from 12.288 MHz master clock) (#17) +**************** +Development repo +**************** + + * `lib_adat `_ + ************** -Required Tools +Required tools ************** * XMOS XTC Tools: 15.3.0 ********************************* -Required Libraries (dependencies) +Required libraries (dependencies) ********************************* * None ************************* -Related Application Notes +Related application notes ************************* The following application notes use this library: diff --git a/__generator_rx/.cproject b/__generator_rx/.cproject deleted file mode 100644 index ffa4f9f..0000000 --- a/__generator_rx/.cproject +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - - - - - - - - - - xmake - - all - true - true - true - - - xmake - - clean - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/__generator_rx/.project b/__generator_rx/.project deleted file mode 100644 index 8e7a8e0..0000000 --- a/__generator_rx/.project +++ /dev/null @@ -1,76 +0,0 @@ - - - generator_rx - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?children? - ?name?=outputEntries\|?children?=?name?=entry\\\\|\\|\|| - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.buildArguments - CONFIG=Debug - - - org.eclipse.cdt.make.core.buildCommand - xmake - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - false - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - com.xmos.cdt.core.XdeProjectNature - - - diff --git a/__generator_rx/.xproject b/__generator_rx/.xproject deleted file mode 100644 index f712bd0..0000000 --- a/__generator_rx/.xproject +++ /dev/null @@ -1 +0,0 @@ -sc_adat \ No newline at end of file diff --git a/__generator_rx/adatReceiver-100.xc b/__generator_rx/adatReceiver-100.xc deleted file mode 100644 index 117c235..0000000 --- a/__generator_rx/adatReceiver-100.xc +++ /dev/null @@ -1,955 +0,0 @@ -// Copyright 2011-2024 XMOS LIMITED. -// This Software is subject to the terms of the XMOS Public Licence: Version 1. -// GENERATED CODE - DO NOT EDIT -// Comments are in the generator -// Generated for devices with a reference clock of 100.000000 Mhz -// If both 48000 and 44100 are to be supported, then -// call adatReceiver48000 and 44100 in a while(1) loop -#include -#include -#pragma unsafe arrays -void adatReceiver48000(buffered in port:32 p, chanend oChan) { - const unsigned int mask = 0x80808080; - unsigned compressed; - unsigned nibble, word = 1, fourBits, data; - int old, violation; - unsigned int lookupCrcF[16] = {8, 9, 12, 13, 7, 6, 3, 2, 10, 11, 14, 15, 5, 4, 1, 0}; - unsigned int lookupNRTZ[32] = {0, 8, 12, 4, 6, 14, 10, 2, 3, 11, 15, 7, 5, 13, 9, 1, - 1, 9, 13, 5, 7, 15, 11, 3, 2, 10, 14, 6, 4, 12, 8, 0}; - for(int i = 0; i < 32; i++) { lookupNRTZ[i] <<= 4; } - do { - old = word; p :> word; - } while (word != old || (word != 0 && word+1 != 0)); - while(1) { - violation = word; - p when pinsneq(violation) :> int _; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - outuint(oChan, nibble << 4 | 1); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - if (word != 0 && word+1 != 0) return; - } -} - -// GENERATED CODE - DO NOT EDIT -// Comments are in the generator -// Generated for devices with a reference clock of 100.000000 Mhz -// If both 48000 and 44100 are to be supported, then -// call adatReceiver48000 and 44100 in a while(1) loop -#include -#include -#pragma unsafe arrays -void adatReceiver44100(buffered in port:32 p, chanend oChan) { - const unsigned int mask = 0x80402010; - unsigned compressed; - unsigned nibble, word = 1, fourBits, data; - int old, violation; - unsigned int lookupCrcF[16] = {8, 12, 10, 14, 9, 13, 11, 15, 7, 3, 5, 1, 6, 2, 4, 0}; - unsigned int lookupNRTZ[32] = {0, 8, 12, 4, 6, 14, 10, 2, 3, 11, 15, 7, 5, 13, 9, 1, - 1, 9, 13, 5, 7, 15, 11, 3, 2, 10, 14, 6, 4, 12, 8, 0}; - for(int i = 0; i < 32; i++) { lookupNRTZ[i] <<= 4; } - do { - old = word; p :> word; - } while (word != old || (word != 0 && word+1 != 0)); - while(1) { - violation = word; - p when pinsneq(violation) :> int _; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - outuint(oChan, nibble << 4 | 1); - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - if (word != 0 && word+1 != 0) return; - } -} - diff --git a/__generator_rx/adatReceiver-99.9375.xc b/__generator_rx/adatReceiver-99.9375.xc deleted file mode 100644 index 7799822..0000000 --- a/__generator_rx/adatReceiver-99.9375.xc +++ /dev/null @@ -1,955 +0,0 @@ -// Copyright 2011-2024 XMOS LIMITED. -// This Software is subject to the terms of the XMOS Public Licence: Version 1. -// GENERATED CODE - DO NOT EDIT -// Comments are in the generator -// Generated for devices with a reference clock of 99.937500 Mhz -// If both 48000 and 44100 are to be supported, then -// call adatReceiver48000 and 44100 in a while(1) loop -#include -#include -#pragma unsafe arrays -void adatReceiver48000(buffered in port:32 p, chanend oChan) { - const unsigned int mask = 0x80808080; - unsigned compressed; - unsigned nibble, word = 1, fourBits, data; - int old, violation; - unsigned int lookupCrcF[16] = {8, 9, 12, 13, 7, 6, 3, 2, 10, 11, 14, 15, 5, 4, 1, 0}; - unsigned int lookupNRTZ[32] = {0, 8, 12, 4, 6, 14, 10, 2, 3, 11, 15, 7, 5, 13, 9, 1, - 1, 9, 13, 5, 7, 15, 11, 3, 2, 10, 14, 6, 4, 12, 8, 0}; - for(int i = 0; i < 32; i++) { lookupNRTZ[i] <<= 4; } - do { - old = word; p :> word; - } while (word != old || (word != 0 && word+1 != 0)); - while(1) { - violation = word; - p when pinsneq(violation) :> int _; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - outuint(oChan, nibble << 4 | 1); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - if (word != 0 && word+1 != 0) return; - } -} - -// GENERATED CODE - DO NOT EDIT -// Comments are in the generator -// Generated for devices with a reference clock of 99.937500 Mhz -// If both 48000 and 44100 are to be supported, then -// call adatReceiver48000 and 44100 in a while(1) loop -#include -#include -#pragma unsafe arrays -void adatReceiver44100(buffered in port:32 p, chanend oChan) { - const unsigned int mask = 0x80402010; - unsigned compressed; - unsigned nibble, word = 1, fourBits, data; - int old, violation; - unsigned int lookupCrcF[16] = {8, 12, 10, 14, 9, 13, 11, 15, 7, 3, 5, 1, 6, 2, 4, 0}; - unsigned int lookupNRTZ[32] = {0, 8, 12, 4, 6, 14, 10, 2, 3, 11, 15, 7, 5, 13, 9, 1, - 1, 9, 13, 5, 7, 15, 11, 3, 2, 10, 14, 6, 4, 12, 8, 0}; - for(int i = 0; i < 32; i++) { lookupNRTZ[i] <<= 4; } - do { - old = word; p :> word; - } while (word != old || (word != 0 && word+1 != 0)); - while(1) { - violation = word; - p when pinsneq(violation) :> int _; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - outuint(oChan, nibble << 4 | 1); - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = nibble << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = nibble << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = nibble << 4; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 0) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = compressed; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - fourBits = (word << 1) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = nibble << 4; - p :> word; - fourBits = (word << 5) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - old = old | compressed << 1; - p :> word; - fourBits = (word << 3) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 7) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 3)) & 31]; - old = compressed >> 2; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 1)) & 31]; - old = compressed >> 4; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 2) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - old = compressed; - p :> word; - fourBits = (word << 6) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - compressed = compressed >> 1; - nibble = lookupNRTZ[(old | (compressed << 4)) & 31]; - old = compressed >> 1; - data = (data | nibble) << 4; - p :> word; - fourBits = (word << 4) & mask; - crc32(fourBits, 0xf, 0xf); - compressed = lookupCrcF[fourBits]; - nibble = lookupNRTZ[(old | (compressed << 2)) & 31]; - old = compressed >> 3; - data = (data | nibble) << 4; - outuint(oChan, data); - p :> word; - if (word != 0 && word+1 != 0) return; - } -} - diff --git a/doc/Doxyfile.inc b/doc/Doxyfile.inc index fd736ae..42df474 100644 --- a/doc/Doxyfile.inc +++ b/doc/Doxyfile.inc @@ -1,7 +1,7 @@ # This file provides overrides to the Doxyfile configuration PROJECT_NAME = lib_adat -PROJECT_BRIEF = "ADAT Lightpipe" +PROJECT_BRIEF = "ADAT lightpipe" INPUT = ../lib_adat/api diff --git a/doc/rst/lib_adat.rst b/doc/rst/lib_adat.rst index 2a4395f..7203257 100644 --- a/doc/rst/lib_adat.rst +++ b/doc/rst/lib_adat.rst @@ -1,6 +1,6 @@ ######################## -lib_adat: ADAT Lightpipe +lib_adat: ADAT lightpipe ######################## ************ @@ -79,7 +79,7 @@ A single 62.5-MIPS core is required. The receiver does not require any external clock, but can only recover 44.1 and 48 KHz sample rates. ************ -ADAT Receive +ADAT receive ************ The ADAT receiver comprises a single thread that parses data as it @@ -98,7 +98,7 @@ succession from a ``while(1)`` loop (recommended). Receive API =========== -Compile Time Defines +Compile time defines -------------------- *ADAT_REF* @@ -114,7 +114,7 @@ Functions .. doxygengroup:: lib_adat_rx :content-only: -Receive Example +Receive example =============== A simple receive program is provided in ``examples/app_adat_rx_example``. This application simply @@ -149,7 +149,7 @@ parallel in two threads: :end-before: //:: ************* -ADAT Transmit +ADAT transmit ************* There are two functions in the API that can produce an ADAT signal. The simplest @@ -191,7 +191,7 @@ Functions .. doxygengroup:: lib_adat_tx :content-only: -Transmit Example +Transmit example ================ Example applications are provided for both the 'direct port' and 'remote port' API variants. These @@ -199,7 +199,7 @@ are ``app_adat_tx_direct_example`` and ``app_adat_tx_example`` respectively. Both examples transmit sine waves on all channels and are described in this section. -Direct Port Example +Direct port example ------------------- The output port is declared as a 32-bit buffered port, and the master clock input must be @@ -236,7 +236,7 @@ the `xcore.ai` application PLL to generate a suitable master-clock. :start-after: /* Top-level main :end-before: //: -Remote Port Example +Remote port example ------------------- Much of the remote port example matches the direct port example. @@ -288,7 +288,7 @@ should be set up: :end-before: //: ******************* -Additional Examples +Additional examples ******************* An additional example, ``app_adat_loopback``, is also provided. This expects a cable to be connected diff --git a/settings.yml b/settings.yml index 1d732c3..ebdcab4 100644 --- a/settings.yml +++ b/settings.yml @@ -2,7 +2,7 @@ lib_name: lib_adat project: '{{lib_name}}' -title: '{{lib_name}}: ADAT Lightpipe' +title: '{{lib_name}}: ADAT lightpipe' version: 2.0.1 documentation: