1 Vivado ʹÓÃ˵Ã÷
ÔÚѧϰ²¢³¢ÊÔ±¾Õ½ÚÇ°£¬ÄãÐèÒª¾ßÓÐÒÔÏ»·¾³ºÍÄÜÁ¦:
(1) ×°ÓÐ Vivado µÄµçÄÔһ̨¡£
Èç¹ûµçÄÔÉÐδ°²×° Vivado£¬Çë²Î¿¼Îĵµ¡°A03_Vivado °²×°ËµÃ÷¡±¡£
(2) Èç¹ûÐèÒªÉÏ°åÔËÐУ¬ÔòÐèÒªÁúоÌåϵ½á¹¹½ÌѧʵÑéÏä(Artix-7)Ò»Ìס£
ʵÑéÏä½éÉÜ£¬Çë²Î¿¼Îĵµ¡°A01_ÁúоÌåϵ½á¹¹½ÌѧʵÑéÏä(Artix-7)½éÉÜ¡±¡£
(3) Èç¹ûÐèÒª±àд Verilog£¬ÔòÐèÒªÒ»¶¨µÄ¹æ·¶µÄ Verilog ±à³ÌÄÜÁ¦¡£
Çë×Ôѧ Verilog¡£
ͨ¹ý±¾Õ½ڵÄѧϰ£¬Ä㽫»ñµÃ:
(1) ³õ²½ÊìϤÁúо Artix-7 ʵÑéÏä¡£
(2) »ù±¾µÄ Vivado ʹÓ÷½·¨¡£
(3) ³õ²½Á˽â Vivado µÄ XDC Ô¼ÊøÎļþ¡£
Vivado ÓÐÁ½ÖÖ¿ª·¢Ä£Ê½£¬Project Mode ºÍ Non-Project Mode¡£Á½ÕßµÄÖ÷ÒªÇø±ðÊÇ£¬Project Mode ʹÓà Flow Navigation ¸ü¼Ó×Ô¶¯»¯£¬Non-Project Mode ʹÓà Tcl ÃüÁîÖ±½Ó¿ØÖƲÙ×÷£¬¸üÊÖ¶¯µ«¸ü²»ÊÜÏÞÖÆ¡£Êµ¼ÊÖиù¾Ý¿ª·¢Ðè ÇóÑ¡ÔñÕâÁ½ÖÖģʽ£¬Ò»°ã¼òµ¥Éè¼ÆÖвÉÓà Project Mode¡£
ÏÂÃæÒÔ led ʵÑéΪÀý½éÉÜÈçºÎʹÓà Vivado н¨Ò»¸ö¹¤³Ì¡£led ʵÑéʵÏÖ¿ª·¢°åÉÏ 8 ¸ö²¦Â뿪¹Ø¿ØÖÆ 8 ¸ö led µÆ ÁÁÃð¡£
1.1 Êý×Öµç·Éè¼ÆµÄÒ»°ãÁ÷³Ì
ÔÚ½éÉÜ Vivado ¹¤¾ßµÄʹÓÃÇ°£¬Ïȼòµ¥½éÉÜÏÂÊý×Öµç·Éè¼ÆµÄÒ»°ãÁ÷³Ì£¬ÈçÏÂͼ(ͼƬÀ´×ÔÍøÂç)¡£Í¼ÖеÄ×î
ºó²½Öè¡°Sign off¡±ÎªÎïÀíÇ©ºË£¬¾ÍÊǵõ½×îÖյĵç·°æͼ¡£½«µç·°æͼ½»¸¶¾§Ôª´ú¹¤³§£¬¾Í¿ÉÒÔÉú²úоƬÁË¡£
ÔÚͼ 1-1 ÖÐÓúìÉ«±ê³öÁË FPGA ¿ª·¢µÄÁ÷³Ì£¬FPGA ¿ª·¢µÄÁ÷³ÌºÍÒ»°ãÊý×Öµç·Éè¼ÆµÄÁ÷³ÌÖ÷Ì岿·ÖÊǶÔÓ¦µÄ¡£
µ«ÔÚ×îºó²½Öèʱ£¬FPGA ¿ª·¢²»ÊÇÉú³Éµç·°æͼ£¬¶øÊÇÉú³É bit Á÷Îļþ£¬²¢ÏÂÔص½ FPGA ¿ª·¢°åÉϽøÐÐÔËÐС£
±¾Õ嵀 1.4 ½ÚÉ漰ͼ 1-1 ÖÐµÄµÚ 2¡¢3 ²½£¬1.6 ½ÚÉ漰ͼ 1-1 ÖÐµÄµÚ 4¡¢5¡¢6¡¢7¡¢8 ²½¡£
1.5 ½Ú ¡°Ìí¼ÓÔ¼ÊøÎļþ¡±ÔòÊÇ×ÛºÏÓë²¼¾Ö²¼ÏßÖ®¼äµÄ²½Öè¡£ÔÚͼ 1-1 ÖÐµÄ ¡°Static Timing Analysis¡±( ¾²Ì¬Ê±Ðò ·ÖÎö£¬¼òдΪ STA)Ò²ÐèÒªÌí¼ÓÔ¼ÊøÎļþ£¬Ö»ÊÇÒ»°ãÊý×Öµç·Éè¼ÆÖеÄÔ¼ÊøÎļþÖ»ÊÇʱÐò¡¢cell µ¥Ôª¡¢²¼¾ÖÉϵÄÔ¼ Êø¡£¶ø FPGA µÄÉè¼ÆÔ¼Êø³ýÁËÕâЩÍ⣬»¹Æðµ½Òý½Å°ó¶¨µÄ×÷Óá£ÔÚ±¾Ñ§ÆÚµÄʵÑéÖУ¬Ô¼ÊøÎļþ¸ü¶àµÄ×÷ÓþÍÖ»ÊÇ Òý½Å°ó¶¨£¬¾ßÌåÇëÏêϸÔĶÁ±¾Õ 1.5 ½Ú¡£
1
3.ÔËÐй¦ÄÜ·ÂÕæ
1.RTL ´úÂë±àд
4.Vivado ×ÛºÏ
5.Vivado ²¼¾Ö
2.testbench ºÍ²âÊÔ¼¤Àø±àд
6.Vivado ²¼Ïß
7.Vivado ²úÉú bit Á÷Îļþ 8.ÉÏ°åÑéÖ¤
Íø±í
ͼ 1-1 Êý×Öµç·Éè¼ÆÓë FPGA ¿ª·¢¶ÔÕÕͼ
1.2 Vivadoн¨¹¤³Ì
ͨ¹ýË«»÷×ÀÃæ¿ì½Ý·½Ê½»ò¿ªÊ¼²Ëµ¥µÄ¡°Xilinx Design Tools¡úVivado 2017.1¡±´ò¿ª Vivado 2017.1£¬ÔÚ½çÃæÉÏ
¡°Quick Start¡±ÏÂÑ¡Ôñ¡°Create Project¡±¡£
н¨¹¤³ÌÏòµ¼£¬µã»÷¡°Next¡±¡£
ͼ1-2 VivadoÆô¶¯½çÃæ
2
ͼ 1-3 н¨¹¤³ÌÏòµ¼ ÊäÈ빤³ÌÃû³Æ²¢Ñ¡Ôñ¹¤³ÌµÄÎļþλÖ㬲¢¹´Ñ¡¡°Create project subdirectory¡±Ñ¡ÏΪ¹¤³ÌÔÚÖ¸¶¨´æ´¢Â·¾¶ÏÂ
½¨Á¢¶ÀÁ¢µÄÎļþ¼Ð¡£ÉèÖÃÍê³Éºó£¬µã»÷¡°Next¡±¡£ ×¢Òâ:¹¤³ÌÃû³ÆºÍ´æ´¢Â·¾¶Öв»ÄܳöÏÖÖÐÎĺͿոñ£¬½¨Ò鹤³ÌÃû³ÆÒÔ×Öĸ¡¢Êý×Ö¡¢Ï»®ÏßÀ´×é³É¡£
ͼ 1-4 ÉèÖù¤³ÌÃû³ÆºÍλÖÃ
Ñ¡Ôñ¡°RTL Project¡±Ò»Ï²¢¹´Ñ¡¡°Do not specify sources at this time¡±£¬¹´Ñ¡¸ÃÑ¡ÏîÊÇΪÁËÌø¹ýÔÚн¨¹¤³ÌµÄ
¹ý³ÌÖÐÌí¼ÓÉè¼ÆÔ´Îļþ£¬Èç¹ûÒªÔÚн¨¹¤³ÌʱÌí¼ÓÔ´ÎļþÔò²»¹´Ñ¡¡£µã»÷¡°Next¡±¡£ 3
ͼ 1-5 ÉèÖù¤³ÌÀàÐÍ
¸ù¾ÝʹÓÃµÄ FPGA ¿ª·¢Æ½Ì¨£¬Ñ¡Ôñ¶ÔÓ¦µÄ FPGA Ä¿±êÆ÷¼þ¡£¸ù¾ÝʵÑéƽ̨´îÔØµÄ FPGA£¬ÔÚɸѡÆ÷µÄ¡°Family¡±
Ñ¡Ôñ¡°Artix 7¡±£¬¡°Package¡±Ñ¡Ôñ¡°fbg676¡±£¬ÔÚɸѡµÃµ½µÄÐͺÅÀïÃæÑ¡Ôñ¡°xc7a200tfbg676-2¡±¡£µã»÷¡°Next¡±¡£
ͼ 1-6 Ñ¡ÔñÄ¿±êÆ÷¼þ È·ÈϹ¤³ÌÉèÖÃÐÅÏ¢ÊÇ·ñÕýÈ·¡£ÕýÈ·µã»÷¡°Finish¡±£¬²»ÕýÈ·Ôòµã»÷¡°ÉÏÒ»²½¡±·µ»ØÏàÓ¦²½ÖèÐ޸ġ£
4
Íê³É¹¤³Ìн¨¡£
ͼ 1-7 ¹¤³ÌÐÅÏ¢
ͼ 1-8 ¹¤³Ìн¨Íê³ÉÏÔʾ½çÃæ
1.3 RTLÉè¼ÆÊäÈë
ÒÔʹÓà Verilog Íê³É RTL Éè¼ÆΪÀý¡£Verilog ´úÂ붼ÊÇÒÔ¡°.v¡±Îªºó׺ÃûµÄÎļþ£¬¿ÉÒÔÔÚÆäËûÎļþ±à¼Æ÷Àïд
ºÃ£¬ÔÙÌí¼Óµ½Ð½¨µÄ¹¤³ÌÖУ¬Ò²¿ÉÒÔÔÚ¹¤³ÌÖÐн¨Ò»¸öÔٱ༡£
Ìí¼ÓÔ´Îļþ¡£ÔÚ¡°Flow Navigator¡±´°¿Úϵġ°Project Manager¡±Ïµã»÷¡°Add sources¡±£¬»òÕßµã»÷¡°Source¡±
´°¿ÚÏ¡°Add Sources¡±°´Å¥£¬»òÕßʹÓÿì½Ý¼ü¡°Alt + A¡±¡£
5
ͼ 1-9 Ìí¼ÓÔ´Îļþ
Ìí¼ÓÉè¼ÆÎļþ¡£Ñ¡Ôñ¡°Add or create design sources¡±À´Ìí¼Ó»òн¨ Verilog »ò VHDL Ô´Îļþ£¬µã»÷¡°Next¡±¡£
ͼ 1-10 Ìí¼ÓÉè¼ÆÎļþ
Ìí¼Ó»òÕßн¨Éè¼ÆÎļþ¡£ÈçÌí¼ÓÒÑÓÐÉè¼ÆÎļþ»òÕßÌí¼Ó°üº¬ÒÑÓÐÉè¼ÆÎļþµÄÎļþ¼Ð£¬Ñ¡Ôñ¡°Add Files¡±»òÕß ¡°Add Directories¡±£¬È»ºóÔÚÎļþä¯ÀÀ´°¿ÚÑ¡ÔñÒÑÓеÄÉè¼ÆÎļþÍê³ÉÌí¼Ó¡£Èç´´½¨ÐµÄÉè¼ÆÎļþ£¬ÔòÑ¡Ôñ¡°Create File¡±¡£ÕâÀïн¨Îļþ¡£
6
ͼ 1-11 Ìí¼Ó»òÕßн¨Éè¼ÆÎļþ ÉèÖÃд´½¨ÎļþµÄÀàÐÍ¡¢Ãû³ÆºÍÎļþλÖá£×¢Òâ:ÎļþÃû³ÆºÍλÖ÷¾¶Öв»ÄܳöÏÖÖÐÎĺͿոñ¡£
ͼ 1-12 ÉèÖÃеÄÉè¼ÆÎļþ ¼ÌÐøÌí¼ÓÉè¼ÆÎļþ»òÕßÐÞ¸ÄÒÑÌí¼ÓÉè¼ÆÎļþÉèÖᣵã»÷¡°Finish¡±¡£
7
ͼ 1-13 Íê³ÉÉè¼ÆÎļþÌí¼Ó
Ä£¿é¶Ë¿ÚÉèÖá£ÔÚ¡°Module Definition¡±Öеġ°I/O Port Definitions¡±£¬ÊäÈëÉè¼ÆÄ£¿éËùÐèµÄ¶Ë¿Ú£¬²¢ÉèÖÃ¶Ë¿Ú ·½Ïò£¬Èç¹û¶Ë¿ÚΪ×ÜÏßÐÍ£¬¹´Ñ¡¡°Bus¡±Ñ¡Ï²¢Í¨¹ý¡°MSB¡±ºÍ¡°LSB¡±È·¶¨×ÜÏß¿í¶È¡£Íê³Éºóµã»÷¡°OK¡±¡£ ¶Ë¿ÚÉèÖÃÒ²¿ÉÒÔÔÚ±à¼Ô´ÎļþʱÍê³É£¬¼´¿ÉÒÔÔÚÕâÒ»²½Ö±½Óµã¡°OK¡±Ìø¹ý¡£
ͼ 1-14 Ä£¿é¶Ë¿ÚÉèÖÃ
Ë«»÷¡°Sources¡±Öеġ°Design Sources¡±Ïµġ°led.v¡±Öдò¿ª¸ÃÎļþ£¬ÊäÈëÏàÓ¦µÄÉè¼Æ´úÂë¡£Èç¹ûÉèÖÃʱÎļþ
λÖð´Ä¬ÈϵÄ
ÏÂͼËùʾ¡£
ͼ 1-15 ±à¼Éè¼ÆÎļþ
1.4 ¹¦ÄÜ·ÂÕæ
Vivado ¼¯³ÉÁË·ÂÕæÆ÷ Vivado Simulator£¬ÕâÀï½éÉÜʹÓà Vivado ·ÂÕæÆ÷·ÂÕæµÄ·½·¨¡£Ò²¿ÉÒÔʹÓà ModelSim ½øÐÐ
·ÂÕæ¡£
Ê×ÏÈÌí¼Ó²âÊÔ¼¤ÀøÎļþ¡£ÔÚ¡°Source¡±ÖС°Simulation Sources¡±ÓÒ»÷Ñ¡Ôñ¡°Add source¡±¡£
ͼ 1-16 Ìí¼Ó²âÊÔ¼¤ÀøÎļþ
ÔÚ¡°Add Source¡±½çÃæÖÐÑ¡Ôñ¡°Add or Create Simulation Sources¡±£¬µã»÷¡°Next¡±¡£
9
ͼ 1-17 Ìí¼ÓºÍн¨²âÊÔÎļþ Ñ¡Ôñ¡°Create File¡±£¬Ð½¨Ò»¸ö¼¤Àø²âÊÔÎļþ¡£
ÊäÈ뼤Àø²âÊÔÎļþÃû£¬µã»÷¡°OK¡±¡£
ͼ 1-18 н¨²âÊÔÎļþ
10
ͼ 1-19 н¨²âÊÔÎļþÉèÖÃ
Íê³Éн¨²âÊÔÎļþ£¬µã»÷¡°Finish¡±¡£
ͼ 1-20 Íê³Éн¨²âÊÔÎļþ
¶Ô²âÊÔ¼¤ÀøÎļþ½øÐÐ module ¶Ë¿Ú¶¨Ò壬ÓÉÓÚ¼¤Àø²âÊÔÎļþ²»ÐèÒªÓжÔÍâµÄ½Ó¿Ú£¬ËùÒÔ²»½øÐÐ I/O ¶Ë¿ÚÉèÖÃÖ± ½Óµã»÷¡°OK¡±£¬Íê³É¿Õ°×µÄ¼¤Àø²âÊÔÎļþ´´½¨¡£
11
ͼ 1-21 ²»ÐèÒª½øÐж˿ÚÉèÖà ÔÚ¡°Source¡±´°¿ÚÏÂË«»÷´ò¿ª¿Õ°×µÄ¼¤Àø²âÊÔÎļþ¡£²âÊÔÎļþ led_tb.v λÓÚ¹¤³ÌĿ¼Ï¡°\led.srcs\sim_1\new¡±
Îļþ¼ÐÏ¡£
ͼ 1-22 ¿Õ°×²âÊÔ¼¤ÀøÎļþ Íê³É¶Ô½«Òª·ÂÕæµÄ module µÄʵÀý»¯ºÍ¼¤Àø´úÂëµÄ±àд£¬ÈçÏÂÊö´úÂëËùʾ¡£
12
ͼ 1-23 Íê³É²âÊÔ¼¤ÀøÎļþ
½øÈë·ÂÕæ¡£ÔÚ×ó²à¡°Flow Navigator¡±´°¿ÚÖеã»÷¡°Simulation¡±Ïµġ°Run Simulation¡±Ñ¡ÏѡÔñ¡°Run Behavioral Simulation¡±£¬½øÈë·ÂÕæ½çÃæ¡£
ͼ 1-24 ÔËÐÐÐÐΪ¼¶·ÂÕæ
ͼ 1-25 ÐÐΪ¼¶·ÂÕæ½çÃæ 13
¿Éͨ¹ý×ó²à¡°Scope¡±Ò»À¸ÖеÄĿ¼½á¹¹¶¨Î»µ½ÏëÒª²é¿´µÄ module ÄÚ²¿Ðźţ¬ÔÚ¡°Objects¡±¶ÔÓ¦µÄÐźÅÃû³Æ ÉÏÓÒ»÷Ñ¡Ôñ¡°Add To Wave Window¡±£¬½«ÐźżÓÈ벨ÐÎͼÖС£·ÂÕæÆ÷ĬÈÏÏÔʾ I/O Ðźţ¬ÓÉÓÚÕâ¸öʾÀý²»´æÔÚÄÚ ²¿Ðźţ¬Òò´Ë²»ÐèÒªÌí¼Ó¹Û²ìÐźš£
ͼ 1-26 ½«ÄÚ²¿ÐźÅÌí¼Óµ½²¨ÐÎͼ ¿Éͨ¹ýÑ¡Ôñ¹¤¾ßÀ¸ÖеÄÑ¡ÏîÀ´½øÐв¨ÐεķÂÕæʱ¼ä¿ØÖÆ¡£ÈçÏÂͼ¹¤¾ßÌõ£¬·Ö±ðÊǸ´Î»²¨ÐÎ(¼´Çå¿ÕÏÖÓв¨
ÐÎ)¡¢ÔËÐзÂÕæ¡¢ÔËÐÐÌض¨Ê±³¤µÄ·ÂÕæ¡¢·ÂÕæʱ³¤ÉèÖᢷÂÕæʱ³¤µ¥Î»¡¢ µ¥²½ÔËÐС¢ÔÝÍ£¡¢ÖØÆô¶¯¡£
ͼ 1-27 ·ÂÕæ¿ØÖƹ¤¾ß
¹Û²ì·ÂÕ沨ÐÎÊÇ·ñ·ûºÏÔ¤ÆÚ¹¦ÄÜ¡£ÔÚ²¨ÐÎÏÔʾ´°¿ÚÉϲàÊDz¨ÐÎͼ¿ØÖƹ¤¾ß£¬ÓÉ×óµ½ÓÒ·Ö±ðÊÇ:²éÕÒ¡¢±£´æ²¨ ÐÎÅäÖᢷŴó¡¢ËõС¡¢Ëõ·Åµ½È«ÏÔʾ¡¢Ëõ·Åµ½¹â±ê¡¢×ªµ½Ê±¼ä 0¡¢×ªµ½Ê±¼äµÄ×îºó¡¢Ç°Ò»¸öÌø±ä¡¢ÏÂÒ»´ÎÌø±ä¡¢Ìí ¼Ó±ê¼Ç¡¢Ç°±ê¼Ç¡¢ÏÂÒ»¸ö±ê¼Ç¡¢½»»»¹â±ê¡£
ͼ 1-28 ²¨ÐÎͼ¿ØÖƹ¤¾ß ¿Éͨ¹ýÓÒ¼üÑ¡ÖÐÐźÅÀ´¸Ä±äÐźŵÄÏÔʾÐÎ̬¡£ÈçÏÂͼ½«ÐźŸÄΪ¶þ½øÖÆÏÔʾ¡£
ͼ 1-29 ·ÂÕ沨Ðδ°¿Ú 14
²é¿´²¨Ðμì²éÉè¼Æ¹¦ÄÜÕýÈ·ÐÔ¡£
ͼ 1-30 ·ÂÕ沨Ðνá¹û
1.5 Ìí¼ÓÔ¼ÊøÎļþ
Ìí¼ÓÔ¼ÊøÎļþÓÐÁ½ÖÖ·½·¨£¬Ò»ÊÇÀûÓà Vivado ÖÐ I/O Planning ¹¦ÄÜ£¬¶þÊÇÖ±½Óн¨ XDC µÄÔ¼ÊøÎļþ£¬ÊÖ¶¯ÊäÈë
Ô¼ÊøÃüÁî¡£ÏÂÃæ·Ö±ð½éÉÜÕâÁ½ÖÖ·½·¨:
1.5.1 ÀûÓà I/O Planning Éú³ÉÔ¼ÊøÎļþ
µã»÷¡°Flow Navigator¡±ÖС°Synthesis¡±Ïµġ°Run Synthesis¡±£¬ÔÚµ¯³öµÄ¡°Launch Runs¡±´°¿Úµã¡°OK¡±£¬ÏȶԹ¤
³Ì½øÐÐ×ۺϡ£
ͼ 1-31 ×ۺϹ¤³Ì ×ÛºÏÍê³ÉÖ®ºó£¬Ñ¡Ôñ¡°Open Synthesized Design¡±£¬´ò¿ª×ۺϺóµÄÍø±í¡£
ͼ 1-32 ´ò¿ª×ۺϽá¹û ´ËʱӦ¿´µ½ÈçϽçÃ棬Èç¹ûû³öÏÖÈçϽçÃ棬ÔÚͼʾλÖõġ°layout¡±ÖÐÑ¡Ôñ¡°I/O Planning¡±Ò»Ïî¡£
15
ͼ 1-33 I/O Planning ½çÃæ
ÔÚ½çÃæÓÒÏ·½µÄÑ¡ÏÖÐÇл»µ½¡°I/O Ports¡±Ò»À¸£¬²¢ÔÚ¶ÔÓ¦µÄÐźźó£¬ÔÚ¡°Site¡±Ò»ÁÐÊäÈë¶ÔÓ¦µÄ FPGA ¹Ü ½Å±êºÅ(»ò½«ÐźÅÍÏקµ½ÓÒÉÏ·½¡°Package¡±Í¼ÖжÔÓ¦µÄ¹Ü½ÅÉÏ)£¬²¢Ö¸¶¨¡°I/O std¡±¡£¾ßÌåµÄ FPGA Ô¼Êø¹Ü½ÅºÍ I/O µçƽ±ê×¼£¬¿É²Î¿¼¶ÔÓ¦°å¿¨µÄÔÀíͼ»òÌṩµÄ³£ÓõÄÒý½Å¶ÔÓ¦¹Øϵ±í(²Î¼û Áúо Artix-7 ʵÑéÏä-ÔÀíͼÓëÒý½Å Áбí)¡£
ͼ 1-34 Òý½Å¶ÔÓ¦¹Øϵ±í
Íê³É I/O Ports ÉèÖÃÈçÏÂͼ£¬¡°I/O Std¡±ÉèÖÃΪ¡°LVCMOS33*¡±±íÃ÷ I/O ±ê×¼ÊÇ 3.3V µÄ LVCMOS¡£
16
ͼ 1-35 Íê³É I/O ¶Ë¿ÚÉèÖà µã»÷×óÉÏ·½¹¤¾ßÀ¸Öеı£´æ°´Å¥£¬ÌáʾÌí¼ÓеÄÔ¼ÊøÎļþʹ×ۺϹýʱʧЧ¡£µã»÷¡°OK¡±¡£
ͼ 1-36 Ìáʾ×ÛºÏʧЧ
н¨ XDC Îļþ»òÑ¡Ôñ¹¤³ÌÖÐÒÑÓÐµÄ XDC Îļþ¡£Ñ¡Ôñ¡°Create a new file¡±£¬ÊäÈë¡°File name¡±£¬µã»÷¡°OK¡±
Íê³ÉÔ¼Êø¹ý³Ì¡£
ͼ 1-37 н¨ XDC ÎļþÉèÖà ÔÚ¡°Sources¡±´°¿Ú¡°Constraints¡±²ã´ÎÏ¿ÉÒԲ鿴н¨µÄ XDC Îļþ¡£
17
ͼ 1-38 Íê³É XDC Îļþ´´½¨ 1.5.2 н¨ XDC Îļþ²¢ÊÖ¶¯ÊäÈëÔ¼Êø
н¨Ô¼ÊøÎļþ¡£µã»÷¡°Add Sources¡±£¬Ñ¡Ôñ¡°Add or Create Constraints¡±£¬µã»÷¡°Next¡±¡£
ͼ 1-39 н¨Ô¼ÊøÎļþ Ìí¼Ó»ò´´½¨Ô¼ÊøÎļþ¡£µã»÷¡°Create Files¡±Ìí¼ÓÔ¼ÊøÎļþ¡£
18
ͼ 1-40 Ìí¼Ó»ò´´½¨Ô¼ÊøÎļþ
ÉèÖÃн¨µÄ XDC Îļþ£¬ÊäÈë XDC ÎļþÃû£¬µã»÷¡°OK¡±¡£Ä¬ÈÏÎļþÔÚ¹¤³ÌĿ¼Ïµġ°\led.srcs\constrs_1\new¡±
ÖС£
ͼ 1-41 н¨ XDC ÎļþÉèÖà Íê³Éн¨ XDC Îļþ£¬µã»÷¡°Finish¡±¡£
19
ͼ 1-42 Íê³Éн¨ XDC Îļþ ÔÚ¡°Sources¡±´°¿Ú¡°Constraints¡±ÏÂË«»÷´ò¿ªÐ½¨ºÃµÄ XDC Îļþ¡°led_xdc.xdc¡±£¬²¢²ÎÕÕÏÂÃæµÄÔ¼ÊøÎļþ¸ñ
ʽ£¬ÊäÈëÏàÓ¦µÄ FPGA ¹Ü½ÅÔ¼ÊøÐÅÏ¢ºÍµçƽ±ê×¼¡£
Ô¼ÊøÎļþ²Î¿¼:
ͼ 1-43 ´ò¿ª¿Õ°× XDC Îļþ
1 set_property PACKAGE_PIN H8 [get_ports {led[7]}]
2 set_property PACKAGE_PIN G8 [get_ports {led[6]}]
3 set_property PACKAGE_PIN F7 [get_ports {led[5]}]
4 set_property PACKAGE_PIN A4 [get_ports {led[4]}]
5 set_property PACKAGE_PIN A5 [get_ports {led[3]}]
6 set_property PACKAGE_PIN A3 [get_ports {led[2]}]
7 set_property PACKAGE_PIN D5 [get_ports {led[1]}]
8 set_property PACKAGE_PIN H7 [get_ports {led[0]}]
9 set_property PACKAGE_PIN Y6 [get_ports {switch[7]}]
10 set_property PACKAGE_PIN AA7 [get_ports {switch[6]}]
11 set_property PACKAGE_PIN W6 [get_ports {switch[5]}]
12 set_property PACKAGE_PIN AB6 [get_ports {switch[4]}]
13 set_property PACKAGE_PIN AC23 [get_ports {switch[3]}]
14 set_property PACKAGE_PIN AC22 [get_ports {switch[2]}]
20
15 set_property PACKAGE_PIN AD24 [get_ports {switch[1]}]
16 set_property PACKAGE_PIN AC21 [get_ports {switch[0]}]
17 set_property IOSTANDARD LVCMOS33 [get_ports {led[7]}]
18 set_property IOSTANDARD LVCMOS33 [get_ports {led[6]}]
19 set_property IOSTANDARD LVCMOS33 [get_ports {led[5]}]
20 set_property IOSTANDARD LVCMOS33 [get_ports {led[4]}]
21 set_property IOSTANDARD LVCMOS33 [get_ports {led[3]}]
22 set_property IOSTANDARD LVCMOS33 [get_ports {led[2]}]
23 set_property IOSTANDARD LVCMOS33 [get_ports {led[1]}]
24 set_property IOSTANDARD LVCMOS33 [get_ports {led[0]}]
25 set_property IOSTANDARD LVCMOS33 [get_ports {switch[7]}]
26 set_property IOSTANDARD LVCMOS33 [get_ports {switch[6]}]
27 set_property IOSTANDARD LVCMOS33 [get_ports {switch[5]}]
28 set_property IOSTANDARD LVCMOS33 [get_ports {switch[4]}]
29 set_property IOSTANDARD LVCMOS33 [get_ports {switch[3]}]
30 set_property IOSTANDARD LVCMOS33 [get_ports {switch[2]}]
31 set_property IOSTANDARD LVCMOS33 [get_ports {switch[1]}]
32 set_property IOSTANDARD LVCMOS33 [get_ports {switch[0]}]
1.6 ¹¤³ÌʵÏÖ
ÔÚ¡°Flow Navigator¡±Öеã»÷¡°Program and Debug¡±Ïµġ°Generate Bitstream¡±Ñ¡Ï¹¤³Ì»á×Ô¶¯Íê³É×ۺϡ¢
²¼¾Ö²¼Ïß¡¢Bit ÎļþÉú³É¹ý³Ì£¬Íê³ÉÖ®ºó£¬¿Éµã»÷¡°Open Implemented Design¡±À´²é¿´¹¤³ÌʵÏÖ½á¹û¡£
ͼ 1-44 Éú³É bit Á÷Îļþ Ìáʾ×ۺϹýʱÖØÐÂÔËÐÐ×ۺϺÍʵÏÖ£¬µã»÷¡°Yes¡±¡£ÔÚµ¯³öµÄ¡°Launch Runs¡±´°¿Úµã¡°OK¡±¡£
ͼ 1-45 ÌáʾÖØÐÂÔËÐÐ×ۺϺÍʵÏÖ
ÔÚ±ÈÌØÁ÷ÎļþÉú³ÉÍê³ÉµÄ´°¿ÚÑ¡Ôñ¡°Open Hardware Manager¡±£¬½øÈëÓ²¼þ¹ÜÀí½çÃæ¡£Á¬½Ó FPGA ¿ª·¢°åµÄµç Ô´ÏߺÍÓëµçÄÔµÄÏÂÔØÏߣ¬´ò¿ª FPGA µçÔ´¡£
21
ͼ 1-46 ´ò¿ªÓ²¼þ³ÌÐòºÍµ÷ÊÔ¹ÜÀí
ÔÚ¡°Hardware Manager¡±´°¿ÚµÄÌáʾÐÅÏ¢ÖУ¬µã»÷¡°Open target¡±µÄÏÂÀ²Ëµ¥µÄ¡°Open New Target¡±(»òÔÚ ¡°Flow Navigator¡±Ï¡°Program and Debug¡±ÖÐÕ¹¿ª¡°Open Hardware Manager¡±£¬µã»÷¡°Open Target¡±->¡°Open New Target¡±)¡£Ò²¿ÉÒÔÑ¡Ôñ¡°Auto Connect¡±×Ô¶¯Á¬½ÓÆ÷¼þ¡£
ͼ 1-47 ´ò¿ªÐÂÄ¿±ê
ÔÚ¡°Open Hardware Target¡±Ïòµ¼ÖУ¬Ïȵã»÷¡°Next¡±£¬½øÈë Server Ñ¡ÔñÏòµ¼¡£
ͼ 1-48 Open Hardware Target Ïòµ¼ Ñ¡ÔñÁ¬½Óµ½¡°Local server¡±£¬µã»÷¡°Next¡±¡£
22
Ñ¡ÔñÄ¿±êÓ²¼þ£¬µã»÷¡°Next¡±¡£
ͼ 1-49 Á¬½Ó Local server
Íê³ÉÄ¿±êÓ²¼þ´ò¿ª¡£µã»÷¡°Finish¡±¡£
ͼ 1-50 Ñ¡ÔñÄ¿±êÓ²¼þ
23
ͼ 1-51 Íê³ÉÄ¿±êÓ²¼þ´ò¿ª ¶ÔÄ¿±êÓ²¼þ±à³Ì¡£ÔÚ¡°Hardware¡±´°¿ÚÓÒ¼üµ¥»÷Ä¿±êÆ÷¼þ¡°xc7a200t_0¡±£¬Ñ¡Ôñ¡°Program Device…¡±¡£»òÕß
¡°Flow Navigator¡±´°¿ÚÖС°Program and Debug¡±->¡°Hardware Manager¡±->¡°Program Device¡±¡£
ͼ 1-52 ¶ÔÄ¿±êÆ÷¼þ±à³Ì Ñ¡ÔñÏÂÔØµÄ bit Á÷Îļþ£¬µã»÷¡°Program¡±¡£
24
ͼ 1-53 Ñ¡Ôñ bit Á÷Îļþ Íê³ÉÏÂÔغ󣬡°Hardware¡±´°¿Úϵġ°xc7a200t_0¡±µÄ״̬±ä³É¡°Programmed¡±¡£
ͼ 1-54 Íê³É FPGA ±à³Ì
FPGA ¿ª·¢°åÉÏ£¬8 ¸ö²¦Â뿪¹Ø SW18~SW25 ¶ÔÓ¦¿ØÖÆ 8 ¸ö led µÆ LED1~LED8 µÄÁÁÃð¡£Éè¼ÆÍê³É¡£
25
ͼ1-55 FPGAÔËÐнá¹û
26