diff options
author | ymherklotz <ymherklotz@gmail.com> | 2018-02-27 19:24:35 +0000 |
---|---|---|
committer | ymherklotz <ymherklotz@gmail.com> | 2018-02-27 19:24:35 +0000 |
commit | d4f4bcf4b400561bcedd6c2cc85545fd7f77a1e2 (patch) | |
tree | 017feac7520f94cc23f1757e11eef8b74d5641f4 | |
parent | 0b89979e50e9339b5b154a915a4bfb5a3a7f418f (diff) | |
download | NoiseSilencer-d4f4bcf4b400561bcedd6c2cc85545fd7f77a1e2.tar.gz NoiseSilencer-d4f4bcf4b400561bcedd6c2cc85545fd7f77a1e2.zip |
Finished transposed
-rw-r--r-- | lab5/RTDSP/.launches/RTDSP.launch | 4 | ||||
-rw-r--r-- | lab5/RTDSP/intio.c | 22 |
2 files changed, 9 insertions, 17 deletions
diff --git a/lab5/RTDSP/.launches/RTDSP.launch b/lab5/RTDSP/.launches/RTDSP.launch index cd26e49..22dc970 100644 --- a/lab5/RTDSP/.launches/RTDSP.launch +++ b/lab5/RTDSP/.launches/RTDSP.launch @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <launchConfiguration type="com.ti.ccstudio.debug.core.CCELaunchType"> <stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="<?xml version="1.0" encoding="UTF-8"?> <sourceLookupDirector> <sourceContainers duplicates="false"> <container memento="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;default/&gt;&#13;&#10;" typeId="org.eclipse.debug.core.containerType.default"/> </sourceContainers> </sourceLookupDirector> "/> -<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> <booleanAttribute key="com.ti.ccstudio.debug.core.MRU_PROGRAM_S_ONLY" value="false"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="com.ti.ccstudio.debug.core.CCEDebugger"/> <stringAttribute key="CCEDebugOptions.CPU_RESOLVE_OPTION" value="exact"/> <stringAttribute key="org.eclipse.debug.ui.DISPLAY_NAME" value="RTDSP [Debug] - Spectrum Digital DSK-EVM-eZdsp onboard USB Emulator_0/TMS320C671X"/> @@ -13,7 +13,7 @@ <stringAttribute key="CCEDebugOptions.TARGET_CONFIGURATION_OPTION" value="full"/> <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8"?> <memoryBlockExpressionList/> "/> <stringAttribute key="com.ti.ccstudio.debug.core.MRU_PROGRAM_NAME" value="C:\github\RTDSP\lab5\RTDSP\Debug\RTDSP.out"/> -<stringAttribute key="com.ti.ccstudio.debug.core.MRU_MODULES" value="<?xml version="1.0" encoding="UTF-8"?> <modules> <module name="C:\GIT\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Fri Jan 19 14:07:28 GMT 2018" time_long="1516370848357"/> <module name="C:\Github\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Tue Jan 23 11:15:11 GMT 2018" time_long="1516706111426"/> <module name="C:\GIT\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 01 11:44:21 GMT 2018" time_long="1517485461898"/> <module name="C:\github\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 15 13:55:55 GMT 2018" time_long="1518702955359"/> <module name="C:\Github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Tue Feb 27 12:18:55 GMT 2018" time_long="1519733935329"/> <module name="C:\github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Tue Feb 27 17:40:15 GMT 2018" time_long="1519753215455"/> </modules> "/> +<stringAttribute key="com.ti.ccstudio.debug.core.MRU_MODULES" value="<?xml version="1.0" encoding="UTF-8"?> <modules> <module name="C:\GIT\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Fri Jan 19 14:07:28 GMT 2018" time_long="1516370848357"/> <module name="C:\Github\RTDSP\lab3\RTDSP\Debug\RTDSP.out" time="Tue Jan 23 11:15:11 GMT 2018" time_long="1516706111426"/> <module name="C:\GIT\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 01 11:44:21 GMT 2018" time_long="1517485461898"/> <module name="C:\github\RTDSP\lab4\RTDSP\Debug\RTDSP.out" time="Thu Feb 15 13:55:55 GMT 2018" time_long="1518702955359"/> <module name="C:\Github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Tue Feb 27 12:18:55 GMT 2018" time_long="1519733935329"/> <module name="C:\github\RTDSP\lab5\RTDSP\Debug\RTDSP.out" time="Tue Feb 27 19:23:23 GMT 2018" time_long="1519759403773"/> </modules> "/> <stringAttribute key="CCEDebugOptions.CPU_NAME" value="Spectrum Digital DSK-EVM-eZdsp onboard USB Emulator_0/TMS320C671X"/> <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RTDSP"/> <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8"?> <globalVariableList/> "/> diff --git a/lab5/RTDSP/intio.c b/lab5/RTDSP/intio.c index ec0d08d..debadab 100644 --- a/lab5/RTDSP/intio.c +++ b/lab5/RTDSP/intio.c @@ -46,7 +46,7 @@ #include "Matlab/coeff.txt" int N = sizeof(a)/sizeof(a[0]); -double* v; +double* d; /******************************* Global declarations ********************************/ @@ -80,8 +80,8 @@ void init_HWI(void); void ISR_AIC(void); /********************************** Main routine ************************************/ void main(){ - v = (double*)malloc(N * sizeof(double)); - memset(v, 0.0, N * sizeof(double)); + d = (double*)malloc(N * sizeof(double)); + memset(d, 0.0, N * sizeof(double)); // initialize board and the audio port init_hardware(); @@ -131,20 +131,12 @@ void init_HWI() void ISR_AIC() { int i; - double Y = 0.0; - v[0] = mono_read_16Bit(); + short xin = mono_read_16Bit(); - for (i = 1; i < N; ++i) { - v[0] -= a[i] * v[i]; + for (i = 0; i < N; ++i) { + d[i] = b[i] * xin + d[i+1] - a[i] * d[0]; } - for (i = N-1; i > 0; --i) { - Y += b[i] * v[i]; - v[i] = v[i-1]; - } - - Y += v[0] * b[0]; - - mono_write_16Bit((short)Y); + mono_write_16Bit((short)d[0]); } |