I.4.2
-
Upload
tinhyeudauth92 -
Category
Documents
-
view
213 -
download
0
description
Transcript of I.4.2
![Page 1: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/1.jpg)
MỤC LỤCMỤC LỤC.......................................................................................................................................1DANH MỤC HÌNH........................................................................................................................2DANH SÁCH CÁC BẢNG.............................................................................................................3DANH SÁCH TỪ VIẾT TẮT.........................................................................................................4MỤC TIÊU......................................................................................................................................5CHƯƠNG 1. TỔNG QUAN...........................................................................................................6
1.1 Sơ đồ khối của khối trích đặc trưng...................................................................................61.2. Giao diện và các kiến trúc chi tiết bên trong..................................................................8
CHƯƠNG 2. MÔ PHỎNG THIẾT KẾ..........................................................................................92.1 Tập các trường hợp kiểm tra...........................................................................................92.2 Giảng đồ xung clock mô phỏng thiết kế........................................................................10
CHƯƠNG 3. KẾT QUẢ ĐẠT ĐƯỢC..........................................................................................13KẾT LUẬN VÀ KIẾN NGHỊ.......................................................................................................15TÀI LIỆU THAM KHẢO.............................................................................................................16PHỤ LỤC......................................................................................................................................18
1
![Page 2: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/2.jpg)
DANH MỤC HÌNH
Hình 1.1 Sơ đồ khối của bộ trích đặc trưng……………………………………………………..6Hình 1.2 Sơ đồ khối tính biên độ………………………………………………………………...7Hình 1.3 Sơ đồ khối tính biên độ chi tiết………………………………………………………...7Hình 1.4 Giao diện khối MFCC vơi hệ số của khối Magnitude co thể thay đổi được…………8Hình 2.1 Biểu đồ so sánh giữa kết quả mô phỏng và kết quả lý thuyết………………………...9Hình 2.2 Kết quả mô phỏng dùng Sysnopsys………………………………………………… 10Hình 2.3 Kết quả mô phỏng dùng Synopsys…………………………………………………...11Hình 2.4 Kết quả mô phỏng dùng Modelsim…………………………………………………..12Hình 2.5 Kết quả mô phỏng dùng Modelsim…………………………………………………..12
2
![Page 3: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/3.jpg)
DANH SÁCH CÁC BẢNG
Bảng 1.1 Bảng chi tiết tín hiệu vào/ra khối tính biên độ……………………………………….7
Bảng 3.1 Bảng kết quả mô phỏng……………………………………………………………....13
3
![Page 4: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/4.jpg)
DANH SÁCH TỪ VIẾT TẮT
HDL Hardware Describe LevelADC Analog Digital ConvertRAM Random Acess Memory
MFCC Mel Frequency Cepstral Coefficient
FFT Fast Fourier Transforrm
4
![Page 5: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/5.jpg)
MỤC TIÊU
Thiết kế khối Tính Biên Độ bằng ngôn ngữ phần cứng (Verilog HDL - Linux) và kiểm tra, sửa lỗi, so sánh chức năng giữa phần cứng (Verilog HDL) và phần mềm (Matlab)
Nghiên cứu và thiết kế khối Tính Biên Độ bằng ngôn ngữ phần cứng Verilog
Xây dựng tập các trường hợp kiểm tra bằng ngôn ngữ mô tả phần cứng Verilog
Tiến hành kiểm tra bằng ngôn ngữ phần cứng và thống kê kết quả kiểm tra so với phần mềm Matlab
5
![Page 6: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/6.jpg)
CHƯƠNG 1. TỔNG QUAN
1.1 Sơ đồ khối của khối trích đặc trưng
Hình 1.1 Sơ đồ khối của bộ trích đặc trưng
Tiếp cận khối tính biên độ trong mô hình trích đặc trưng hình 1.1 MFCC cho thấy vị trí của khối này nằm giữa hai khối FFT và khối tình Filter_Bank.
Kiến trúc tổng quát về phần cứng cũng được nhắc lại trong phần tổng quan nhằm làm rõ đường dữ liệu và các bước tính toán
6
![Page 7: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/7.jpg)
Hình 1.2 Sơ đồ khối tính biên độ
Hình 1.3 Sơ đồ khối tính biên độ
Bảng 1.1 Bảng chi tiết tín hiệu vào/ra khối tính biên độ
Tên Loại Số bit Mô tả Ghi chú
Clk input 1 Nhận tín hiệu xung clock
Reset input 1 Reset hệ thống, tích cực mức thấp
sroot_en input 1 Chân cho phép, tích cực mức cao
regfft_outr input 40 Phần thực tín hiệu sau phép biến đổi FFT Lưu trong thanh ghi fft
regfft_outi input 40 Phần ảo tín hiệu sau phép biến đổi FFT Lưu trong thanh ghi fft
regffte_in output 41 Giá trị xấp xỉ biên độ số phức (64 giá trị) Kq: Spectrum Register
7
ABS
ABS
Bộ so sánh
40
40
40
40
40
4041
I
Q
QI ,max
QI ,min
jQI
sroot
clk
resetsroot_en
regfft_outrregfft_outi
regffte_in
clk
reset
en
regfftoutr
regfftouti
out
![Page 8: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/8.jpg)
1.2. Giao diện và các kiến trúc chi tiết bên trong
Giao diện của thiết kế khối Magnitude được nhắc lại ở hình vẽ sau
Hình 1.4 Giao diện khối MFCC vơi hệ số của khối Magnitude co thể thay đổi được
8
![Page 9: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/9.jpg)
CHƯƠNG 2. MÔ PHỎNG THIẾT KẾ2.1 Tập các trường hợp kiểm tra
Các trường hợp kiểm tra được thử nghiệm trên cả mô phỏng phần mềm (Matlab) và mô phỏng phần cứng (VCS và ModelSim) cho thấy kết quả chính xác trong thiết kế
Hình 2.4 Biểu đồ so sánh giữa kết quả mô phỏng và kết quả lý thuyết
Nhận xét: Từ biểu đồ 2.1 ta thấy kết quả đúng so với lý thuyết tuy có sai lệch so với lý thuyết nhưng vẫn chấp nhận được. Sai số do khi thực hiện phép tính biên độ bằng các công thức gần đúng nên cho kết quả sai số nhỏ.
9
![Page 10: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/10.jpg)
2.2 Giản đồ xung clock mô phỏng thiết kế
Hình 2.5 Kết quả mô phỏng dùng Sysnopsys
10
![Page 11: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/11.jpg)
Hình 2.6 Kết quả mô phỏng dùng Synopsys
11
![Page 12: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/12.jpg)
Hình 2.4 Kết quả mô phỏng dùng Modelsim
Hình 2.5 Kết quả mô phỏng dùng Modelsim
12
![Page 13: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/13.jpg)
CHƯƠNG 3. KẾT QUẢ ĐẠT ĐƯỢC
Bảng 3.1 Bảng kết quả mô phỏng
Ngõ Vào Ngõ Ra
regfftoutr=I regfftouti=Q Kết quả mô phỏng bằng Synopsys
Kết quả mô phỏng bằng Modelsim
Kết quả tính theo lý thuyết
-300 250 362 362 390
200 100 225 225 224
100 -200 225 225 224
300 150 337 337 335
-300 150 337 337 335
100 -150 175 175 180
100 300 325 325 316
-100 400 425 425 412
-400 -100 425 425 412
300 400 475 475 500
-300 -400 475 475 500
500 200 550 550 539
600 300 675 675 671
-100 -500 525 525 510
-200 250 Giữ giá trị trước đó (en=0)
Giữ giá trị trước đó (en=0) -
-250 -200 300 300 320
200 300 350 350 360
13
![Page 14: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/14.jpg)
20 40 0 (vì reset=0)
0 (vì reset=0) -
-100 -150 175 175 180
500 800 925 925 943
-800 1000 1200 1200 1281
1000 2000 2250 2250 2236
-2000 -3000 3500 3500 3606
524287 524287 655368 655368 741453
524287 -524288 655359 655359 741454
Bảng giá trị cho thấy sự sai lệch không đáng kể giữa phần cứng và phần mềm. Điều này cho thấy tính khả thi trong việc thực hiện phần cứng ở các bước vật lý sau đó
14
![Page 15: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/15.jpg)
KẾT LUẬN VÀ KIẾN NGHỊ
Kết Luận: Báo cáo đã xây dựng thành công kiến trúc phần cứng khối Tính Biên Độ
bằng ngôn ngữ phần cứng Verilog. Thiết kế này sẽ làm nền tảng cho các thiết kế khác tái sử dụng.
Báo cáo tổng hợp các kết quả mô phỏng thử nghiệm trên phần mềm VCS của Synopsys làm cơ sở đánh giá và so sánh.
Kiến Nghị Cần xây dựng thêm nhiều trường hợp kiểm tra để kết quả chính xác hơn. Các
trường hợp trong testbench cần đa dạng hơn để khảo sát thiết kế được tốt hơn.
Chủ nhiệm đề tài Đại diện cơ quan chủ trì đề tài (ký tên) (ký tên và đóng dấu)
TS.Hoàng Trang
15
![Page 16: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/16.jpg)
TÀI LIỆU THAM KHẢO
[1] Bạch Hưng Khang, “Nghiên Cứu Phát Triển Công Nghệ Nhận Dạng, Tổng Hợp và Xử Lý Ngôn Ngữ Tiếng Việt”, đề tài cấp Nhà Nước KC01-03, năm 2001-2004.
[2] Lương Chi Mai , “Nghiên cứu, phát triển một số sản phẩm tiêu biểu và thiết yếu về xử lý tiếng nói và văn bản tiếng Việt”, đề tài cấp Nhà Nước KC01.01/06-10, năm 2006 - 2010.
[3] Nguyễn Văn Giáp, Trần Việt Hồng, “Kỹ thuật nhận dạng tiếng nói và ứng dụng trong điều khiển”, Bộ môn Cơ điện tử - Khoa Cơ khí – Đại học Bách Khoa TPHCM
[4] Wei HAN, Cheong-Fat CHAN, Chiu-Sing CHOY and Kong-Pang PUN, “An Efficient MFCC Extraction Method in Speech Recognition”, Circuits and Systems, 2006. ISCAS 2006. IEEE International Symposium, May 2006, pages: 145-148
[5] Wei HAN, Cheong-Fat CHAN, Chiu-Sing CHOY and Kong-Pang PUN, “A Speech Recognizer with Selectable Model Parameters”, Circuits and Systems, 2005. ISCAS 2005. IEEE International Symposium, May 2005, pages: 5842-5845
[6] Carlos Asmat, David López Sanzo, Kanwen Wu, “Speech Recognition Using FPGA Technology”, Master thesis, University of McGill, 2007.
[7] Online: http://www.datasheetcatalog.com/datasheets_pdf/H/M/2/0/HM2007.shtml[8] Lawrence Rabiner, Biing - Hwuang Juang, “Fundamentals of Speech Recognition”, Prentice
Hall, 1993, ISBN 0-13015157-2.[9] Joe Tebelskis, “Speech Recognition using Neural Networks”, PhD thesis, Carnegie Mellon
University, 1995.[10] Fang Zheng, Guoliang Zhang, Zhanjiang Song, “Comparison of Different
Implementations of MFCC” , J. Computer Science & Technology, 16(6):582-589, Sept. 2001[11] Chin Kim On, Paulraj M. Pandiyan, Sazali Yaacob, Azali Saudi, “Mel-Frequency
Cepstral Coefficient Analysis in Speech Recognition”, International Conference on Computing & Informatics, 2006. ICOCI '06., pp.1-5.
[12] Sung-Nam Kim, In-Chul Hwang, Young-Woo Kim, Soo-Won Kim, “A VLSI chip for isolated speech recognition system”, IEEE Transactions on Consummer Electronics, vol.42, No.3, 1996, pp.458-467.
[13] HAN Wei, “A Speech Recognition IC with an Efficient MFCC Extraction Algorithm and Multi-mixture Models”, the Chinese University of Hong Kong, Doctor of philosophy thesis, September 2006
[14] J. Markel and A.H. Gray, Jr., Linear Prediction of Speech, Springer-Verlag,New York, New York, USA, 1980.
[15] B.S. Atal, “Predictive Coding of Speech at Low Bit Rates,” IEEE Transactions on Communications, vol. 30, no. 4, pp. 600-614, April 1982.
[16] J. Campbell and T.E. Tremain, “Voiced/ Unvoiced Classification of Speech with Applications to the U.S. Government LPC-10E Algorithm,” in Proceedings IEEE International Conference on Acoustics, Speech, and Signal Processing, pp. 473-476, Tokyo, Japan, April 1986.
[17] B.S. Atal and J.R. Remde, “A New Model of LPC Excitation for Producing Natural Sounding Speech at Low Bit Rates,” in Proceedings IEEE International Conference on Acoustics, Speech, and Signal Processing, pp. 614-617, Paris, France, 1982.
16
![Page 17: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/17.jpg)
[18] V.R. Viswanathan and J. Makhoul, “Quantization Properties of Transmission Parameters in Linear Predictive Systems,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 23, no. 3, pp. 309-321, June 1975.
[19] B.S. Atal, “Linear Prediction For Speaker Identification,” Journal of the Acoustical Society of America, vol. 55, no. 6, pp. 1304-1311, June 1974
[20] G.R. Doddington, J. Picone, and J.J. Godfrey, “The LPC trace as an HMM development tool,” Journal of the Acoustical Society of America, Vol. 84, pg. S1-561A, Fall 1988.
[21] Joseph W. Picone , “Signal Modeling Techniques in Speech Recognition”, Proceedings of the IEEE, vol.81, No.9, 1993, pages: 1215-1247
[22] R. G. Lyons, Addison Wesley, “Understanding Digital Signal Processing” ,1997, ISBN 0-201-63467-8
[23] M.A.Anusuya , S.K.Katti “Speech Recognition by Machine: A Review” International journal of computer science and Information Security, 2009.
[24] Kenneth Thomas Schutte “Parts-based Models and Local Features for Automatic Speech Recognition” B.S., University of Illinois at Urbana-Champaign (2001).
[25] Hoang Trang, Vo Quoc Viet, Nguyen Ly Thien Truong, “FPGA Architecture of HMM-based Decoder Module in Speech Recognizer”, IEEE- International Conference on Control, Automation and Information Sciences (ICCAIS) 2012.
[26] L.R. Rabiner, “A Tutorial on Hidden Markov Models And Selected Applications In Speech Recognition,” in Proceedings of the IEEE, vol. 77, no. 2, pp. 257-285, February 1989.
[27] J.G. Wilpon, C.H. Lee, and L.R. Rabiner, “Application of Hidden Markov Models for Recognition of a Limited Set of Words in Unconstrained Speech,” in Proceedings IEEE International Conference on Acoustics, Speech, and Signal Processing, pp. 254-257, Glasgow, Scotland, 1989.
[28] J. Pihl, T. Svendsen, M. H. Johnsen , “A VLSI Implementation of Pdf Computations in HMM-Based Speech Recognition”, , Proceedings of the IEEE Region Ten Conference on Digital Signal, Processing Applications (TENCON'96), Nov. 1996
[29] Jer Min Jou, Yeu-Horng Shiau, Chen-Jen Huang, “An Efficient VLSI Architecture for HMM-Based Speech Recognition”, Electronics, Circuits and Systems, 2001. ICECS 2001. The 8th IEEE, International Conference on, Volume: I ,2-5 Sept. 2001
[30] S. J. Melnikoff, S. F. Quigley, M. J. Russell, “Performing Speech Recognition on Multiple Parallel Files Using Continuous Hidden Markov Models on an FPGA”, International Conference on Field Programmable Logic and. Applications, 2002, pages: 202-211
[31] Wei Han; Kwok-Wai Hon; Cheong-Fat Chan; Tam Lee; Chiu-Sing Choy; Kong-Pang Pun; Ching, P.C., “An HMM-Based Speech Recognition IC”; Circuits and Systems, 2003. ISCAS '03. Proceedings of the 2003 International Symposium on , Volume: 2 , May 25-28, 2003, page(s): 744 -747
[32] Meng Yuan, Tan Lee, Ching, P.C., “Speech Recognition on DSP: Issues on Computational Efficiency and Performance Analysis”, Communications, Circuits and Systems, 2005. Proceedings. 2005, International Conference on, Volume 2, 27-30 May 2005.
[33] Sujuan Ke, Yibin Hou, Zhangqin Huang, Hui Li, “A HMM Speech Recognition System Based on FPGA”, IEEE computer society, 2008.
17
![Page 18: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/18.jpg)
PHỤ LỤCCode
//sroot.v
//|I+jQ|~max{|I|,|Q|}+1/4*min{|I|,|Q|}
module sroot(regfftoutr,regfftouti,out,en,clk,reset);// 41bit cla
input [39:0]regfftoutr,regfftouti;
input en,clk,reset;
output [40:0]out;
reg [40:0]out;
wire [40:0]tout;
wire [39:0]inr,ini;
wire [40:0]in1,in2;
wire [41:0]tout1;
assign inr={regfftoutr[39]}?~regfftoutr+1:regfftoutr;//|I|-->absolute values of the real
part
assign ini={regfftouti[39]}?~regfftouti+1:regfftouti;//|Q|-->absolute values of the
imaginary part
assign in1=(inr>ini)?{1'b0,inr}:{3'b0,inr[39:2]};//max{|I|,|Q|}
assign in2=(inr>ini)?{3'b0,ini[39:2]}:{1'b0,ini};//min{|I|,|Q|}/4
cla41 cla41(tout1,in1,in2);
assign tout=tout1[40:0];
always@(posedge clk or negedge reset)
18
![Page 19: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/19.jpg)
begin
if(reset==0)
begin
out<=0;
end
else
begin
if(en==1)
out<=tout;
end
end
endmodule
//submodule cla41//
module cla41(S,A,B);
parameter WIDTH=41;
input [WIDTH-1:0]A,B;
output reg [WIDTH:0]S;
reg [WIDTH:0] C;
reg [WIDTH-1:0] G,P;
integer ii;
always @* begin
C[0] = 1'b0;
for(ii=0;ii<WIDTH;ii=ii+1)
begin
G[ii] = A[ii] & B[ii];
19
![Page 20: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/20.jpg)
P[ii] = A[ii] ^ B[ii];
C[ii+1] = G[ii] | (P[ii]&C[ii]);
S[ii] = P[ii] ^ C[ii];
end
S[WIDTH] = C[WIDTH];
end
endmodule
• Code Testbench
//sroot_tb.v
module sroot_tb;
//khai bao bien ngo vao
reg clk;
reg reset;
reg en;
reg [39:0]regfftoutr;
reg [39:0]regfftouti;
//khai bao bien ngo ra
wire [40:0]out;
//goi module test
sroot sroot(regfftoutr,regfftouti,out,en,clk,reset);
//gan gia tri ngo vao
initial
begin
clk=1'b0;
20
![Page 21: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/21.jpg)
reset=1'b0;
en=1'b0;
regfftoutr=0;
regfftouti=0;
#8
reset=1'b1;
en=1'b1;
regfftoutr=10;
regfftouti=100;
#20
en=1'b0;
regfftoutr=-200;
regfftouti=250;
#20
en=1'b1;
regfftoutr=45;
regfftouti=-300;
#20
regfftoutr=-10;
regfftouti=-50;
#20
reset=1'b0;
regfftoutr=20;
regfftouti=40;
#20
reset=1'b1;
regfftoutr=120;
regfftouti=80;
#20
21
![Page 22: I.4.2](https://reader036.fdocuments.net/reader036/viewer/2022062819/5695d1ab1a28ab9b02977320/html5/thumbnails/22.jpg)
reset=1'b1;
regfftoutr=-400;
regfftouti=30;
#20 $finish;
end
always
#10
clk=~clk;
endmodule
22