首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
ELEC6234 代做、代写 java/Python 程序
项目预算:
开发周期:
发布时间:
要求地区:
ELEC6234 Embedded Processor Synthesis
ELEC6234 Embedded Processor Synthesis
Coursework
SystemVerilog Design of an Application Specific Embedded
Processor
Introduction
This exercise is done individually and the assessment is:
?
By formal report describing the final design, its development, implementation and
testing.
?
By a laboratory demonstration of the final design on an Altera FPGA development system
Use the following code for the top-level module picoMIPS4test.sv and the clock divider
counter.sv. The purpose of the clock divider is to eliminate bouncing effects of the
mechanical switches which are used to input data as outlined by the pseudocode below.
File picoMIPS4test.sv:
// synthesise to run on Altera DE1 for testing and demo
module picoMIPS4test(
input logic fastclk,
// 50MHz Altera DE0 clock
input logic [9:0] SW, // Switches SW0..SW9
output logic [7:0] LED); // LEDs
logic clk; // slow clock, about 10Hz
counter c (.fastclk(fastclk),.clk(clk)); // slow clk from counter
// to obtain the cost figure, synthesise your design without the counter
// and the picoMIPS4test module using Cyclone V 5CSEMA5F31C6 as target
// and make a note of the synthesis summary
picoMIPS myDesign (.clk(clk), .SW(SW),.LED(LED));
endmodule
File counter.sv:
// counter for slow clock
module counter #(parameter n = 24) //clock divides by 2^n, adjust n if
necessary
(input logic fastclk, output logic clk);
logic [n-1:0] count;
always_ff @(posedge fastclk)
count <= count + 1;
assign clk = count[n-1]; // slow clock
endmodule
2
ELEC6234 Embedded Processor Synthesis
The objective of this exercise is to design an 8-bit implementation of an application specific
picoMIPS which implements the 1-dimensional gaussian smoothing convolution algorithm
described below using the smallest possible hardware. A NISC implementation is also
allowed.
You may modify the picoMIPS architecture extensively if it helps to reduce the cost figure
(defined below). However, when modifying the architecture, bear in mind that a processor
is still required to implement the required gaussian convolution algorithm, not a dedicated
hardware design. A processor is characterised by the presence of two separate and
discernible parts: the control path and the data processing path. The control path should
contain a program memory which stores the machine program of the algorithm.
Figure 1.
picoMIPS general architecture..
The design should be as small as possible in terms of FPGA resources but sufficient to
implement the application described below.
The size cost function of the design is defined
as follows:
Cost = number of ALMs (Adaptive
Logic Modules) used + 500*max(0,number Variable
Precision DSP Blocks in 9x9 multiplier mode used – 2) +30 x Kbits of RAM used
Each ALM has 2 flip-flops hence flip-flops are included in the above cost figure. The cost
figure should be calculated for Altera Cyclone V SoC 5CSEMA5F31C6 device (i.e. the Altera
FPGA on the DE1 Development Kit) and should be as low as possible.
If one DSP block in 9x9
multiplier mode is used in your implementation, up to three 9x9 multipliers that the block
can provide are ‘free’, i.e. they do not contribute to the size cost.
. You may not use any
other hardware in the DSP blocks in your design, just the multipliers.
To demonstrate the
cost figure of your design show in your report Altera Quartus synthesis statistics for Cyclone
V SoC 5CSEMA5F31C6.
!" #$ !"#$"%&' ()"* +','-'./ 0)$1'+2&'-'3/ 456 "%&'(%) *++(,-- ./'/ 0+ 0- 1+2+/'/ 0+2+/'/ 0-2+/'/ 0,-3)' * 4 .,5%+,( *67283&5'9%&0,:-2;(9', !"<5%&'(%) =&L=&L =&L =9L=?L *6728)/:- *6728)/:- =&@$ABL<9CC,+9/',=?@$ABL7*38'04(' +23'-'3/ 0*F< ;(9', 1+/'/ *++(,-- 0+/'/ 9CC +(,-
3
ELEC6234 Embedded Processor Synthesis
To facilitate lab demonstrations and the cost figure calculation, structure your design as
shown in Figure 2 below.
Calculate the cost figure only for the picoMIPS module which you
develop.
Figure 2. Synthesised design structure.
ELEC6234 lecture slides will describe the picoMIPS architecture in detail and provide
SystemVerilog coding suggestions for the picoMIPS blocks.
An additional functionality to
input 8-bit data and to output 8-bit results will be required as described below.
You may
design your own instruction set and modify the instruction format in any way you wish. You
may also modify the architecture if it helps to reduce the cost figure. However, when
modifying the architecture, bear in mind that a processor is still required to implement the
affine transformation algorithm outlined below, not a dedicated hardware design. A
processor is characterised by the presence of two separate and discernible parts: the
control path and the data processing path. The control path should contain a program
memory which stores the machine program of the algorithm.
!"#$%&!'()*+) ,)$-.I*0*I12$34I*5 6$47)*8 ,#I$#913"0"3*81:$81I;<1 )*+)+5 -"#$%&!' ,=$481-"#$%&!'13*+">75 ?*+)<*7#@ ,:$81+"24I;)"$71$7I=5 '=7)@*+"+*31 @;83A;8*
4
ELEC6234 Embedded Processor Synthesis
One dimensional Gaussian smoothing
There are many methods of smoothing noisy waveforms but here we want to implement a
process of averaging data points in a noisy waveform with their neighbouring data points
using convolution. The desired effect is blurring rapid transitions, i.e. reducing the noise in
the data. Smoothing
can be compared to low pass filtering because it removes high
frequency components from the noisy waveform’s spectrum. The convolution in Gaussian
smoothing, a.k.a as Gaussian blur,
is a mathematical operation on the noisy waveform and
a Gaussian kernel as explained below.
We start with the Gaussian distribution (or normal
distribution) function which will define the convolution kernel to be applied to each sample
of the waveform. In one dimension the Gaussian function has the following form.
() = 1√2! " #!!$!
For
= 1 the Gaussian distribution function has the following form:
Figure 1. Gaussian distribution function.
The kernel is usually obtained from the Gaussian distribution by selecting a small number of
discrete points and sometimes scaling them to
amplify or attenuate the convolution result
as desired.
In this coursework we will use the following 5-point Gaussian kernel: [0.1358,
0.2284, 0.2717, 0.2284, 0.1358]. To avoid fractions, we
will scale the kernel by 7 bits, i.e.
each value is multipled by 128. So the kernel we will use in our calculations is:
K=[17,29,35,28,17]
In 8-bit 2’s complement binary notation these five kernel values are: 00010001, 00011101,
00100011, 00011101, 00010001 or in hexadecimal: 11,1D,23,1D,11.
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 -4 -3 -2 -1 0 1 2 3 4
5
ELEC6234 Embedded Processor Synthesis
The corresponding graph of the kernel before scaling is:
Figure 2. 5-point Gaussian kernel.
The noisy waveform to be smoothed is a sine wave consisting of 256 samples with a random
number added to each sample to represent the noise. It looks as follows.
Figure 3. Noisy waveform W[i].
The waveform has been scaled to fit the 8-bit 2’s complement integer range so that it’s samples can
be represented as 256 integer numbers in the range [-128..+127]. . A file, named wave.hex ,with the
waveform values represented in hexadecimal notation, ready to be synthesised as a ROM memory in
SystemVerilog,
is
provided on the notes website.
Now, the convolution which will create a smoothed waveform S[i], where i=0..255,
is performed on
each sample W[i] and it’s adjacent samples as follows:
S[i] = W[i-2]*K[0]+W[i-1]*K[1]+W[i]*K[2]*W[i+1]*K[3]+W[i+2]*K[4]
Your task is to design a processor which will read the index i
from an input port, then it will execute
the above equation using 8-bit 2’s complement arithmetic to obtain the value of the smoothed
waveform’s sample S[i] and finally it will output the 8-bit sample S[i] on the FPGA kit LEDs. In
calculating the multiplications, reject the lower 8-bits from the 16-bit double length product. In
0.0000 0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 -3 -2 -1 0 1 2 3 -150 -100 -50 0 50 100 150 0 50 100 150 200 250 300
6
ELEC6234 Embedded Processor Synthesis
additions ignore all overflows. Details of the algorithm you are required to implement are given in
the next section.
As a matter of interest, the entire smoothed waveform when the above Gaussian smoothing
algorithm is applied to each sample W[i], i=0..255, will look as follows:
Figure 4. Smoothed waveform S[i] resulting from the convolution.
Implementation of Gaussian smoothing on a picoMIPS
You are required to develop both a smallest possible picoMIPS architecture and a machine- level program for the Gaussian smoothing as explained in the previous section.
The waveform defined in the file wave.hex must be stored in a ROM memory. The five
values of the Gaussian kernel, scaled as shown above,
can be stored in a ROM or,
alternatively, can be represented as immediate 8-bit literals in the program instructions. In
the pseudocode below the sample index i are read from the switches SW0-SW7 on the FPGA
development system and the resulting smoothed sample S[i] is displayed on the LEDS LED0- LED7.
Switch SW8 provides handshaking functionality as described in the pseudocode.
Switch SW9 should act as an active low reset.
During lab demonstrations and testing values of index i
will be in the range 2..253. The
waveform has 256 samples numbered 0..255 but the 5-point convolution cannot be
performed on samples 0,1 and 254,255.
Once the index i is read from the input port, your
program should extract the corresponding sample W[i] from the ROM memory as well as
the adjacent samples W[i-2], W[i-1], W[i+1] and W[i+2] needed for the convolution and
should calculate and display on the LEDs
sample S[i] of the smoothed waveform. Then the
program should loop back to the start and wait for another value of index i to be entered.
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 50 100 150 200 250 300
7
ELEC6234 Embedded Processor Synthesis
Pseudocode
1. Wait by polling the switch SW8 until the index i is entered on the switches SW0-SW7.
Wait while SW8=0. When SW8 becomes 1 (SW8=1) read the index i from SW0-SW7.
2. Execute the Gaussian convolution equation for sample W[i] of the noisy waveform and
display the result S[i] on LED0-LED7.
3. Wait until SW8 becomes 0 while displaying the result.
4. Go to step 1.
Input/Output
The input/output functionality can be implemented in several different ways. For example,
you can design your own IN and OUT instructions for reading/writing data using external
ports.
To use fewer hardware resources, you can consider connecting the ALU output, or a
register output, directly to the LEDs.
You could consider dedicating a specific register
number, e.g.
register 1 to the input port.
In this way, an ADD instruction can be used to
read data, e.g. ADD %5, %0, %1 would store the input data in register %5.
Be creative and
use your imagination!
Design strategy
Develop SystemVerilog code and a separate testbench for each module in your design.
Simulate each module in Modelsim. Synthesise each module in Altera Quartus and carefully
analyse the synthesis warnings, statistics and RTL diagrams.
When you are satisfied that all
your picoMIPS modules are correct, write a testbench for the whole design and simulate.
Synthesise the whole design and again, carefully analyse the warnings, statistics and RTL
diagrams.
Test your design either at home or in the laboratory. In Week 10 or 11 (after the
Easter Break) you will be asked to demonstrate your design in the Electronics Laboratory.
Further information concerning lab demos will be published on the ELEC6234 notes website
in due course.
FPGA Development Kit loan
You will be allowed to loan an FPGA development kit from the Electronics Laboratory in
Zepler and use it until the lab demo in May. The Laboratory Team will send separate emails
with details when the FPGA Kits should be collected and returned.
Formal report
Submit an electronic copy of your report through the electronic handin system by the
deadline specified on the ELEC6234 notes website.
The report should follow the report
template, which will be provided, and the text should not exceed 1500 words in length.
SystemVerilog source files must be packaged in a zip file and submitted electronically as a
separate file at the same time.
In this exercise, 20% of the marks are allocated to the
report, its style and organisation, with the remaining 80% for the technical content. As
always, bonus marks are awarded for implementation of novel concepts.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
cs111编程代写、c++语言程序代...
2025-04-16
metr3100代做、c/c++,java程序...
2025-04-16
cse 231代写、代做python编程设...
2025-04-16
bms5010代做、代写python/java...
2025-04-16
代做acof001 assessment task ...
2025-04-16
代写comp285/comp220 lab test...
2025-04-16
代写fundamental ai and data ...
2025-04-16
代做la906 international inve...
2025-04-16
代做mech60132 advanced manuf...
2025-04-16
代写idbqm001 quantitative me...
2025-04-16
代写econ372 2025fc assignmen...
2025-04-16
代做biology 4405b short scie...
2025-04-16
代写acfi 2070 business finan...
2025-04-16
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!