当前位置:网站首页>Floating point multiplication and division of vivado IP core floating point
Floating point multiplication and division of vivado IP core floating point
2022-07-29 06:39:00 【Doze in the wind】
Vivado IP Floating point multiplication and division of kernel Floating-point
Catalog
One 、 Floating point multiplication and division 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 Floating point multiplication and division Let's introduce it in detail 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 multiplication and division example
In order to facilitate the analysis of the results of the later simulation , Here we will give examples of floating-point multiplication and division , The following example is directly used for simulation , To verify whether the simulation results are correct .
example: Set floating point number a=32'b1100_0000_1101_0011_0011_0011_0011_0011, namely a=-6.6, Floating point numbers b=32'b0100_0001_0000_1100_1100_1100_1100_1101, namely b=8.8, be a*b=32'b1100_0010_0110_1000_0101_0001_1110_1100, namely a*b=-58.08,a/b=32'b1011_1111_0100_0000_0000_0000_0000_0000, namely a/b=-0.75.
Two 、Floating-point IP Core configuration steps
1. Multiplier configuration
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 Multiplier IP nucleus .
2. Divider configuration
stay vivado Mid search Floating-point, To find the IP After the core, you can complete the corresponding configuration according to the following operations .
1. First configuration Operation Selection Interface , Pictured 5 Shown .

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

3. Then configure Optimizations Interface , Pictured 7 Shown .

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

above 4 After all the interfaces are configured, you can click on the lower right corner OK Button generation A divider IP nucleus .
3、 ... and 、 Simulation
1. Top level code
Build a top-level module , Name it float_mul_div, 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/23 16:40:34
// Design Name:
// Module Name: float_mul_div
// Project Name:
// Target Devices:
// Tool Versions: 2017.4
// Description:
// Dependencies:
// Revision:1.0
// Revision 0.01 - File Created
// Additional Comments:
//
//
module float_mul_div(
input clk,
input a_tvalid,
input [31:0] a_tdata,
input b_tvalid,
input [31:0] b_tdata,
output mul_result_tvalid,
output [31:0] mul_result_tdata,
output div_result_tvalid,
output [31:0] div_result_tdata
);
float_multiply u1_float_multiply( // Multiplier
.aclk(clk),
.s_axis_a_tvalid(a_tvalid),
.s_axis_a_tdata(a_tdata),
.s_axis_b_tvalid(b_tvalid),
.s_axis_b_tdata(b_tdata),
.m_axis_result_tvalid(mul_result_tvalid),
.m_axis_result_tdata(mul_result_tdata)
);
float_divide u1_float_divide( // A divider
.aclk(clk),
.s_axis_a_tvalid(a_tvalid),
.s_axis_a_tdata(a_tdata),
.s_axis_b_tvalid(b_tvalid),
.s_axis_b_tdata(b_tdata),
.m_axis_result_tvalid(div_result_tvalid),
.m_axis_result_tdata(div_result_tdata)
);
endmodule
2. Simulation code
Build a simulation module , Name it float_mul_div_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/23 17:03:52
// Design Name:
// Module Name: float_mul_div_tb
// Project Name:
// Target Devices:
// Tool Versions: 2017.4
// Description:
// Dependencies:
// Revision:1.0
// Revision 0.01 - File Created
// Additional Comments:
//
//
module float_mul_div_tb();
reg clk;
reg a_tvalid;
reg [31:0] a_tdata;
reg b_tvalid;
reg [31:0] b_tdata;
wire mul_result_tvalid;
wire [31:0] mul_result_tdata;
wire div_result_tvalid;
wire [31:0] div_result_tdata;
float_mul_div u1_float_mul_div(
.clk(clk),
.a_tvalid(a_tvalid),
.a_tdata(a_tdata),
.b_tvalid(b_tvalid),
.b_tdata(b_tdata),
.mul_result_tvalid(mul_result_tvalid),
.mul_result_tdata(mul_result_tdata),
.div_result_tvalid(div_result_tvalid),
.div_result_tdata(div_result_tdata)
);
always #5 clk=~clk;
initial begin
clk=1'b0;
#15; a_tvalid<=1'b1;
a_tdata<=32'b1100_0000_1101_0011_0011_0011_0011_0011; //-6.6
b_tvalid<=1'b1;
b_tdata<=32'b0100_0001_0000_1100_1100_1100_1100_1101; //8.8
end
endmodule
Four 、 Analysis of simulation results
The simulation results are shown in the figure 9 Shown , Compare the examples of floating-point multiplication and division listed above , It can be seen that this module successfully realizes the multiplication and division of floating-point numbers .

summary
This time, I introduce How do you use it? vivado Medium Floating-point IP Verify the multiplication and division of floating-point numbers .
边栏推荐
- 虹科分享 | 带您全面认识“CAN总线错误”(一)——CAN总线错误与错误帧
- The difference between DDoS attack and CC attack
- DDoS详解
- 虹科Automation softPLC | MoDK运行环境与搭建步骤(1)——运行环境简介
- Inventory | major network security events of global key information infrastructure
- Redshift restore SP effect - SP map export settings and map import configuration
- Network Security Learning (II)
- Six common ways for hackers to attack servers
- Phishing mail disposal
- What is the lifecycle of automated testing?
猜你喜欢

使用STP生成树协议解决网络中的二层环路问题

day14_单元测试&日期常用类&字符串常用类

FIR filter design (1) -- using the FDATool toolbox of MATLAB to design FIR filter parameters

MerkleTree 构建QT实现UI

Maya aces workflow configuration (Arnold and redshift map configuration specification - restore the correct effect of the map under the SP aces process) PS restore the rendered map under the aces proc
![Self study understanding of [chain forward star]](/img/b4/7f66026a482540bf27f088c321a840.png)
Self study understanding of [chain forward star]

Design of IIR filter based on FPGA
![[leetcode skimming] array 2 - binary search](/img/50/c006cbe5a91774c99eb782d9203fa0.png)
[leetcode skimming] array 2 - binary search

day15_泛型

基于TCP的在线词典
随机推荐
DDoS攻击与CC攻击的区别
day02_ Basic grammar
day12_多线程
How to judge whether a business is attacked by DDoS? What harm will it cause?
day03_2_作业
七、 下一代互联网IPV6
TCP socket communication experiment
day13_ Under multithreading
FPGA - odd even frequency division and decimal frequency division code routine
FIR滤波器设计(1)——利用matlab的fdatool工具箱设计FIR滤波器参数
基于FPGA的IIR型滤波器设计
【面试题】2022年最新软件测试面试题(400道)【附带答案】持续更新...
2022 summer second day information competition learning achievement sharing 1
What is DNS amplification attack
day12_ Multithreading
虹科分享 | 带你全面了解“CAN总线错误”(四)——在实践中生产和记录CAN错误
Day16 set
使用STP生成树协议解决网络中的二层环路问题
On defect description style
基于udp通信的在线多人聊天室