当前位置:网站首页>zcu102 PL端流水灯
zcu102 PL端流水灯
2022-06-22 11:55:00 【Alen.Wang】
详细操作步骤,请参考:https://blog.csdn.net/botao_li/article/details/85257566
本文仅增加部分注释。
#IO约束
set_property PACKAGE_PIN AL12 [get_ports {leds[7]}]
set_property PACKAGE_PIN AH14 [get_ports {leds[6]}]
set_property PACKAGE_PIN AH13 [get_ports {leds[5]}]
set_property PACKAGE_PIN AJ15 [get_ports {leds[4]}]
set_property PACKAGE_PIN AJ14 [get_ports {leds[3]}]
set_property PACKAGE_PIN AE13 [get_ports {leds[2]}]
set_property PACKAGE_PIN AF13 [get_ports {leds[1]}]
set_property PACKAGE_PIN AG14 [get_ports {leds[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[7]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[6]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[5]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[4]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {leds[0]}]
set_property PACKAGE_PIN G21 [get_ports clk_p]
#set_property PACKAGE_PIN F21 [get_ports clk_n]
set_property IOSTANDARD LVDS_25 [get_ports clk_p]
set_property IOSTANDARD LVDS_25 [get_ports clk_n]
#时钟周期约束
#“create_clock”是该命令的名称,它会创建一个时钟;
# 其后的“-name clk_125_in”、“-period 8”、“[get_ports clk_p ]”都是该命令的各个参数,
# 分别表示所创建的时钟的名称是“clk_125_in”、时钟周期是 8ns、时钟源是 clk_p 端口
# -period 8.000 -waveform {0.000 4.000} :代表的是时钟周期8ns,其中上升沿是在0ns的位置,下降沿是在4ns的位置
create_clock -period 8.000 -name clk_125_in -waveform {0.000 4.000} [get_ports clk_p]
相应的Verilog代码如下:
`timescale 1ns / 1ps
//
// Company:
// Engineer:
//
// Create Date: 2020/01/06 19:17:04
// Design Name:
// Module Name: pl_top
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module pl_top(
input clk_p,
input clk_n,
output [7:0] leds
);
wire clk;//125MHz工作时钟
//用原语实现差分时钟转单端
IBUFDS
#(
.IOSTANDARD("DEFAULT")//DEFAULT默认所有情况
)
IBUFDS_inst
(
.O(clk),//输出
.I(clk_p),//P端输入
.IB(clk_n)//N端输入
);
//定义输出寄存器
reg [7:0] leds = 8'b0000_0001;
//计数器,计时1秒,计数范围0~27'd125_000_000-1
reg [26:0] cnt = 27'd0;
always @(posedge clk) begin
case (cnt)
27'd124_999_999: begin
cnt <= 27'd0;//计数复位
leds <= {leds[6:0], leds[7]};//循环移位
end
default: begin
cnt <= cnt+27'd1;//计数
leds <= leds;//保持
end
endcase
end
endmodule
边栏推荐
- Endeavouros installation configuration introduction!
- Redis - 11. Cluster
- oracle存储过程2
- 初始transformer需要了解的一些概念
- DevSecOps: CI/CD 流水线安全的最佳实践
- Struggle, programmer -- Chapter 36 the falling flower man is independent and the tiny swift flies
- 磁盘rejecting I/O to offline device故障导致4TB生产数据库无法访问
- Redis - 8. Persistent RDB (redis database)
- Fight, programmer chapter 39 how can you admire a bosom friend if you are not disappointed in life
- Invisible traffic Commander: on Urban Rail Transit Signal System
猜你喜欢

0007-Reverse Integer(整数反转)

Redis - 7. Opérations de transaction

Invisible traffic Commander: on Urban Rail Transit Signal System

推荐系统从入门到接着入门

Redis - 4、新的3种数据类型
![[安洵杯 2019]iamthinking](/img/56/ffdcdeb8246d9ae7fb1eb72b45b614.png)
[安洵杯 2019]iamthinking

YuMinHong said that e-commerce schools may be opened in the future; Musk's son applied to sever the father son relationship; Hungry? Respond to a large number of users receiving the free order informa

TIS教程03-导出

TIS教程04-客户端

1961-Check If String Is a Prefix of Array(检查字符串是否为数组前缀)
随机推荐
Redis - 7. Opérations de transaction
Differences between SPI and API
Promise upgraded async, await is coming, which is more fragrant with try+catch
More than half of 2022, no new air outlet
宏定义使用以及typedef和const
Summary of SQL injection bypass methods
Redis - 11. Cluster
函数指针和指针函数的区别
Could not determine which parameter to assign generated keys to
【高频笔试题】513. 找树左下角的值
SPI 与 API的区别
TIS教程02-模型
报错:unresolved variable $bus 及 “TypeError: Cannot read property ‘$on‘ of undefined“
TIS教程01-安装
ONNX调研
0007-Reverse Integer(整数反转)
[2022 summer] [leetcode] 31 Next spread
JMeter generates test reports
【李宏毅】机器学习深度学习笔记 -- 训练模型通关攻略
初始transformer需要了解的一些概念