vivado创建工程
1. 创建工程
1 打开vivado,软件
- 选择Create Project
选择芯片型号:xc7a35tfgg484-2
xc7a35tfgg484-2
最后完成
2. 创建工程文件
点击+号创建文件
创建完成
3.在文件中写入代码
`timescale 1ns / 1ps
//
// Company:
// Engineer:
//
// Create Date: 2021/06/21 20:01:55
// Design Name:
// Module Name: LED
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
//LED 是之前新建的工程名称,如果更改的话这里需要一起改变
module LED(
input clk,
input rst_n,
output reg led
);
reg [25:0] cnt;
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
cnt <= 26'd0;
else if (cnt < 26'd49_999_999)
cnt <= cnt + 1'b1;
else
cnt <= 26'd0;
end
always @ (posedge clk or negedge rst_n)
begin
if (!rst_n)
led <= 1'b0;
else if (cnt == 26'd49_999_999)
led <= ~led;
else
led <= led;
end
endmodule
4. 检查语法问题
点击如下按键,open elaborated design
点击上图的按键 schematic 可以出现,原理图式的界面,这个在整个的设计中十分重要
显示出的如下图,原理图的方式显示的整个逻辑。
5 设计综合
点击了YES,弹出了device的选择。