Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

CWK 1: Worksheet

Real-Time Filter Coding and Testing

Learning outcomes assessed:


 Ability to code a real-time fixed-point filter implementation efficiently on a
given micro-controller platform.
 Ability to calculate the timing of the software
 Ability of the student to understand and determine how the makeup and timing
of the code will affect the maximum real-time throughput of the filter.
 Ability of the student to write code to handle n-bit fixed point arithmetic on a
given micro-controller architecture
 Ability of the student to explain the limitations of a given data-path architecture
in respect to overall performance i.e. speed.
 Ability of the student to discuss alternative microprocessor architectures and
how the overall performance could be uplifted using such an alternative
architecture.

Description of TASK to be completed by each group:


 Each group will be given a filter structure to use and the number of bits to use
for the filters n-bit saturation logic arithmetic. (see separate filter structures
pdf document on Blackboard)
o You will need to use: Sign Extension, sign protection, n-bit arithmetic
handling, n-bit saturation logic
 The group must write code to implement the filter structure given to them
using n-bit saturation logic arithmetic. For your arithmetic you should allow for
2 binary fractional bits i.e. ½ and ¼. For example for a 10 bit number, bits 9 to
2 will represent the signed integer value and bits 1 and 0 the fractional value
if any.
 In all solutions you should assume that the input value x(t) is a 8-bit signed
integer value that can have a value between -128 and 127.
 The group must determine the worst case number of instruction cycles that
the real-time loop of the filter takes and determine the maximum possible
input sample rate for real-time processing. You should try to minimise the
worst case number of instruction cycles by coding the filter in the most
efficient way possible.
 You must also simulate the code and verify its operation using the following
inputs:

o x(k) = {1,0,0,0,0,0,0,0,0……..)  impulse response


o x(k) = {1,1,1,1,1,1,1,1,1……}  step response
o x(k) = {-2,2,-2,2,-2,-2……..}  Nyquist response
o x(k) = {127,127,127 ………………….}
o x(k) = (-125, -125, -125 ……………..}

Deliverables:
 Group report detailing filter structure, code design & implementation, timing and
testing results.
o Important Note: To gain maximum marks the group should critically
evaluate the efficiency of the code written and the simulated results and
fully discuss them.
 Within the report there must also be a critical discussion of how an alternative
architecture such as the TI controller, Blackfin controller or PIC18 could help
reduce the number of cycles required. This discussion should be backed up with
examples.

Deadline: 5pm on Wednesday 3rd February 2021


You must submit the proof read, spell checked report using the submission link for
this coursework on the Gradebook site. I will provide more details closer to the
deadline regarding the submission of the groups report. Make sure that you include
the following information on the front of the report:
 Assessment Title: CWK 1 Report: Real-Time Filter Implementation
 Group name
 Group members

You might also like