赞
踩
本文介绍如何在教程(三)基础上, 关联ELF输出文件并使用vivado对系统进行行为仿真. 点击vivado 开发教程 汇总, 查看教程的其他内容.
- wire [7:0]led_8bits_tri_o;
- wire reset;
- wire rs232_uart_rxd;
- wire rs232_uart_txd;
- wire sysclk_125_clk_n;
- wire sysclk_125_clk_p;
-
- system system_i
- (.led_8bits_tri_o(led_8bits_tri_o),
- .reset(reset),
- .rs232_uart_rxd(rs232_uart_rxd),
- .rs232_uart_txd(rs232_uart_txd),
- .sysclk_125_clk_n(sysclk_125_clk_n),
- .sysclk_125_clk_p(sysclk_125_clk_p));
- `timescale 1ns / 1ns
-
- module sim_system;
-
- wire [7:0]led_8bits_tri_o;
- reg reset;
- reg rs232_uart_rxd;
- wire rs232_uart_txd;
- reg sysclk_125_clk_n;
- wire sysclk_125_clk_p = ~sysclk_125_clk_n;
-
- system system_i
- (.led_8bits_tri_o(led_8bits_tri_o),
- .reset(reset),
- .rs232_uart_rxd(rs232_uart_rxd),
- .rs232_uart_txd(rs232_uart_txd),
- .sysclk_125_clk_n(sysclk_125_clk_n),
- .sysclk_125_clk_p(sysclk_125_clk_p));
-
- initial begin
- reset = 1;
- rs232_uart_rxd = 1;
- sysclk_125_clk_n = 0;
-
- #100;
- reset = 0; // 复位完成
- end
-
- always #4 sysclk_125_clk_n = ~sysclk_125_clk_n; // 125M
-
- endmodule
#define LED_DELAY 1000
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。