0.2 Lab 1: lab  (Page 2/3)

 Page 2 / 3

Part 1: single-channel fir filter

In this section, you will implement the 20-tap FIR filter. Edit `filtercode.asm` to use the coefficients for this filter by making several changes.

First, the length of the FIR filter for this exercise is 20, not 8. Therefore, you need to change `FIR_len1` to 20. `FIR_len1` is set using the `.set` directive, which assigns a number to a symbolic name. You will need to change this to `FIR_len1 .set 20` .

Second, you will need to ensure that the `.copy` directive brings in the correct coefficients. Change the filename to point to the file that contains the coefficientsfor your first filter.

Third, you will need to modify the `.align` and `.space` directives appropriately. The TI TMS320C55x DSP requires that circular buffers, which are usedfor the FIR filter coefficient and state buffers, be aligned so that they begin at an address that is a multiple of a powerof two greater than the length of the buffer. Since you are using a 20-tap filter (which uses 20-element state andcoefficient buffers), the next greater power of two is 32. Therefore, you will need to align both the state andcoefficient buffers to an address that is a multiple of 32. (16-element buffers would also require alignment to a multipleof 32.) This is done with the `.align` command. In addition, memory must be reserved for the state buffer. Thisis done using the `.space` directive, which takes as its input the number of bits of space to allocate. Therefore, to allocate 20 words of storage, usethe directive `.space 16*20` as shown below:

```1 .align 32 % Align to a multiple of 32 2 coef1 .copy "coef1.asm" % Copy FIR filter coefficients3 4 .align 32 % Align to a multiple of 325 inputBuffer .space 16*20 % Allocate 20 words of data space```

Assemble your code, load the output file, and run. Ensure that it is has the correct frequency response. After you have verifiedthat this code works properly, proceed to the next step.

Part 2: assembly function calls from c

So far you have been working exclusively in your `filtercode.asm` file, where the FIR filtering is taking place. In this part, you will be exposed to some of the C code that is required to setup the hardware peripherals. Your goal will be to write C code to change how the filtered output and raw input are sent to the output channels.

You may have noticed that your assembly code seems to automatically run every time a new input sample is ready to be processed. How does the system know to run the assembly routine when new samples are waiting? The answer lies in an interrupt , a signal sent by the hardware alerting the processor that new samples are ready to be processed.

Open `main.c` , and find the function named `HWI_RINT0` . This is the function that is called each time the DSP receives a hardware interrupt,signaling the presence of new input samples. You can see that `input[0]` and `input[1]` receive the samples from the four input channels, and then `filter()` is called, beginning your assembly routine in `filtercode.asm` . After the assembly function returns back into the C code, `output[0]` and `output[1]` hold your four output samples.

The `output[0]` variable is a 32-bit integer. Channel 1 and 2 outputs are expected in the top 16 bits and bottom 16 bits, respectively. Likewise, channels 3 and 4 are expected in the top and bottom 16 bits of `output[1]` .

ok let me know some of the questions please.
Effah
ok am not wit some if den nw buh by tommorow I shall get Dem
Hi guys can I get Adam Smith's WEALTH OF NATIONS fo sale?
Ukpen
Wat d meaning of management
disaster management cycle
cooperate social responsibility
igwe
Fedric Wilson Taylor also define management as the act of knowing what to do and seeing that it is done in the best and cheapest way
OLANIYI
difference between microeconomics and macroeconomic
microeconomics is the study of individual units, firm and government while macroeconomics is the study of the economic aggregates.
okhiria
The classical theory of full employment
Lovely
what is monopoli power
the situation that prevails when economic forces balance so that economic variables neither increase nor decrease
Bombey
what is equilibrium
Kabir
what are the important of economic to accounting students with references
Economics is important because it helps people understand how a variety of factors work with and against each other to control how resources such as labor and capital get used, and how inflation, supply, demand, interest rates and other factors determine how much you pay for goods and services.
explain the steps taken by the government in developing rural market?
contribution of Adam smith in economics
I will join
Dexter
I will join
Patrick
Hey
Fatima
Hey
Amir
Hello
AS
hey
Umarou
I love this book and i need extra Economic book
Amir
Hey
Amir
what's happening here
AS
I love this book and i need extra Economic book
Amir
what is the meaning of function in economics
Pls, I need more explanation on price Elasticity of Supply
Is the degree to the degree of responsiveness of a change in quantity supplied of goods to a change in price
Afran
what is production
Humaira
Okay what is land mobile and land unmobile
scor
And what are the resources in land
scor
the proces of using the services of labor and equipmnt together with other in puts to make goods and services availble
Bombey
Okay what is land mobile and land unmobile
scor
Discuss the short-term and long-term balance positions of the firm in the monopoly market?
hey
Soumya
hi
Mitiku
how are you?
Mitiku
can you tell how can i economics honurs(BSC) in reputed college?
Soumya
through hard study and performing well than expected from you
Mitiku
what should i prepare for it?
Soumya
prepare first, in psychologically as well as potentially to sacrifice what's expected from you, when I say this I mean that you have to be ready, for every thing and to accept failure as a good and you need to change them to potential for achievement of ur goals
Mitiku
parna kya hai behencho?
Soumya
Hallo
Rabindranath
Hello, dear what's up?
Mitiku
cool
Momoh
good morning
Isaac
pls, is anyone here from Ghana?
Isaac
Afran
Afran
Hello
OLANIYI
pls anyone from Nigeria
OLANIYI
am a new candidate here, can someone put me 2ru
OLANIYI
hello
OLANIYI
Pls economic A level exam tomorrow pls help me
akinwale
am from Ghana
Jacob
Pls economic A level exam tomorrow pls help me
akinwale
Hi
Dev
bol Diya discuss ab krega v
Dev
hello Mr. Rabindranath
Dev
what do you want Dimlare
Dev
yes tell me your desire to have it
Dev
to have what?
OLANIYI
Good luck
JOSEPH
I want to know about economic A level tomorrow pls help
Lerato
okay
Umarou
okay
Umarou
hi
Humaira
hi
Liaqat
what is firms
A firm is a business entity which engages in the production of goods and aimed at making profit.
What is autarky in Economics.
what is choice
So how is the perfect competition different from others
what is choice
Tia
1
Naziru
2
Mayor
Difference between extinct and extici spicies
While the American heart association suggests that meditation might be used in conjunction with more traditional treatments as a way to manage hypertension
Researchers demonstrated that the hippocampus functions in memory processing by creating lesions in the hippocampi of rats, which resulted in ________.
The formulation of new memories is sometimes called ________, and the process of bringing up old memories is called ________.
Got questions? Join the online conversation and get instant answers!