ISE8.2开发使用步骤.docVIP

  • 25
  • 0
  • 约4.41千字
  • 约 26页
  • 2017-05-12 发布于河南
  • 举报
ISE8.2开发使用步骤

打开ISE8.2i软件: 双击桌面快捷方式 或者按步骤 Start → All Programs → Xilinx ISE 8.2i → Project Navigator 打开ISE软件。 建立新工程: 点击File,选择New Project,打开新工程创建向导。 在工程名字中输入led_test。并将工程保存在自己想保存的位置:F:\FPGA_study\ISE_project。 在Top-Level Source Type选择项中选择HDL,然后点next进行下一步。 在对话框“New Project Wizard – Device Properties”中,按下图选择工程的器件配置。然后点击next进行下一步 点next。 点next。 点Finish。 创建Verilog资源 在sources窗口中右击,选择new source。如下图。 选择Verilog Module,并在File name中输入led_test。点击next。 在对话框中Port Name栏中分别输入CLOCK和led,其中CLOCK为输入;led为输出,且led的Bus一栏打上勾,并在MSB一栏输入数字7。然后点next。 选择Finish。生成的文件窗口如下图。 编辑文件“led_test.v” module led_test(CLOCK, led); input CLOCK; output [7:0] led; reg [7:0] led; reg [22:0] count = 0; parameter bit1 = 8b0000_0001, bit2 = 8b0000_0010, bit3 = 8b0000_0100, bit4 = 8b0000_1000, bit5 = 8b0001_0000, bit6 = 8b0010_0000, bit7 = 8b0100_0000, bit8 = 8b1000_0000; always @(posedge CLOCK) begin count = count + 1; if(count == 4000000)count = 0; //每100ms变一次 0 end always @(posedge CLOCK) begin if(count == 1) begin case(led) bit1: led = bit2; bit2: led = bit3; bit3: led = bit4; bit4: led = bit5; bit5: led = bit6; bit6: led = bit7; bit7: led = bit8; bit8: led = bit1; default: led = bit1; endcase end end endmodule 检查所写的程序代码是否有误 在Sources窗口的下拉项中选择Synthesis/Implementation。 在Sources窗口中选择led_test.v文件。 在Process窗口中,展开“Synthesize - XST”,并双击“Check Syntax”项。检查结束后,如果无语法错误,“Check Syntax”前会有一个绿色的勾。 设计仿真 Verifying Functionality using Behavioral Simulation 右击source窗口中的led_test,添加新文件。 在对话框中选择“Verilog Test Fixture”,并在File name中输入led_test_ft,点击next。 点击next。 点击Finish。从而创建测试文件“led_test_ft.v”。如下图所示。 编辑测试代码,在endmodule前加语句 “always #12.5 CLOCK =~ CLOCK;”,产生40M的时钟。保存测试文件。 在sources for窗口的下拉项中选择Behavioral Simulation。在source窗口中选中文件“led_test_ft_v”,在process窗口中展开“modelsim simulator”,右击“simulate behavioral model”,选择属性。 在process properties对话框中,将“simulation run time”设置为0 ns。 双击“simulat

文档评论(0)

1亿VIP精品文档

相关文档