当前位置:网站首页>Usage of vivado vio IP
Usage of vivado vio IP
2022-06-27 23:23:00 【ML__ LM】
vivado VIO IP Usage of
0 Program function
adopt VIO Analog keys to control DDS The frequency control word , So as to obtain sine waves of different frequencies .
Program structure
Must pass ILA To simulate VIO,testbench Can't simulate VIO.
1 IP Nuclear instantiation
1.1 VIO IP Exemplification of
vio_0 your_instance_name (
.clk(clk), // input wire clk
.probe_out0(probe_out0) // output wire [1 : 0] probe_out0
);
1.2 DDS IP
dds_sin your_instance_name (
.aclk(aclk), // input wire aclk
.s_axis_config_tvalid(s_axis_config_tvalid), // input wire s_axis_config_tvalid
.s_axis_config_tdata(s_axis_config_tdata), // input wire [23 : 0] s_axis_config_tdata
.m_axis_data_tvalid(m_axis_data_tvalid), // output wire m_axis_data_tvalid
.m_axis_data_tdata(m_axis_data_tdata), // output wire [47 : 0] m_axis_data_tdata
.m_axis_phase_tvalid(m_axis_phase_tvalid), // output wire m_axis_phase_tvalid
.m_axis_phase_tdata(m_axis_phase_tdata) // output wire [23 : 0] m_axis_phase_tdata
);
2 Program
2.1 Program structure
2.2 Top level modules
`timescale 1ns / 1ps
module top(
input sys_clk ,// The system clock 50MHz T=20ns
input rst_n // System reset
);
// -----------0、VIO Key control frequency control word (key_PINC)
wire [1:0] key_PINC;
vio_0 vio_0_inst (
.clk(sys_clk), // input wire clk
.probe_out0(key_PINC) // output wire [1 : 0] probe_out0
);
//---------------1、 Signal frequency control module --------------//
wire [23:0] Fword ; // Frequency word
Fword_set Fword_set_inst(
//input
.clk (sys_clk ),
.rst_n (rst_n ),
.key_PINC (key_PINC ),
//output
.Fword (Fword )
);
//---------------2、DDS modular --------------//
//input
wire [0:0] fre_ctrl_word_en ;
//output
wire [0:0] m_axis_data_tvalid ;
wire [47:0] m_axis_data_tdata ;
wire [0:0] m_axis_phase_tvalid ;
wire [23:0] m_axis_phase_tdata ;
assign fre_ctrl_word_en=1'b1;
// Exemplification DDS IP
dds_sin dds_sin_inst (
.aclk (sys_clk ), // input wire aclk
.s_axis_config_tvalid (fre_ctrl_word_en ), // input wire s_axis_config_tvalid
.s_axis_config_tdata (Fword ), // input wire [23: 0] s_axis_config_tdata
.m_axis_data_tvalid (m_axis_data_tvalid ), // output wire m_axis_data_tvalid
.m_axis_data_tdata (m_axis_data_tdata ), // output wire [47 : 0] m_axis_data_tdata
.m_axis_phase_tvalid (m_axis_phase_tvalid ), // output wire m_axis_phase_tvalid
.m_axis_phase_tdata (m_axis_phase_tdata ) // output wire [23 : 0] m_axis_phase_tdata
);
ila_1 ila_1_inst (
.clk(sys_clk), // input wire clk
.probe0(key_PINC), // input wire [1:0] probe0
.probe1(Fword), // input wire [23:0] probe1
.probe2(m_axis_data_tdata) // input wire [47:0] probe2
);
endmodule
2.3 Fword_set modular
`timescale 1ns / 1ps
//
// Press the key to select the corresponding frequency control word , Then select the corresponding signal frequency
//
module Fword_set(
input clk ,
input rst_n ,
input [1:0] key_PINC ,
output reg [23:0] Fword
);
//[email protected](posedge clk or negedge rst_n)
//begin
// if(!rst_n)
// key_sel <= 4'd0;
// else
// key_sel <= key_sel;
//end
// The output frequency(f_out ) , of the DDS waveform is a function of the system clock frequency(f_clk ) .
// the phase width, that is, number of bits (B ) in the phase accumulator
// and the phase increment value (deta_theta) .
// The output frequency in Hertz is defined by:f_out=f_clk*deta_theta/(2^B)
// fre_ctrl_word How to determine ?
// according to IP Nuclear summery, phase width=20bits Frequency per channel=100MHz
// Calculation formula of output frequency f_out=f_clk*deta_theta/(2^B)=100M* 104857/(2^20 )= 10M
[email protected](*)
begin
case(key_PINC)
0: Fword <= 'h28f5; //1Mhz 10485 The value of each phase increase deta_theta
1: Fword <= 'h51eb; //2Mhz 20971
2: Fword <= 'ha3d7; //4Mhz 41943
3: Fword <= 'h19999; //10Mhz 104857
endcase
end
endmodule
2.4 Constraint file
set_property PACKAGE_PIN U18 [get_ports sys_clk]
set_property IOSTANDARD LVCMOS33 [get_ports sys_clk]
set_property PACKAGE_PIN J16 [get_ports rst_n]
set_property IOSTANDARD LVCMOS33 [get_ports rst_n]
# Timing constraints
create_clock -period 20.000 -name sys_clk -waveform {
0.000 10.000} [get_ports sys_clk]
3 result
key_PINC=0(2’b01)
key_PINC=2(2’b10)
边栏推荐
- Detect objects and transfer images through mqtt
- Azure Kinect DK 实现三维重建 (PC非实时版)
- 量化交易入门教程
- [essay]me53n add button to call URL
- Liuleifeng, a "good man in Guangzhou" in the first quarter of 2022, has a strong sense of integrity and food safety
- Spark BUG實踐(包含的BUG:ClassCastException;ConnectException;NoClassDefFoundError;RuntimeExceptio等。。。。)
- Hiplot 在線繪圖工具的本地運行/開發庫開源
- Azure Kinect DK realizes 3D reconstruction (Jetson real-time version)
- MySQL十八:写语句的执行过程
- 资深猎头团队管理者:面试3000顾问,总结组织出8大共性(茅生)
猜你喜欢
Ice cream or snow "high"?
Azure Kinect DK realizes 3D reconstruction (PC non real time version)
Arcgis-engine二次开发之空间关系查询与按图形查询
This kind of people began to be robbed by VC with a monthly salary of 80000 yuan
因美纳陷数据泄露“丑闻”:我国基因数据安全能交给美企吗?
Feign implements path escape through custom annotations
【经典干货书】数据科学中的信息理论方法,561页pdf
Detect objects and transfer images through mqtt
"Top stream Aidou manufacturing machine" cooperates with four industrial capitals to become LP
陈云pytorch学习笔记_用50行代码搭建ResNet
随机推荐
NDSS 2022 接收的列表
Typora 1.2.5等版本下载
跟着存档教程动手学RNAseq分析(四):使用DESeq2进行DE分析的QC方法
批量处理-Excel导入模板1.1-支持多Sheet页
【剑指Offer】47. 礼物的最大价值
【数字IC/FPGA】检测最后一个匹配序列的位置
Spug - 轻量级自动化运维平台
上手了一个自然语言模型BLOOM
Livox lidar+ Hikvision camera real-time 3D reconstruction based on loam to generate RGB color point cloud
MySQL删除表后如何使ID从1开始
EXCEL 打印设置公共表头
CUDA error:out of memory caused by insufficient video memory of 6G graphics card
OData - SAP S4 OP 中使用SAP API Hub 的API
Zabbix6.0升级指南-数据库如何同步升级?
元气森林的5元有矿之死
Is it safe to use flush mobile phones to speculate in stocks?
EasyCVR平台路由日志功能的技术实现过程【附代码】
Discuz taobaoke website template / Dean taobaoke shopping style commercial version template
STM32与RC522简单公交卡系统的设计
Azure Kinect DK 实现三维重建 (jetson实时版)