aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorunknown <dm2515@eews303a-028.ic.ac.uk>2018-01-29 14:56:19 +0000
committerunknown <dm2515@eews303a-028.ic.ac.uk>2018-01-29 14:56:19 +0000
commit9c4e10e7ff4869bc678a04d59a88180d75f71b20 (patch)
treec77719f2d8a2fa0b8a2f6d7dcbcc27dc2c50161e
parent72d45424c9961b90f796c699f65967e4abefa2ce (diff)
downloadNoiseSilencer-9c4e10e7ff4869bc678a04d59a88180d75f71b20.tar.gz
NoiseSilencer-9c4e10e7ff4869bc678a04d59a88180d75f71b20.zip
correct dir
-rw-r--r--lab4/.metadata/.log94
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/12c74b9_null.dat0
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/151e0c4_null.dat0
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1529466_null.dat0
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/165d417_null.dat0
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1aa5221_null.dat0
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/546909_null.dat0
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/bc7722_null.dat0
-rw-r--r--lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/ea95e0_null.dat0
-rw-r--r--lab4/.metadata/.plugins/org.eclipse.core.resources/.history/42/002ef37c040500181ac69c959115c706164
-rw-r--r--lab4/RTDSP/intio.c16
11 files changed, 262 insertions, 12 deletions
diff --git a/lab4/.metadata/.log b/lab4/.metadata/.log
index ac17d49..7c57c30 100644
--- a/lab4/.metadata/.log
+++ b/lab4/.metadata/.log
@@ -57,3 +57,97 @@ java.lang.IllegalArgumentException: ProducerArgument not null!!!
!ENTRY com.ti.ccstudio.debug.core 4 0 2018-01-25 14:39:38.279
!MESSAGE Error: TMS320C671X: Error initializing emulator
+!SESSION 2018-01-29 14:54:50.504 -----------------------------------------------
+eclipse.buildId=4.1.3.00038
+java.version=1.5.0_14
+java.vendor=Sun Microsystems Inc.
+BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
+Command-line arguments: -os win32 -ws win32 -arch x86
+
+!ENTRY org.eclipse.core.resources 2 10035 2018-01-29 14:54:54.674
+!MESSAGE A workspace crash was detected. The previous session did not exit normally.
+
+!ENTRY org.eclipse.debug.core 4 120 2018-01-29 14:55:00.996
+!MESSAGE Error logged from Debug Core:
+!STACK 1
+org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file system: /RTDSP/.launches/RTDSP.launch.
+ at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:606)
+ at org.eclipse.core.internal.resources.File.getContents(File.java:290)
+ at org.eclipse.core.internal.resources.File.getContents(File.java:279)
+ at org.eclipse.debug.internal.core.LaunchManager.getInfo(LaunchManager.java:1158)
+ at org.eclipse.debug.internal.core.LaunchConfiguration.getInfo(LaunchConfiguration.java:374)
+ at org.eclipse.debug.internal.core.LaunchConfiguration.getType(LaunchConfiguration.java:505)
+ at org.eclipse.debug.internal.core.LaunchManager.isValid(LaunchManager.java:1702)
+ at org.eclipse.debug.internal.core.LaunchManager.verifyConfigurations(LaunchManager.java:2023)
+ at org.eclipse.debug.internal.core.LaunchManager.getAllLaunchConfigurations(LaunchManager.java:928)
+ at org.eclipse.debug.internal.core.LaunchManager.getLaunchConfigurations(LaunchManager.java:1208)
+ at com.ti.ccstudio.breakpoint.core.PropertyUtils.getTargetName(PropertyUtils.java:60)
+ at com.ti.ccstudio.breakpoint.ui.action.base.AbstractEditorActionDelegate.determineTargetBreakpoint(AbstractEditorActionDelegate.java:67)
+ at com.ti.ccstudio.breakpoint.ui.action.EditorPropertiesRulerActionDelegate.updateMenuItem(EditorPropertiesRulerActionDelegate.java:31)
+ at com.ti.ccstudio.breakpoint.ui.action.base.AbstractEditorActionDelegate.setActiveEditor(AbstractEditorActionDelegate.java:44)
+ at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:75)
+ at org.eclipse.ui.internal.EditorPluginAction.<init>(EditorPluginAction.java:34)
+ at org.eclipse.ui.internal.ActionDescriptor.createAction(ActionDescriptor.java:256)
+ at org.eclipse.ui.internal.ActionDescriptor.<init>(ActionDescriptor.java:170)
+ at org.eclipse.ui.internal.ViewerActionBuilder.createActionDescriptor(ViewerActionBuilder.java:53)
+ at org.eclipse.ui.internal.PluginActionBuilder.readElement(PluginActionBuilder.java:158)
+ at org.eclipse.ui.internal.ViewerActionBuilder.readElement(ViewerActionBuilder.java:88)
+ at org.eclipse.ui.internal.registry.RegistryReader.readElements(RegistryReader.java:138)
+ at org.eclipse.ui.internal.registry.RegistryReader.readElementChildren(RegistryReader.java:127)
+ at org.eclipse.ui.internal.PluginActionBuilder.readElement(PluginActionBuilder.java:141)
+ at org.eclipse.ui.internal.ViewerActionBuilder.readElement(ViewerActionBuilder.java:88)
+ at org.eclipse.ui.internal.registry.RegistryReader.readElements(RegistryReader.java:138)
+ at org.eclipse.ui.internal.registry.RegistryReader.readExtension(RegistryReader.java:149)
+ at org.eclipse.ui.internal.registry.RegistryReader.readRegistry(RegistryReader.java:170)
+ at org.eclipse.ui.internal.PluginActionBuilder.readContributions(PluginActionBuilder.java:112)
+ at org.eclipse.ui.internal.ViewerActionBuilder.readViewerContributions(ViewerActionBuilder.java:106)
+ at org.eclipse.ui.internal.PopupMenuExtender.readStaticActionsFor(PopupMenuExtender.java:373)
+ at org.eclipse.ui.internal.PopupMenuExtender.<init>(PopupMenuExtender.java:125)
+ at org.eclipse.ui.internal.PartSite.registerContextMenu(PartSite.java:114)
+ at org.eclipse.ui.internal.EditorSite.registerContextMenu(EditorSite.java:151)
+ at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:2673)
+ at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53)
+ at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:368)
+ at org.eclipse.cdt.internal.ui.editor.CEditor.createPartControl(CEditor.java:843)
+ at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596)
+ at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372)
+ at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
+ at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:263)
+ at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1420)
+ at org.eclipse.ui.internal.EditorManager$5.run(EditorManager.java:1005)
+ at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
+ at org.eclipse.core.runtime.Platform.run(Platform.java:843)
+ at org.eclipse.ui.internal.EditorManager.restoreState(EditorManager.java:1000)
+ at org.eclipse.ui.internal.WorkbenchPage.restoreState(WorkbenchPage.java:2836)
+ at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1949)
+ at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2869)
+ at org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2817)
+ at org.eclipse.ui.internal.Workbench$19.run(Workbench.java:1681)
+ at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1421)
+ at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1679)
+ at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1650)
+ at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1529)
+ at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
+ at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1473)
+ at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
+ at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:702)
+ at org.eclipse.ui.internal.Workbench.init(Workbench.java:1085)
+ at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847)
+ at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
+ at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
+ at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:97)
+ at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
+ at java.lang.reflect.Method.invoke(Unknown Source)
+ at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
+ at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
+ at org.eclipse.core.launcher.Main.run(Main.java:996)
+ at org.eclipse.core.launcher.Main.main(Main.java:971)
+!SUBENTRY 1 org.eclipse.core.resources 4 274 2018-01-29 14:55:00.997
+!MESSAGE Resource is out of sync with the file system: /RTDSP/.launches/RTDSP.launch.
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/12c74b9_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/12c74b9_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/12c74b9_null.dat
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/151e0c4_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/151e0c4_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/151e0c4_null.dat
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1529466_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1529466_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1529466_null.dat
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/165d417_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/165d417_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/165d417_null.dat
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1aa5221_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1aa5221_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/1aa5221_null.dat
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/546909_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/546909_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/546909_null.dat
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/bc7722_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/bc7722_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/bc7722_null.dat
diff --git a/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/ea95e0_null.dat b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/ea95e0_null.dat
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lab4/.metadata/.plugins/com.ti.dvt.datamodel/temp/ea95e0_null.dat
diff --git a/lab4/.metadata/.plugins/org.eclipse.core.resources/.history/42/002ef37c040500181ac69c959115c706 b/lab4/.metadata/.plugins/org.eclipse.core.resources/.history/42/002ef37c040500181ac69c959115c706
new file mode 100644
index 0000000..6e19045
--- /dev/null
+++ b/lab4/.metadata/.plugins/org.eclipse.core.resources/.history/42/002ef37c040500181ac69c959115c706
@@ -0,0 +1,164 @@
+/*************************************************************************************
+ DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING
+ IMPERIAL COLLEGE LONDON
+
+ EE 3.19: Real Time Digital Signal Processing
+ Dr Paul Mitcheson and Daniel Harvey
+
+ LAB 3: Interrupt I/O
+
+ ********* I N T I O. C **********
+
+ Demonstrates inputing and outputing data from the DSK's audio port using interrupts.
+
+ *************************************************************************************
+ Updated for use on 6713 DSK by Danny Harvey: May-Aug 2006
+ Updated for CCS V4 Sept 10
+ ************************************************************************************/
+/*
+ * You should modify the code so that interrupts are used to service the
+ * audio port.
+ */
+/**************************** Pre-processor statements ******************************/
+
+#include <stdlib.h>
+// Included so program can make use of DSP/BIOS configuration tool.
+#include "dsp_bios_cfg.h"
+
+/* The file dsk6713.h must be included in every program that uses the BSL. This
+ example also includes dsk6713_aic23.h because it uses the
+ AIC23 codec module (audio interface). */
+#include "dsk6713.h"
+#include "dsk6713_aic23.h"
+
+// math library (trig functions)
+#include <math.h>
+
+// Some functions to help with writing/reading the audio ports when using interrupts.
+#include <helper_functions_ISR.h>
+#include "Matlab/filter_coeff_2.txt"
+// Some functions to help with configuring hardware
+#include "helper_functions_polling.h"
+
+
+// PI defined here for use in your code
+#define PI 3.141592653589793
+#define N 249
+double x[N];
+
+/******************************* Global declarations ********************************/
+
+/* Audio port configuration settings: these values set registers in the AIC23 audio
+ interface to configure it. See TI doc SLWS106D 3-3 to 3-10 for more info. */
+DSK6713_AIC23_Config Config = { \
+ /**********************************************************************/
+ /* REGISTER FUNCTION SETTINGS */
+ /**********************************************************************/\
+ 0x0017, /* 0 LEFTINVOL Left line input channel volume 0dB */\
+ 0x0017, /* 1 RIGHTINVOL Right line input channel volume 0dB */\
+ 0x01f9, /* 2 LEFTHPVOL Left channel headphone volume 0dB */\
+ 0x01f9, /* 3 RIGHTHPVOL Right channel headphone volume 0dB */\
+ 0x0011, /* 4 ANAPATH Analog audio path control DAC on, Mic boost 20dB*/\
+ 0x0000, /* 5 DIGPATH Digital audio path control All Filters off */\
+ 0x0000, /* 6 DPOWERDOWN Power down control All Hardware on */\
+ 0x0043, /* 7 DIGIF Digital audio interface format 16 bit */\
+ 0x008d, /* 8 SAMPLERATE Sample rate control 8 KHZ */\
+ 0x0001 /* 9 DIGACT Digital interface activation On */\
+ /**********************************************************************/
+};
+
+
+// Codec handle:- a variable used to identify audio interface
+DSK6713_AIC23_CodecHandle H_Codec;
+
+ /******************************* Function prototypes ********************************/
+void init_hardware(void);
+void init_HWI(void);
+void ISR_AIC(void);
+short non_circ_fir(void);
+/********************************** Main routine ************************************/
+void main(){
+ // initialize board and the audio port
+ init_hardware();
+
+ /* initialize hardware interrupts */
+ init_HWI();
+
+ /* loop indefinitely, waiting for interrupts */
+ while(1) {};
+}
+
+/********************************** init_hardware() **********************************/
+void init_hardware()
+{
+ // Initialize the board support library, must be called first
+ DSK6713_init();
+
+ // Start the AIC23 codec using the settings defined above in config
+ H_Codec = DSK6713_AIC23_openCodec(0, &Config);
+
+ /* Function below sets the number of bits in word used by MSBSP (serial port) for
+ receives from AIC23 (audio port). We are using a 32 bit packet containing two
+ 16 bit numbers hence 32BIT is set for receive */
+ MCBSP_FSETS(RCR1, RWDLEN1, 32BIT);
+
+ /* Configures interrupt to activate on each consecutive available 32 bits
+ from Audio port hence an interrupt is generated for each L & R sample pair */
+ MCBSP_FSETS(SPCR1, RINTM, FRM);
+
+ /* These commands do the same thing as above but applied to data transfers to
+ the audio port */
+ MCBSP_FSETS(XCR1, XWDLEN1, 32BIT);
+ MCBSP_FSETS(SPCR1, XINTM, FRM);
+}
+
+/********************************** init_HWI() **************************************/
+void init_HWI()
+{
+ IRQ_globalDisable(); // Globally disables interrupts
+ IRQ_nmiEnable(); // Enables the NMI interrupt (used by the debugger)
+ IRQ_map(IRQ_EVT_RINT1,4); // Maps an event to a physical interrupt
+ IRQ_enable(IRQ_EVT_RINT1); // Enables the event
+ IRQ_globalEnable(); // Globally enables interrupts
+}
+
+/******************** INTERRUPT SERVICE ROUTINE ***********************/
+void ISR_AIC()
+{
+ unsigned int i;
+ short sample_in, sample_out;
+
+ sample_in = mono_read_16Bit();
+
+ for (i = N-1; i > 0; i--) {
+ x[i] = x[i-1];
+ }
+ x[0] = (float) sample_in / 32767.f;
+
+ sample_out = non_circ_fir();
+
+ mono_write_16Bit(sample_out);
+// mono_write_16Bit(sample_in);
+}
+
+//Convolve the
+short non_circ_fir()
+{
+/* double y[N + M - 1];
+ int i, M, j;
+ M = sizeof(b)/sizeof(b[0]);
+
+ for (i = 0; i < N + M - 1; i++) {
+ for (j = 0; j < i -1; j++) {
+ y[i] = y[i] + b[j]*h[i-j-1];
+ }
+
+ }*/
+ double y = 0;
+ int M, i;
+ M = sizeof(b) / sizeof(b[0]);
+ for(i = 0; i < N; i++) {
+ y += x[i] * b[M-i-1];
+ }
+ return y*32767;
+}
diff --git a/lab4/RTDSP/intio.c b/lab4/RTDSP/intio.c
index 6e19045..3798072 100644
--- a/lab4/RTDSP/intio.c
+++ b/lab4/RTDSP/intio.c
@@ -36,7 +36,7 @@
// Some functions to help with writing/reading the audio ports when using interrupts.
#include <helper_functions_ISR.h>
-#include "Matlab/filter_coeff_2.txt"
+#include "Matlab/filter_coeff.txt"
// Some functions to help with configuring hardware
#include "helper_functions_polling.h"
@@ -141,19 +141,10 @@ void ISR_AIC()
// mono_write_16Bit(sample_in);
}
-//Convolve the
+// Perform linear convolution
short non_circ_fir()
{
-/* double y[N + M - 1];
- int i, M, j;
- M = sizeof(b)/sizeof(b[0]);
-
- for (i = 0; i < N + M - 1; i++) {
- for (j = 0; j < i -1; j++) {
- y[i] = y[i] + b[j]*h[i-j-1];
- }
-
- }*/
+
double y = 0;
int M, i;
M = sizeof(b) / sizeof(b[0]);
@@ -162,3 +153,4 @@ short non_circ_fir()
}
return y*32767;
}
+