diff options
author | ymherklotz <ymherklotz@gmail.com> | 2018-02-27 12:00:18 +0000 |
---|---|---|
committer | ymherklotz <ymherklotz@gmail.com> | 2018-02-27 12:00:18 +0000 |
commit | 1c7ecd1b22a9bb7377c9a4db8214f28493b8ba05 (patch) | |
tree | fff57664ba4e40573a67ade93e8c83abf4626792 /lab5/RTDSP | |
parent | 1551a4b3343e613fe645e519216b590146b1337b (diff) | |
download | NoiseSilencer-1c7ecd1b22a9bb7377c9a4db8214f28493b8ba05.tar.gz NoiseSilencer-1c7ecd1b22a9bb7377c9a4db8214f28493b8ba05.zip |
Adding working
Diffstat (limited to 'lab5/RTDSP')
-rw-r--r-- | lab5/RTDSP/.launches/RTDSP.launch | 2 | ||||
-rw-r--r-- | lab5/RTDSP/intio.c | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/lab5/RTDSP/.launches/RTDSP.launch b/lab5/RTDSP/.launches/RTDSP.launch index 086e65e..d970f38 100644 --- a/lab5/RTDSP/.launches/RTDSP.launch +++ b/lab5/RTDSP/.launches/RTDSP.launch @@ -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 11:23:09 GMT 2018" time_long="1519730589901"/> </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 11:57:55 GMT 2018" time_long="1519732675312"/> </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 2c47420..567324c 100644 --- a/lab5/RTDSP/intio.c +++ b/lab5/RTDSP/intio.c @@ -133,20 +133,23 @@ void init_HWI() void ISR_AIC() { int i = N-1; - - y[0] = 0.0; //Shift the values for (; i > 0; --i) { x[i] = x[i-1]; y[i] = y[i-1]; - - y[0] += b[i] * x[i] - a[i] * y[i]; } x[0] = mono_read_16Bit(); - - y[0] += b[0] * x[0]; + + y[0] = 0.0; + + for (i = 0; i < N; ++i) { + y[0] += x[i] * b[i]; + if(i != 0) { + y[0] -= y[i] * a[i]; + } + } mono_write_16Bit((short)y[0]); } |