THIẾT kế CHIP FPGA (có code)

83 175 0
THIẾT kế CHIP FPGA (có code)

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

ĐỒ ÁN TỐT NGHIỆP THIẾT KẾ CHIP FPGA DANH MỤC CÁC TỪ VIẾT TẮT ASIC Application-Specific Integrated Circuit CLB Configurable Logic Blocks CMOS Complementary Metal-Oxide-Semiconductor CPLD Complex Programmable Logic Device CPU Central Processing Unit DSP Digital signal processing FPGA Field Programmable Gate Array I/O In/Out LUT Look up table MCU Marvel Cinematic Universe PAL Phase Alternative Line PLA Programmable Logic Array RAM Random Access Memory ROM Read-Only Memory SPLD Simple programmable devices ĐỒ ÁN TỐT NGHIỆP Trang 1/83 CHƯƠNG TỔNG QUAN VỀ FPGA VÀ CƠNG NGHỆ CMOS 1.1 Tìm hiểu FPGA 1.1.1 Giới thiệu tổng quát FPGA FPGA thiết kế Ross Freeman, người sáng lập công ty Xilinx vào năm 1984 Tiền thân trước FPGA CPLD CPLD cấu trúc từ số lượng định khối SPLD (Simple programmable devices, thuật ngữ chung PAL, PLA) SPLD thường mảng logic AND/OR lập trình có kích thước xác định chứa số lượng hạn chế phần tử nhớ đồng (clocked register) Cấu trúc hạn chế khả thực hàm phức tạp hiệu suất không cao Kiến trúc FPGA kiến trúc mảng khối logic, FPGA có khả chứa tới từ 100.000 đến hàng vài tỷ cổng logic, CPLD chứa từ 10.000 đến 100.000 cổng logic Một điểm khác biệt với CPLD FPGA đại tích hợp nhiều logic số học sơ tối ưu hóa, hỗ trợ RAM, ROM, tốc độ cao, hay nhân cộng(multiplication and accumulation, MAC), thuật ngữ tiếng Anh DSP slice dùng cho ứng dụng xử lý tín hiệu số DSP Ngoài khả tái cấu trúc vi mạch tồn cục, số FPGA đại hỗ trợ tái cấu trúc cục bộ, tức khả tái cấu trúc phận riêng lẻ (partial configuration) đảm bảo hoạt động bình thường cho phận khác 1.1.2 Lý sử dụng FPGA Thứ nhất, FPGA có kiến trúc mảng phần tử logic nên thực thi song song So với vi điều khiển CPU phải thực thi mã lệnh theo dạng Như với FPGA, tăng hiệu suất/năng suất xử lý hệ thống, ứng dụng đòi hỏi phải xử lý tốc độ cao dùng hệ thống làm việc theo thời gian thực Thứ hai, cấu hình, lập trình lại được, nên FPGA dễ dàng mở rộng ngoại vi giao tiếp với nhiều thiết bị mà MCU ASIC lại hạn chế điểm Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 2/83 Thứ ba, nhìn chung ASIC/ASSP có hiệu suất cao xét mặt tiêu thụ công suất số lượng cổng Nhưng cần thực thi chức nhỏ đó, chip ASIC/ASSP đòi hỏi cơng suất tiêu thụ lớn nhiều cổng thực tế yêu cầu Với FPGA, firmware xác định “kích cỡ” ứng dụng, từ giảm số cổng cơng suất cần tiêu thụ Thứ tư, xét giá thành, FPGA so sánh với ASIC hay SoC, bù lại, với khả tái cấu hình kiến trúc, FPGA đóng vài trò vơ to lớn việc giảm giá thành thời gian chế tạo ASIC Để rõ hơn, cần phải biết quy trình thiết kế hai cơng nghệ FPGA ASIC phải trải qua hai giai đoạn: Front End (ý tưởng, thiết kế mức logic sử dụng ngôn ngữ mô tả phần cứng, kiểm tra mô phần mềm, …) Back End (kiểm tra timing đảm bảo thiết kế hoạt động tần số yêu cầu, layout chip, …) Ở khâu backend này, với FPGA, giai đoạn làm tự động phần mềm nhà sản xuất FPGA tạo file bitstream để nạp xuống FPGA chạy thử nghiệm Còn với ASIC, back end cần tốn nhân lực thời gian lâu Sau đó, tồn thiết kế gửi tới nhà máy sản xuất chip (vd Intel, TSMC, …) để làm chip mẫu với giá thành vài triệu đô la Tiếp đến q trình test chip mơi trường thực, thất bại phải thực lại từ đầu qui trình vài triệu trước xem vứt sọt rác Nhưng với FPGA, giúp rút ngắn thời gian mà giảm tối đa chi phí nghiên cứu, thiết kế thử nghiệm trực tiếp FPGA gần với môi trường ASIC thực Khả tái cấu hình cho phép bạn sửa sửa lại thiết kế đạt yêu cầu mà không tốn xu cho nhà sản xuất chip Các ứng dụng FPGA: ASIC Prototyping 5G Wireless (không dây 5G) Wired Communication (Ethernet, router, switch, …) Automotive (xe hơi) Aerospace & Defense (hàng không, vũ trụ, quân sự) Embedded Vision (xử lý ảnh, video) Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 3/83 DSP (xử lý tín hiệu số) Medical (các hệ thống y sinh) Test & Measurement (thiết bị kiểm tra đo lường) Industrial IoT (IoT công nghiệp) … 1.1.3 Cấu trúc FPGA Kiến trúc FPGA gồm thành phần sau: Khối I/O (hay gọi Pad pin FPGA), Khối kết nối (Interconnection/Switch Matrix), Khối logic cấu hình (CLB – Configurable Logic Blocks) Các khối CLB tổ chức xếp theo mảng theo hướng dọc ngang hình Hình 1.1: Cấu trúc FPGA[1]  Chức thành phần sau: Khối CLB: thực thi chức logic, cung cấp tính tốn phần tử nhớ sử dụng hệ thống số CLBs phần tử cấu thành FPGA, nguồn tài nguyên logic tạo nên mạch logic đồng lẫn không đồng Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 4/83 Một CLB gồm mạch tổ hợp lập trình (còn gọi LUT), FlipFlop chốt (latch) LUT(Look up table) khối logic thực hàm logic từ đầu vào (số đầu vào tùy thuộc vào dòng chip hãng thảo luận chi tiết viết khác), kết hàm tùy vào mục đích mà gửi ngồi khối logic trực tiếp hay thơng qua phần tử nhớ flipflop Ngồi khối logic đó, nhiều Chip FPGA gồm hỗn hợp khối khác nhau, số dùng cho chức cụ thể, chẳng hạn khối nhớ chuyên dụng, nhân (multipliers) ghép kênh (multiplexers) Tất nhiên, cấu hình nhớ sử dụng tất khối logic để điều khiển chức cụ thể phần tử bên khối Hình 1.2: Khối logic FPGA Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 5/83 Hình 1.3: Khối LUT Khối kết nối: dùng để liên kết khối logic I/O lại với để tạo thành thiết kế hoàn chỉnh Mạng liên kết FPGA cấu thành từ đường kết nối theo hai phương ngang đứng, tùy theo loại FPGA mà đường kết nối chia thành nhóm khác Các đường kết nối nối với thơng qua khối chuyển mạch lập trình (programmable switch), khối chuyển mạch chứa số lượng nút chuyển lập trình đảm bảo cho dạng liên kết phức tạp khác Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 6/83 Hình 1.4: Khối kết nối[1] Khối I/O: cung cấp giao tiếp khối logic kiến trúc định tuyến đến thành phần bên Một vấn đề quan trọng thiết kế kiến trúc I/O việc lựa chọn tiêu chuẩn điện áp cung cấp điện áp tham chiếu hỗ trợ Số lượng Pin (I/O) FPGA tương đối lớn, thường chia làm loại: User Pin(chân người dùng), Dedicated Pin (chân chuyên dụng) User Pin: người dùng lập trình đầu vào, đầu đầu vào – Mỗi pin kết nối với “IO Cell” bên FPGA, cấp chân VCCIO (IO power pin) Dedicated Pin: mã hóa cứng với chức cụ thể Power Pin Configuration Pin: pin để cấu hình FPGA Dedicated input, hay Clock Pin: điều khiển mạng lưới clock bên FPGA Voltage IO: cấp nguồn cho cổng logic flip-flops bên FPGA Theo thời gian, kiến trúc FPGA phát triển thông qua việc bổ sung khối chức đặc biệt lập trình, nhớ (Block RAMs), logic số học (ALU), nhân, DSP-48 chí vi xử lý nhúng thêm vào nhu cầu nguồn tài nguyên cho ứng dụng Kết nhiều FPGA ngày có nhiều nguồn tài nguyên so với FPGA trước Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 7/83 1.2 Công nghê CMOS 1.1.4 Xu hướng gần công nghệ CMOS Trong chương này, chúng tơi đưa nhìn tổng quan phát triển thông số quan trọng mạch tích hợp (IC) phức tạp, độ dài cổng, độ trễ chuyển mạch điện áp cung cấp, với tầm nhìn tiềm xuống cơng nghệ CMOS 22 nm Nhận thấy xu hướng IC phức tạp, người đồng sáng lập Intel Gordon Moore suy luận để dự đoán tăng trưởng theo hàm mũ nhớ có sẵn tốc độ tính tốn vi xử lý Điều này, ơng nói vào năm 1965, tăng gấp đôi năm Với sửa đổi nhỏ (tức tăng gấp đôi sau 18 tháng, xem Hình 1.5), Luật Moore nắm giữ vi xử lý Itanium® 2, có khoảng 400 triệu bóng bán dẫn Xu hướng cải tiến công nghệ CMOS tiếp tục thúc đẩy cần thiết phải tích hợp nhiều chức vào khu vực định silicon (silic) Bảng 1.1 đưa nhìn tổng quan thơng số cho nút công nghệ từ 180 nm, giới thiệu vào năm 1999, xuống 22 nm, dự kiến sản xuất vào khoảng năm 2011 Chiều dài cổng vật lý nhỏ nút công nghệ, minh họa hình 1.1 Vật liệu cổng từ lâu polysilicon (silic đa tinh thể), với silicon dioxide (SiO2 - silic đioxit) chất cách điện cổng kênh Nguyên tử đo thuận tiện cho bóng bán dẫn vật liệu cách điện bên cổng Trong công nghệ 90 nm, oxit cổng bao gồm khoảng năm lớp ngun tử, dày 1,2 nm Ơxít cửa mỏng dòng transistor cao tốc độ chuyển đổi cao SiO2 oxit thường xuyên thu nhỏ thập kỷ qua, đạt đến giới hạn vật lý năm nguyên tử với quy trình CMOS 90 nm Với công nghệ 45 nm, vật liệu cổng kim loại với ơxít có độ thấm cao nên giới thiệu Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 8/83 Hình 1.5: Định luật Moore so với phức tạp xử lý Intel từ 1970 đến 2005[2] Tại phép in tỉ lệ in thạch bản, kích thước tuyến tính giảm xuống khoảng 0,7 khu vực bị giảm hệ số hai Kích thước nhỏ dẫn đến mật độ tích hợp cao Do đó, điều tăng từ 100 kilogates / mm2 cho công nghệ 130 nm lên gần triệu cửa mm2 cơng nghệ 45 nm Song song, kích thước điểm nhớ sáu bóng bán dẫn, chẳng hạn điểm sử dụng nhớ RAM tĩnh, vượt qua giới hạn µm2 sau công nghệ 65 nm Thị trường IC phát triển ổn định nhiều năm, nhu cầu ngày tăng thiết bị điện tử Việc sản xuất IC cho công nghệ khác năm qua minh họa hình 1.7 Bảng 1.1: Phát triển công nghệ dự báo đến năm 2011 Công nghệ Năm xuất 180 nm 1999 130 nm 2001 90 nm 2003 65 nm 2005 45 nm 2007 32 nm 2009 22nm 2011 Độ rộng cổng 130 nm 70 nm 50 nm 35 nm 25 nm 17 nm 12 nm Nguyên liệu Poly Poly Poly Poly Metal Metal Metal cổng SiO2 SiO2 SiO2 SiO2 High High High K Các nguyên 10 5 K K – 10 – 10 – 10 tử xếp chồng cổng oxit Kgates/mm2 100 200 350 500 Bộ nhớ điểm 4.5 2.4 1.3 0.6 Thiết kế chip FPGA 3000 900 1500 0.08 ĐỒ ÁN TỐT NGHIỆP Trang 67/83 not #(12) inv_Me137(w146,w148); notif1 #(13) notif1_Nm1_Me138(w149,InstrIn1,w19); not #(24) inv_Nm2_Me139(w148,w149); notif1 #(13) notif1_Pm3_Me140(w151,w148,w150); not #(24) inv_Pm4_Me141(w147,w151); not #(13) inv_Pm5_Me142(w150,w19); notif1 #(13) notif1_Nm6_Me143(w152,w147,w20); not #(62) inv_Nm7_Me144(Dout5,w152); not #(23) inv_Me145(w154,w153); not #(12) inv_Me146(w153,w155); notif1 #(13) notif1_Nm1_Me147(w156,InstrIn2,w19); not #(24) inv_Nm2_Me148(w155,w156); notif1 #(13) notif1_Pm3_Me149(w158,w155,w157); not #(24) inv_Pm4_Me150(w154,w158); not #(13) inv_Pm5_Me151(w157,w19); notif1 #(13) notif1_Nm6_Me152(w159,w154,w20); not #(62) inv_Nm7_Me153(Dout6,w159); not #(23) inv_Me154(w161,w160); not #(12) inv_Me155(w160,w162); notif1 #(13) notif1_Nm1_Me156(w163,InstrIn2,w6); not #(24) inv_Nm2_Me157(w162,w163); notif1 #(13) notif1_Pm3_Me158(w165,w162,w164); not #(24) inv_Pm4_Me159(w161,w165); not #(13) inv_Pm5_Me160(w164,w6); notif1 #(13) notif1_Nm6_Me161(w166,w161,w4); not #(62) inv_Nm7_Me162(Dout6,w166); not #(23) inv_Me163(w168,w167); not #(12) inv_Me164(w167,w169); notif1 #(13) notif1_Nm1_Me165(w170,DIn0,w17); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 68/83 not #(24) inv_Nm2_Me166(w169,w170); notif1 #(13) notif1_Pm3_Me167(w172,w169,w171); not #(24) inv_Pm4_Me168(w168,w172); not #(13) inv_Pm5_Me169(w171,w17); notif1 #(13) notif1_Nm6_Me170(w173,w168,w25); not #(62) inv_Nm7_Me171(Dout0,w173); not #(23) inv_Me172(w175,w174); not #(12) inv_Me173(w174,w176); notif1 #(13) notif1_Nm1_Me174(w177,DIn1,w17); not #(24) inv_Nm2_Me175(w176,w177); notif1 #(13) notif1_Pm3_Me176(w179,w176,w178); not #(24) inv_Pm4_Me177(w175,w179); not #(13) inv_Pm5_Me178(w178,w17); notif1 #(13) notif1_Nm6_Me179(w180,w175,w25); not #(62) inv_Nm7_Me180(Dout1,w180); not #(23) inv_Me181(w182,w181); not #(12) inv_Me182(w181,w183); notif1 #(13) notif1_Nm1_Me183(w184,DIn2,w17); not #(24) inv_Nm2_Me184(w183,w184); notif1 #(13) notif1_Pm3_Me185(w186,w183,w185); not #(24) inv_Pm4_Me186(w182,w186); not #(13) inv_Pm5_Me187(w185,w17); notif1 #(13) notif1_Nm6_Me188(w187,w182,w25); not #(62) inv_Nm7_Me189(Dout2,w187); not #(23) inv_Me190(w189,w188); not #(12) inv_Me191(w188,w190); notif1 #(13) notif1_Nm1_Me192(w191,DIn0,w23); not #(24) inv_Nm2_Me193(w190,w191); notif1 #(13) notif1_Pm3_Me194(w193,w190,w192); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 69/83 not #(24) inv_Pm4_Me195(w189,w193); not #(13) inv_Pm5_Me196(w192,w23); notif1 #(13) notif1_Nm6_Me197(w194,w189,w21); not #(62) inv_Nm7_Me198(Dout0,w194); not #(23) inv_Me199(w196,w195); not #(12) inv_Me200(w195,w197); notif1 #(13) notif1_Nm1_Me201(w198,InstrIn0,w17); not #(24) inv_Nm2_Me202(w197,w198); notif1 #(13) notif1_Pm3_Me203(w200,w197,w199); not #(24) inv_Pm4_Me204(w196,w200); not #(13) inv_Pm5_Me205(w199,w17); notif1 #(13) notif1_Nm6_Me206(w201,w196,w25); not #(62) inv_Nm7_Me207(Dout4,w201); not #(23) inv_Me208(w203,w202); not #(12) inv_Me209(w202,w204); notif1 #(13) notif1_Nm1_Me210(w205,InstrIn1,w17); not #(24) inv_Nm2_Me211(w204,w205); notif1 #(13) notif1_Pm3_Me212(w207,w204,w206); not #(24) inv_Pm4_Me213(w203,w207); not #(13) inv_Pm5_Me214(w206,w17); notif1 #(13) notif1_Nm6_Me215(w208,w203,w25); not #(62) inv_Nm7_Me216(Dout5,w208); not #(23) inv_Me217(w210,w209); not #(12) inv_Me218(w209,w211); notif1 #(13) notif1_Nm1_Me219(w212,InstrIn2,w17); not #(24) inv_Nm2_Me220(w211,w212); notif1 #(13) notif1_Pm3_Me221(w214,w211,w213); not #(24) inv_Pm4_Me222(w210,w214); not #(13) inv_Pm5_Me223(w213,w17); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 70/83 notif1 #(13) notif1_Nm6_Me224(w215,w210,w25); not #(62) inv_Nm7_Me225(Dout6,w215); not #(23) inv_Me226(w217,w216); not #(12) inv_Me227(w216,w218); notif1 #(13) notif1_Nm1_Me228(w219,InstrIn1,w6); not #(24) inv_Nm2_Me229(w218,w219); notif1 #(13) notif1_Pm3_Me230(w221,w218,w220); not #(24) inv_Pm4_Me231(w217,w221); not #(13) inv_Pm5_Me232(w220,w6); notif1 #(13) notif1_Nm6_Me233(w222,w217,w4); not #(62) inv_Nm7_Me234(Dout5,w222); not #(23) inv_Me235(w224,w223); not #(12) inv_Me236(w223,w225); notif1 #(13) notif1_Nm1_Me237(w226,DIn0,w27); not #(24) inv_Nm2_Me238(w225,w226); notif1 #(13) notif1_Pm3_Me239(w228,w225,w227); not #(24) inv_Pm4_Me240(w224,w228); not #(13) inv_Pm5_Me241(w227,w27); notif1 #(13) notif1_Nm6_Me242(w229,w224,w29); not #(62) inv_Nm7_Me243(Dout0,w229); not #(23) inv_Me244(w231,w230); not #(12) inv_Me245(w230,w232); notif1 #(13) notif1_Nm1_Me246(w233,DIn1,w27); not #(24) inv_Nm2_Me247(w232,w233); notif1 #(13) notif1_Pm3_Me248(w235,w232,w234); not #(24) inv_Pm4_Me249(w231,w235); not #(13) inv_Pm5_Me250(w234,w27); notif1 #(13) notif1_Nm6_Me251(w236,w231,w29); not #(62) inv_Nm7_Me252(Dout1,w236); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 71/83 not #(23) inv_Me253(w238,w237); not #(12) inv_Me254(w237,w239); notif1 #(13) notif1_Nm1_Me255(w240,DIn2,w27); not #(24) inv_Nm2_Me256(w239,w240); notif1 #(13) notif1_Pm3_Me257(w242,w239,w241); not #(24) inv_Pm4_Me258(w238,w242); not #(13) inv_Pm5_Me259(w241,w27); notif1 #(13) notif1_Nm6_Me260(w243,w238,w29); not #(62) inv_Nm7_Me261(Dout2,w243); not #(23) inv_Me262(w245,w244); not #(12) inv_Me263(w244,w246); notif1 #(13) notif1_Nm1_Me264(w247,DIn1,w23); not #(24) inv_Nm2_Me265(w246,w247); notif1 #(13) notif1_Pm3_Me266(w249,w246,w248); not #(24) inv_Pm4_Me267(w245,w249); not #(13) inv_Pm5_Me268(w248,w23); notif1 #(13) notif1_Nm6_Me269(w250,w245,w21); not #(62) inv_Nm7_Me270(Dout1,w250); not #(23) inv_Me271(w252,w251); not #(12) inv_Me272(w251,w253); notif1 #(13) notif1_Nm1_Me273(w254,InstrIn0,w27); not #(24) inv_Nm2_Me274(w253,w254); notif1 #(13) notif1_Pm3_Me275(w256,w253,w255); not #(24) inv_Pm4_Me276(w252,w256); not #(13) inv_Pm5_Me277(w255,w27); notif1 #(13) notif1_Nm6_Me278(w257,w252,w29); not #(62) inv_Nm7_Me279(Dout4,w257); not #(23) inv_Me280(w259,w258); not #(12) inv_Me281(w258,w260); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 72/83 notif1 #(13) notif1_Nm1_Me282(w261,InstrIn1,w27); not #(24) inv_Nm2_Me283(w260,w261); notif1 #(13) notif1_Pm3_Me284(w263,w260,w262); not #(24) inv_Pm4_Me285(w259,w263); not #(13) inv_Pm5_Me286(w262,w27); notif1 #(13) notif1_Nm6_Me287(w264,w259,w29); not #(62) inv_Nm7_Me288(Dout5,w264); not #(23) inv_Me289(w266,w265); not #(12) inv_Me290(w265,w267); notif1 #(13) notif1_Nm1_Me291(w268,InstrIn2,w27); not #(24) inv_Nm2_Me292(w267,w268); notif1 #(13) notif1_Pm3_Me293(w270,w267,w269); not #(24) inv_Pm4_Me294(w266,w270); not #(13) inv_Pm5_Me295(w269,w27); notif1 #(13) notif1_Nm6_Me296(w271,w266,w29); not #(62) inv_Nm7_Me297(Dout6,w271); not #(23) inv_Me298(w273,w272); not #(12) inv_Me299(w272,w274); notif1 #(13) notif1_Nm1_Me300(w275,InstrIn0,w6); not #(24) inv_Nm2_Me301(w274,w275); notif1 #(13) notif1_Pm3_Me302(w277,w274,w276); not #(24) inv_Pm4_Me303(w273,w277); not #(13) inv_Pm5_Me304(w276,w6); notif1 #(13) notif1_Nm6_Me305(w278,w273,w4); not #(62) inv_Nm7_Me306(Dout4,w278); not #(23) inv_Me307(w280,w279); not #(12) inv_Me308(w279,w281); notif1 #(13) notif1_Nm1_Me309(w282,InstrIn1,w23); not #(24) inv_Nm2_Me310(w281,w282); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 73/83 notif1 #(13) notif1_Pm3_Me311(w284,w281,w283); not #(24) inv_Pm4_Me312(w280,w284); not #(13) inv_Pm5_Me313(w283,w23); notif1 #(13) notif1_Nm6_Me314(w285,w280,w21); not #(62) inv_Nm7_Me315(Dout5,w285); not #(23) inv_Me316(w287,w286); not #(12) inv_Me317(w286,w288); notif1 #(13) notif1_Nm1_Me318(w289,InstrIn2,w31); not #(24) inv_Nm2_Me319(w288,w289); notif1 #(13) notif1_Pm3_Me320(w291,w288,w290); not #(24) inv_Pm4_Me321(w287,w291); not #(13) inv_Pm5_Me322(w290,w31); notif1 #(13) notif1_Nm6_Me323(w292,w287,w34); not #(62) inv_Nm7_Me324(Dout6,w292); not #(23) inv_Me325(w294,w293); not #(12) inv_Me326(w293,w295); notif1 #(13) notif1_Nm1_Me327(w296,InstrIn1,w31); not #(24) inv_Nm2_Me328(w295,w296); notif1 #(13) notif1_Pm3_Me329(w298,w295,w297); not #(24) inv_Pm4_Me330(w294,w298); not #(13) inv_Pm5_Me331(w297,w31); notif1 #(13) notif1_Nm6_Me332(w299,w294,w34); not #(62) inv_Nm7_Me333(Dout5,w299); not #(23) inv_Me334(w301,w300); not #(12) inv_Me335(w300,w302); notif1 #(13) notif1_Nm1_Me336(w303,InstrIn0,w31); not #(24) inv_Nm2_Me337(w302,w303); notif1 #(13) notif1_Pm3_Me338(w305,w302,w304); not #(24) inv_Pm4_Me339(w301,w305); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 74/83 not #(13) inv_Pm5_Me340(w304,w31); notif1 #(13) notif1_Nm6_Me341(w306,w301,w34); not #(62) inv_Nm7_Me342(Dout4,w306); not #(23) inv_Me343(w308,w307); not #(12) inv_Me344(w307,w309); notif1 #(13) notif1_Nm1_Me345(w310,DIn2,w23); not #(24) inv_Nm2_Me346(w309,w310); notif1 #(13) notif1_Pm3_Me347(w312,w309,w311); not #(24) inv_Pm4_Me348(w308,w312); not #(13) inv_Pm5_Me349(w311,w23); notif1 #(13) notif1_Nm6_Me350(w313,w308,w21); not #(62) inv_Nm7_Me351(Dout2,w313); not #(23) inv_Me352(w315,w314); not #(12) inv_Me353(w314,w316); notif1 #(13) notif1_Nm1_Me354(w317,DIn2,w31); not #(24) inv_Nm2_Me355(w316,w317); notif1 #(13) notif1_Pm3_Me356(w319,w316,w318); not #(24) inv_Pm4_Me357(w315,w319); not #(13) inv_Pm5_Me358(w318,w31); notif1 #(13) notif1_Nm6_Me359(w320,w315,w34); not #(62) inv_Nm7_Me360(Dout2,w320); not #(23) inv_Me361(w322,w321); not #(12) inv_Me362(w321,w323); notif1 #(13) notif1_Nm1_Me363(w324,DIn1,w31); not #(24) inv_Nm2_Me364(w323,w324); notif1 #(13) notif1_Pm3_Me365(w326,w323,w325); not #(24) inv_Pm4_Me366(w322,w326); not #(13) inv_Pm5_Me367(w325,w31); notif1 #(13) notif1_Nm6_Me368(w327,w322,w34); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 75/83 not #(62) inv_Nm7_Me369(Dout1,w327); not #(23) inv_Me370(w329,w328); not #(12) inv_Me371(w328,w330); notif1 #(13) notif1_Nm1_Me372(w331,DIn0,w31); not #(24) inv_Nm2_Me373(w330,w331); notif1 #(13) notif1_Pm3_Me374(w333,w330,w332); not #(24) inv_Pm4_Me375(w329,w333); not #(13) inv_Pm5_Me376(w332,w31); notif1 #(13) notif1_Nm6_Me377(w334,w329,w34); not #(62) inv_Nm7_Me378(Dout0,w334); not #(23) inv_Me379(w336,w335); not #(12) inv_Me380(w335,w337); notif1 #(13) notif1_Nm1_Me381(w338,DIn0,w33); not #(24) inv_Nm2_Me382(w337,w338); notif1 #(13) notif1_Pm3_Me383(w340,w337,w339); not #(24) inv_Pm4_Me384(w336,w340); not #(13) inv_Pm5_Me385(w339,w33); notif1 #(13) notif1_Nm6_Me386(w341,w336,w40); not #(62) inv_Nm7_Me387(Dout0,w341); not #(23) inv_Me388(w343,w342); not #(12) inv_Me389(w342,w344); notif1 #(13) notif1_Nm1_Me390(w345,DIn1,w33); not #(24) inv_Nm2_Me391(w344,w345); notif1 #(13) notif1_Pm3_Me392(w347,w344,w346); not #(24) inv_Pm4_Me393(w343,w347); not #(13) inv_Pm5_Me394(w346,w33); notif1 #(13) notif1_Nm6_Me395(w348,w343,w40); not #(62) inv_Nm7_Me396(Dout1,w348); not #(23) inv_Me397(w350,w349); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 76/83 not #(12) inv_Me398(w349,w351); notif1 #(13) notif1_Nm1_Me399(w352,DIn2,w33); not #(24) inv_Nm2_Me400(w351,w352); notif1 #(13) notif1_Pm3_Me401(w354,w351,w353); not #(24) inv_Pm4_Me402(w350,w354); not #(13) inv_Pm5_Me403(w353,w33); notif1 #(13) notif1_Nm6_Me404(w355,w350,w40); not #(62) inv_Nm7_Me405(Dout2,w355); not #(23) inv_Me406(w357,w356); not #(12) inv_Me407(w356,w358); notif1 #(13) notif1_Nm1_Me408(w359,InstrIn0,w23); not #(24) inv_Nm2_Me409(w358,w359); notif1 #(13) notif1_Pm3_Me410(w361,w358,w360); not #(24) inv_Pm4_Me411(w357,w361); not #(13) inv_Pm5_Me412(w360,w23); notif1 #(13) notif1_Nm6_Me413(w362,w357,w21); not #(62) inv_Nm7_Me414(Dout4,w362); not #(23) inv_Me415(w364,w363); not #(12) inv_Me416(w363,w365); notif1 #(13) notif1_Nm1_Me417(w366,InstrIn0,w33); not #(24) inv_Nm2_Me418(w365,w366); notif1 #(13) notif1_Pm3_Me419(w368,w365,w367); not #(24) inv_Pm4_Me420(w364,w368); not #(13) inv_Pm5_Me421(w367,w33); notif1 #(13) notif1_Nm6_Me422(w369,w364,w40); not #(62) inv_Nm7_Me423(Dout4,w369); not #(23) inv_Me424(w371,w370); not #(12) inv_Me425(w370,w372); notif1 #(13) notif1_Nm1_Me426(w373,InstrIn1,w33); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 77/83 not #(24) inv_Nm2_Me427(w372,w373); notif1 #(13) notif1_Pm3_Me428(w375,w372,w374); not #(24) inv_Pm4_Me429(w371,w375); not #(13) inv_Pm5_Me430(w374,w33); notif1 #(13) notif1_Nm6_Me431(w376,w371,w40); not #(62) inv_Nm7_Me432(Dout5,w376); endmodule  Code RLT cộng toàn phần module congtoanphan( C,B,A,Carry,Sum); input C,B,A; output Carry,Sum; wire w5,; xor #(1) xor2_1(w5,A,B); assign Carry=(A&B)|(C&(A|B)) xor #(1) xor2_2(Sum,w5,C); endmodule // Simulation parameters in Verilog Format always #10 C=~C; #20 B=~B; #40 A=~A;  Code RLT chia sung module chiasung2( Reset,Clock,bit2,bit1,out3); input Reset,Clock,bit2,bit1; output out3; wire w1, w2, w3, w4; Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 78/83 wire w5, w6; wire x1, x2, x3, x4; dreg dreg_2(x1, Reset,Clock,w1,x1); dreg dreg_3(x2, Reset,w1, w2, x2); dreg dreg_4(x3, Reset, w2, w3, x3); dreg dreg_5(x4, Reset, w3, w4, x4); mux mux_1(w5, w1, w3, bit1); mux mux_2(w6, w2, w4, bit1); mux mux_3(out3, w5, w6,bit2); endmodule  Code RLT flipfop D module dreg(d, rst, h, q, nq); input d; input rst; input h; output q; output nq; wire d; wire rst; wire h; reg q; reg nq; always @ (negedge h) begin if (rst) begin q = 0; Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 79/83 nq = 0; end else begin q = d; nq = ~q; end end endmodule  Code RLT mux module mux( Data_out, Data_in_0, Data_in_1, sel, ); input Data_in_0; input Data_in_1; input sel; output Data_out; reg Data_out; always @(Data_in_0,Data_in_1,sel) begin if(sel == 0) Data_out = Data_in_0; //when select signal to the mux is low else Data_out = Data_in_1; //when select signal to the mux is high end Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 80/83 endmodule  Code RLT Mux module mux( in11,Sel1,in01,f1); input in11,Sel1,in01; output f1; nmos #(31) nmos(f1,in11,Sel1); not #(17) inv(w4,Sel1); pmos #(31) pmos(f1,in01,Sel1); nmos #(31) nmos(f1,in01,w4); pmos #(31) pmos(f1,in11,w4); endmodule  Code RLT LUT module cautrubolut( F2,chon4,F1,F0,chon0,chon1,chon3,chon5, chon2,chon6,chon7,Giatri4,Fout,Giatri0,Giatri1,Giatri3, Giatri2,Giatri5,Giatri7,Giatri6); input F2,chon4,F1,F0,chon0,chon1,chon3,chon5; input chon2,chon6,chon7; output Giatri4,Fout,Giatri0,Giatri1,Giatri3,Giatri2,Giatri5,Giatri7; output Giatri6; wire w3,w8,w10,; not #(2) inv_1(w3,F2); nmos #(3) nmos_2(Fout,chon4,Giatri4); not #(2) inv_3(w8,F1); not #(2) inv_4(w10,F0); nmos #(3) nmos_5(Fout,chon6,Giatri6); nmos #(3) nmos_6(Fout,chon0,Giatri0); Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 81/83 nmos #(3) nmos_7(Fout,chon1,Giatri1); nmos #(3) nmos_8(Fout,chon5,Giatri5); nmos #(3) nmos_9(Fout,chon2,Giatri2); nmos #(3) nmos_10(Fout,chon3,Giatri3); nmos #(3) nmos_11(Fout,chon7,Giatri7); and #(1) and3_12(Giatri0,w3,w8,w10); and #(1) and3_13(Giatri4,F2,w8,w10); and #(1) and3_14(Giatri5,F2,w8,F0); and #(1) and3_15(Giatri7,F2,F1,F0); and #(1) and3_16(Giatri6,F2,F1,w10); and #(1) and3_17(Giatri2,w3,F1,w10); and #(1) and3_18(Giatri3,w3,F1,F0); and #(1) and3_19(Giatri1,w3,w8,F0); endmodule Thiết kế chip FPGA ... Khối logic FPGA Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 5/83 Hình 1.3: Khối LUT Khối kết nối: dùng để liên kết khối logic I/O lại với để tạo thành thiết kế hoàn chỉnh Mạng liên kết FPGA cấu thành... trúc FPGA[ 3] Thiết kế chip FPGA ĐỒ ÁN TỐT NGHIỆP Trang 19/83 Hình 2.2: Sử dụng FPGA để xây dựng cổng XOR ba đầu vào[3] Chú ý FPGA không tồn thành phần đơn giản, mà khối macro thiết kế hệ thống chip. .. điểm kết nối lập trình chuyển đổi ma trận để tạo lõi cấu hình hồn chỉnh CHƯƠNG THIẾT KẾ VÀ THỰC THI 1.8 Thiết kế FPGA 1.1.15 Bộ Mux  Bảng thật Bảng 3.1: Bảng thật Mux Sel Thiết kế chip FPGA

