7.2 Lab 4: lab  (Page 6/7)

 Page 6 / 7

Compile your project before looking at the resulting assembly file and investigating the differences between each block. Be sure to reference page 3-32 of the DSP Programmer's Guide to findout what the state of the FRCT and OVM bits are. Run this program on the DSP, halt the program, and compare theoutput values in a memory window. Does each block work properly for all possible values?

A working program can be produced by compiling the C code and linking assembly modules and the core module. The compilertranslates C code to a relocatable assembly form. The linker assigns physical addresses on the DSP to the relocatable dataand code segments, resolves .global references and links runtime libraries.

Close the mathex project and go back to the original Lab 4 project. In the future if there are additional source code files to include in the project, just follow the above instructions. Once you have completed lab4.c and c_fft_given.asm , select Project->Rebuild All . Load the output file onto the DSP as usual and confirm that valid FFTs are calculated. Once valid output is obtained, measure howmany clock cycles it takes to compute both the assembly and C FFT.

Quiz information

From your prelab experiments, you should be able to describe the effect of windowing and zero-padding on FFT spectralanalysis. In your DSP system, experiment with different inputs, changing $N$ and the type of window. Can you explain what happens as the input frequency is increased beyond the Nyquist rate? Does the $\left|X(k)\right|^{2}$ coincide with what you expect from Matlab? What is the relationship between the observed spectrum and the DTFT?What would happen if the FFT calculation takes longer than it takes to fill inputs with $N$ samples? How long does it take to compute each FFT? What are the tradeoffs between writing code in C versus assembly?

Appendix a:

#include "dsk5510_dual3006cfg.h" #include "dsk5510.h" #include "swi_process.h" #include "dsplib.h" #define N 1024 #define logN 10 #include "window.h" /* comment the next line to use DSPLIB fft */ //#define C_FFT #ifdef C_FFT /* Use C FFT */ /* function defined in lab4fft.c */ void fft(void); /* FFT data buffers */ int real[N]; /* Real part of data */ int imag[N]; /* Imaginary part of data */ #include "lab4fft.c" #else /* Use DSPLIB FFT */ /* Function defined by c_fft_given.asm */ void bit_rev(void); /* FFT data buffers (declared in c_fft_given.asm) */ extern int bit_rev_data[N*2]; /* Data output for bit-reverse function */ extern int fft_data[N*2]; /* In-place FFT & Output array */ #endif /* C_FFT */ // all data processing should be done in SWI_ProcessBuffer void SWI_ProcessBuffer() { static unsigned int mbox_value = 0; short *psrc, *pdest; unsigned int i; mbox_value |= SWI_getmbox(); // buffers are only processed when both transmit and receive are ready if((mbox_value & DMA_RECEIVE_DONE) && (mbox_value & DMA_TRANSMIT_DONE)) { mbox_value = 0; // get buffer pointers psrc = receive_buffer[receive_buffer_to_process_index]; pdest = transmit_buffer[transmit_buffer_to_fill_index]; // samples are interleaved in input buffer 3-4-1-2 // output buffer is organized 3-4-1-2-3-4-1-2 // The following code would copy input from each input channel to the // respective output channel: /* for (i = 0; i < 1024; i++) { pdest[4*i] = psrc[4*i]; //channel 3 output is channel 3 input pdest[4*i+1] = psrc[4*i+1]; //channel 4 output is channel 4 input pdest[4*i+2] = psrc[4*i+2]; //channel 1 output is channel 1 input pdest[4*i+3] = psrc[4*i+3]; //channel 2 output is channel 2 input } */ #ifdef C_FFT /* Use C FFT */ /* I n s e r t c o d e t o f i l l */ /* C F F T b u f f e r s */ #else /* Use DSPLIB FFT */ /* I n s e r t c o d e t o f i l l */ /* a s s e m b l y F F T b u f f e r s */ #endif /* C_FFT */ #ifdef C_FFT /* Use C FFT */ /* Multiply the input signal by the Hamming window. */ /* . . . i n s e r t C / a s m code . . . */ /* Bit-reverse and compute FFT in C */ fft(); /* Now, take absolute value squared of FFT */ /* . . . i n s e r t C / a s m code . . . */ /* Last, set the DC coefficient to -1 for a trigger pulse */ /* . . . i n s e r t C / a s m code . . . */ /* done, wait for next time around! */ #else /* Use DSPLIB FFT */ /* Multiply the input signal by the Hamming window. */ /* . . . i n s e r t C / a s m code . . . */ /* Compute FFT using DSPLIB function */ cfft((DATA *)fft_data,N, SCALE); /* Bit reverse using assembly function */ bit_rev(); /* Now, take absolute value squared of FFT */ /* . . . i n s e r t C / a s m code . . . */ /* Last, set the DC coefficient to -1 for a trigger pulse */ /* . . . i n s e r t C / a s m code . . . */ /* done, wait for next time around! */ #endif /* C_FFT */ receive_buffer_processed = 1; // flag receive buffer as processed transmit_buffer_filled = 1; // flag output buffer as full } }

Do somebody tell me a best nano engineering book for beginners?
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
what is the Synthesis, properties,and applications of carbon nano chemistry
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!