当前位置:网站首页>Floating point square root of vivado IP core floating point
Floating point square root of vivado IP core floating point
2022-07-29 06:39:00 【Doze in the wind】
Vivado IP Core floating point number square root Floating-point
Catalog
One 、 Floating point number square root example
Two 、Floating-point IP Core configuration steps
Preface
With the continuous development of manufacturing technology , Field programmable logic gate array (FPGA) More and more integration , More and more applications , Among them, some mathematical processing classes must be used when processing digital signals IP nucleus . Recently, research on Spatial Adaptive Anti-jamming Technology is under way FPGA Hardware implementation , Some of them are inevitably used IP nucleus , Today from Square root of floating point number Let's briefly introduce vivado In the middle of Floating-point This IP Nuclear bar , I hope it can help you in your study .
Tips : The following is the main body of this article , All are original by the author , It's not easy to write an article , I hope you will attach a link to this article when reprinting .
One 、 Floating point number square root example
In order to facilitate the analysis of the results of the later simulation , Here we list Square root of floating point number Example , The following example is directly used for simulation , To verify whether the simulation results are correct .
example: Set floating point number a=32'h3EB851EC, namely a=0.36, be
=32'h3F19999A, namely 
=0.6.
Two 、Floating-point IP Core configuration steps
1. First configuration Operation Selection Interface , Pictured 1 Shown .

2. Next configuration Precision of Inputs Interface , Pictured 2 Shown .

3. Then configure Optimizations Interface , Pictured 3 Shown .

4. Final configuration Interface Options Interface , Pictured 4 Shown .

above 4 After all the interfaces are configured, you can click on the lower right corner OK Button generation prescribing IP nucleus .
3、 ... and 、 Simulation
1. Top level code
Build a top-level module , Name it float_sqrt, Used to instantiate the just generated IP nucleus .
The code is as follows :
`timescale 1ns / 1ps
//
// Company: cq university
// Engineer: clg
// Create Date: 2022/07/28 10:26:26
// Design Name:
// Module Name: float_sqrt
// Project Name:
// Target Devices:
// Tool Versions: 2017.4
// Description:
// Dependencies:
// Revision:1.0
// Revision 0.01 - File Created
// Additional Comments:
//
module float_sqrt(
input clk, // Input clock signal
input a_valid, // Input data valid signal
input [31 : 0] a_data, // input data
output wire re_valid, // Output result valid signal
output wire [31 : 0] re_data // Output the square root result
);
float_sqrt_ip u1_float_sqrt_ip ( // Exemplification IP nucleus
.aclk(clk),
.s_axis_a_tvalid(a_valid),
.s_axis_a_tdata(a_data),
.m_axis_result_tvalid(re_valid),
.m_axis_result_tdata(re_data)
);
endmodule
2. Simulation code
Build a simulation module , Name it float_sqrt_tb, It is used to simulate the instantiation of the top-level module just now IP nucleus .
The code is as follows :
`timescale 1ns / 1ps
//
// Company: cq university
// Engineer: clg
// Create Date: 2022/07/28 10:34:15
// Design Name:
// Module Name: float_sqrt_tb
// Project Name:
// Target Devices:
// Tool Versions: 2017.4
// Description:
// Dependencies:
// Revision:1.0
// Revision 0.01 - File Created
// Additional Comments:
//
module float_sqrt_tb();
reg clk;
reg a_valid;
reg [31:0] a_data;
wire re_valid;
wire [31:0] re_data;
float_sqrt u1_float_sqrt(
.clk(clk),
.a_valid(a_valid),
.a_data(a_data),
.re_valid(re_valid),
.re_data(re_data)
);
always #5 clk=~clk;
initial begin
clk=1'b0;
#15;a_valid=1'b1;
a_data=32'h3EB851EC; //3.6
#280;a_valid=1'b0;
end
endmodule
Four 、 Analysis of simulation results
The simulation results are shown in the figure 5 Shown , Compare the examples of floating-point number square root listed above , It can be seen that this module successfully realizes the square root of floating-point numbers .

summary
This time, I introduce How do you use it? vivado Medium Floating-point IP Verify the square root of the floating-point number .
边栏推荐
猜你喜欢
随机推荐
day17_ Under collection
day13_多线程下
day03_ 1_ Process control
钓鱼邮件处置
一文看懂网络安全五年之巨变
Plugin location in mavan
三、广域通信网
FPGA - odd even frequency division and decimal frequency division code routine
Design and simulation code of 4-bit subtracter based on FPGA
How to pre circumvent the vulnerabilities of unsafe third-party components?
Circular linked list and bidirectional linked list
服务器常见故障及其解决方法
Self study understanding of [chain forward star]
【面试题】2022年最新软件测试面试题(400道)【附带答案】持续更新...
Advanced socket programming (options and control information)
Network Security Learning (I)
虹科分享 | 带你全面了解“CAN总线错误”(三)——CAN节点状态与错误计数器
摊余成本最牛例子
Inventory | major network security events of global key information infrastructure
Vivado IP核之浮点数乘除法 Floating-point