Ngày đăng: 22/03/2019, 20:32

Từ khóa liên quan

Mục lục

  • DANH MỤC CÁC TỪ VIẾT TẮT

  • CHƯƠNG 1. TỔNG QUAN VỀ FPGA VÀ CÔNG NGHỆ CMOS

    • 1.1 Tìm hiểu về FPGA

      • 1.1.1 Giới thiệu tổng quát về FPGA

      • 1.1.2 Lý do sử dụng FPGA

      • 1.1.3 Cấu trúc FPGA

      • 1.2 Công nghê CMOS

        • 1.1.4 Xu hướng gần đây trong công nghệ CMOS

        • 1.1.5 Giới thiệu công nghệ 90 nm

        • 1.1.6 Đặc tính của thiết bị MOS kênh N

        • 1.1.7 Đặc tính của thiết bị MOS kênh P

        • 1.1.8 Tốc độ cao, mục đích chung và các biến thể quy trình công suất thấp.

        • CHƯƠNG 2. VI MẠCH MÃNG LOGIC LẬP TRÌNH TRƯỜNG (FPGA)

          • 1.3 Giới thiệu

          • 1.4 Cấu hình mạch logic

            • 1.1.9 Mạch ghép kênh (MUX)

            • 1.1.10 Bảng tra (LUT)

            • 1.1.11 Bộ nhớ

            • 1.1.12 Cầu chì và không cầu chì

            • 1.5 Thực hiện trong DSCH

            • 1.6 Khối logic lập trình

            • 1.7 Kết nối giữa các khối

              • 1.1.13 Điểm kết nối có thể lập trình

              • 1.1.14 Ma trận chuyển mạch

              • CHƯƠNG 3. THIẾT KẾ VÀ THỰC THI

                • 1.8 Thiết kế FPGA .

                  • 1.1.15 Bộ Mux

                  • 1.1.16 Bộ LUT

Tài liệu cùng người dùng

Tài liệu liên quan