Skip to content

Commit 77cea20

Browse files
committed
Add HLS results verilog and tcl
1 parent 18ad765 commit 77cea20

10 files changed

+1020
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
// ==============================================================
2+
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
3+
// Version: 2019.1
4+
// Copyright (C) 1986-2019 Xilinx, Inc. All Rights Reserved.
5+
//
6+
// ===========================================================
7+
8+
`timescale 1 ns / 1 ps
9+
10+
(* CORE_GENERATION_INFO="Filter,hls_ip_2019_1,{HLS_INPUT_TYPE=sc,HLS_INPUT_FLOAT=0,HLS_INPUT_FIXED=0,HLS_INPUT_PART=xc7a75ti-ftg256-1L,HLS_INPUT_CLOCK=10.000000,HLS_INPUT_ARCH=others,HLS_SYN_CLOCK=8.728964,HLS_SYN_LAT=12,HLS_SYN_TPT=none,HLS_SYN_MEM=0,HLS_SYN_DSP=11,HLS_SYN_FF=1242,HLS_SYN_LUT=1311,HLS_VERSION=2019_1}" *)
11+
12+
module Filter (
13+
input_window_0,
14+
input_window_1,
15+
input_window_2,
16+
input_window_3,
17+
input_window_4,
18+
input_window_5,
19+
input_window_6,
20+
input_window_7,
21+
input_window_8,
22+
output_r,
23+
clk,
24+
ap_rst
25+
);
26+
27+
28+
input [7:0] input_window_0;
29+
input [7:0] input_window_1;
30+
input [7:0] input_window_2;
31+
input [7:0] input_window_3;
32+
input [7:0] input_window_4;
33+
input [7:0] input_window_5;
34+
input [7:0] input_window_6;
35+
input [7:0] input_window_7;
36+
input [7:0] input_window_8;
37+
output [7:0] output_r;
38+
input clk;
39+
input ap_rst;
40+
41+
reg[7:0] output_r;
42+
43+
wire [7:0] grp_Filter_filter_fu_72_output_r;
44+
wire grp_Filter_filter_fu_72_output_r_ap_vld;
45+
wire [1:0] ap_CS_fsm;
46+
wire ap_CS_fsm_state2;
47+
48+
Filter_filter grp_Filter_filter_fu_72(
49+
.ap_clk(clk),
50+
.ap_rst(ap_rst),
51+
.input_window_0(input_window_0),
52+
.input_window_1(input_window_1),
53+
.input_window_2(input_window_2),
54+
.input_window_3(input_window_3),
55+
.input_window_4(input_window_4),
56+
.input_window_5(input_window_5),
57+
.input_window_6(input_window_6),
58+
.input_window_7(input_window_7),
59+
.input_window_8(input_window_8),
60+
.output_r(grp_Filter_filter_fu_72_output_r),
61+
.output_r_ap_vld(grp_Filter_filter_fu_72_output_r_ap_vld)
62+
);
63+
64+
always @ (posedge clk) begin
65+
if ((grp_Filter_filter_fu_72_output_r_ap_vld == 1'b1)) begin
66+
output_r <= grp_Filter_filter_fu_72_output_r;
67+
end
68+
end
69+
70+
assign ap_CS_fsm = 2'd0;
71+
72+
assign ap_CS_fsm_state2 = ap_CS_fsm[32'd1];
73+
74+
endmodule //Filter
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# BEGIN Vivado Commands
2+
set vivado_ver [version -short]
3+
set fpo_ver 7.1
4+
if {[regexp -nocase {2015\.1.*} $vivado_ver match]} {
5+
set fpo_ver 7.0
6+
}
7+
create_ip -name floating_point -version $fpo_ver -vendor xilinx.com -library ip -module_name Filter_ap_dmul_4_max_dsp_64
8+
# BEGIN Vivado Commands
9+
# BEGIN Vivado Parameters
10+
set_property -dict [list CONFIG.a_precision_type Double \
11+
CONFIG.a_tuser_width 1 \
12+
CONFIG.add_sub_value Both \
13+
CONFIG.b_tuser_width 1 \
14+
CONFIG.c_a_exponent_width 11 \
15+
CONFIG.c_a_fraction_width 53 \
16+
CONFIG.c_compare_operation Programmable \
17+
CONFIG.c_has_divide_by_zero false \
18+
CONFIG.c_has_invalid_op false \
19+
CONFIG.c_has_overflow false \
20+
CONFIG.c_has_underflow false \
21+
CONFIG.c_latency 4 \
22+
CONFIG.c_mult_usage Max_Usage \
23+
CONFIG.c_optimization Speed_Optimized \
24+
CONFIG.c_rate 1 \
25+
CONFIG.c_result_exponent_width 11 \
26+
CONFIG.c_result_fraction_width 53 \
27+
CONFIG.component_name Filter_ap_dmul_4_max_dsp_64 \
28+
CONFIG.flow_control NonBlocking \
29+
CONFIG.has_a_tlast false \
30+
CONFIG.has_a_tuser false \
31+
CONFIG.has_aclken true \
32+
CONFIG.has_aresetn false \
33+
CONFIG.has_b_tlast false \
34+
CONFIG.has_b_tuser false \
35+
CONFIG.has_operation_tlast false \
36+
CONFIG.has_operation_tuser false \
37+
CONFIG.has_result_tready false \
38+
CONFIG.maximum_latency false \
39+
CONFIG.operation_tuser_width 1 \
40+
CONFIG.operation_type Multiply \
41+
CONFIG.result_precision_type Double \
42+
CONFIG.result_tlast_behv Null] -objects [get_ips Filter_ap_dmul_4_max_dsp_64] -quiet
43+
# END Vivado Parameters
44+
set_property generate_synth_checkpoint false [get_files Filter_ap_dmul_4_max_dsp_64.xci]
45+
generate_target {synthesis simulation} [get_files Filter_ap_dmul_4_max_dsp_64.xci]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# BEGIN Vivado Commands
2+
set vivado_ver [version -short]
3+
set fpo_ver 7.1
4+
if {[regexp -nocase {2015\.1.*} $vivado_ver match]} {
5+
set fpo_ver 7.0
6+
}
7+
create_ip -name floating_point -version $fpo_ver -vendor xilinx.com -library ip -module_name Filter_ap_fpext_0_no_dsp_32
8+
# BEGIN Vivado Commands
9+
# BEGIN Vivado Parameters
10+
set_property -dict [list CONFIG.a_precision_type Single \
11+
CONFIG.a_tuser_width 1 \
12+
CONFIG.add_sub_value Both \
13+
CONFIG.b_tuser_width 1 \
14+
CONFIG.c_a_exponent_width 8 \
15+
CONFIG.c_a_fraction_width 24 \
16+
CONFIG.c_compare_operation Programmable \
17+
CONFIG.c_has_divide_by_zero false \
18+
CONFIG.c_has_invalid_op false \
19+
CONFIG.c_has_overflow false \
20+
CONFIG.c_has_underflow false \
21+
CONFIG.c_latency 0 \
22+
CONFIG.c_mult_usage No_Usage \
23+
CONFIG.c_optimization Speed_Optimized \
24+
CONFIG.c_rate 1 \
25+
CONFIG.c_result_exponent_width 11 \
26+
CONFIG.c_result_fraction_width 53 \
27+
CONFIG.component_name Filter_ap_fpext_0_no_dsp_32 \
28+
CONFIG.flow_control NonBlocking \
29+
CONFIG.has_a_tlast false \
30+
CONFIG.has_a_tuser false \
31+
CONFIG.has_aclken false \
32+
CONFIG.has_aresetn false \
33+
CONFIG.has_b_tlast false \
34+
CONFIG.has_b_tuser false \
35+
CONFIG.has_operation_tlast false \
36+
CONFIG.has_operation_tuser false \
37+
CONFIG.has_result_tready false \
38+
CONFIG.maximum_latency false \
39+
CONFIG.operation_tuser_width 1 \
40+
CONFIG.operation_type Float_to_Float \
41+
CONFIG.result_precision_type Double \
42+
CONFIG.result_tlast_behv Null] -objects [get_ips Filter_ap_fpext_0_no_dsp_32] -quiet
43+
# END Vivado Parameters
44+
set_property generate_synth_checkpoint false [get_files Filter_ap_fpext_0_no_dsp_32.xci]
45+
generate_target {synthesis simulation} [get_files Filter_ap_fpext_0_no_dsp_32.xci]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# BEGIN Vivado Commands
2+
set vivado_ver [version -short]
3+
set fpo_ver 7.1
4+
if {[regexp -nocase {2015\.1.*} $vivado_ver match]} {
5+
set fpo_ver 7.0
6+
}
7+
create_ip -name floating_point -version $fpo_ver -vendor xilinx.com -library ip -module_name Filter_ap_fptrunc_0_no_dsp_64
8+
# BEGIN Vivado Commands
9+
# BEGIN Vivado Parameters
10+
set_property -dict [list CONFIG.a_precision_type Double \
11+
CONFIG.a_tuser_width 1 \
12+
CONFIG.add_sub_value Both \
13+
CONFIG.b_tuser_width 1 \
14+
CONFIG.c_a_exponent_width 11 \
15+
CONFIG.c_a_fraction_width 53 \
16+
CONFIG.c_compare_operation Programmable \
17+
CONFIG.c_has_divide_by_zero false \
18+
CONFIG.c_has_invalid_op false \
19+
CONFIG.c_has_overflow false \
20+
CONFIG.c_has_underflow false \
21+
CONFIG.c_latency 0 \
22+
CONFIG.c_mult_usage No_Usage \
23+
CONFIG.c_optimization Speed_Optimized \
24+
CONFIG.c_rate 1 \
25+
CONFIG.c_result_exponent_width 8 \
26+
CONFIG.c_result_fraction_width 24 \
27+
CONFIG.component_name Filter_ap_fptrunc_0_no_dsp_64 \
28+
CONFIG.flow_control NonBlocking \
29+
CONFIG.has_a_tlast false \
30+
CONFIG.has_a_tuser false \
31+
CONFIG.has_aclken false \
32+
CONFIG.has_aresetn false \
33+
CONFIG.has_b_tlast false \
34+
CONFIG.has_b_tuser false \
35+
CONFIG.has_operation_tlast false \
36+
CONFIG.has_operation_tuser false \
37+
CONFIG.has_result_tready false \
38+
CONFIG.maximum_latency false \
39+
CONFIG.operation_tuser_width 1 \
40+
CONFIG.operation_type Float_to_Float \
41+
CONFIG.result_precision_type Single \
42+
CONFIG.result_tlast_behv Null] -objects [get_ips Filter_ap_fptrunc_0_no_dsp_64] -quiet
43+
# END Vivado Parameters
44+
set_property generate_synth_checkpoint false [get_files Filter_ap_fptrunc_0_no_dsp_64.xci]
45+
generate_target {synthesis simulation} [get_files Filter_ap_fptrunc_0_no_dsp_64.xci]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# BEGIN Vivado Commands
2+
set vivado_ver [version -short]
3+
set fpo_ver 7.1
4+
if {[regexp -nocase {2015\.1.*} $vivado_ver match]} {
5+
set fpo_ver 7.0
6+
}
7+
create_ip -name floating_point -version $fpo_ver -vendor xilinx.com -library ip -module_name Filter_ap_uitofp_4_no_dsp_32
8+
# BEGIN Vivado Commands
9+
# BEGIN Vivado Parameters
10+
set_property -dict [list CONFIG.a_precision_type Custom \
11+
CONFIG.a_tuser_width 1 \
12+
CONFIG.add_sub_value Both \
13+
CONFIG.b_tuser_width 1 \
14+
CONFIG.c_a_exponent_width 64 \
15+
CONFIG.c_a_fraction_width 0 \
16+
CONFIG.c_compare_operation Programmable \
17+
CONFIG.c_has_divide_by_zero false \
18+
CONFIG.c_has_invalid_op false \
19+
CONFIG.c_has_overflow false \
20+
CONFIG.c_has_underflow false \
21+
CONFIG.c_latency 4 \
22+
CONFIG.c_mult_usage No_Usage \
23+
CONFIG.c_optimization Speed_Optimized \
24+
CONFIG.c_rate 1 \
25+
CONFIG.c_result_exponent_width 8 \
26+
CONFIG.c_result_fraction_width 24 \
27+
CONFIG.component_name Filter_ap_uitofp_4_no_dsp_32 \
28+
CONFIG.flow_control NonBlocking \
29+
CONFIG.has_a_tlast false \
30+
CONFIG.has_a_tuser false \
31+
CONFIG.has_aclken true \
32+
CONFIG.has_aresetn false \
33+
CONFIG.has_b_tlast false \
34+
CONFIG.has_b_tuser false \
35+
CONFIG.has_operation_tlast false \
36+
CONFIG.has_operation_tuser false \
37+
CONFIG.has_result_tready false \
38+
CONFIG.maximum_latency false \
39+
CONFIG.operation_tuser_width 1 \
40+
CONFIG.operation_type Fixed_to_Float \
41+
CONFIG.result_precision_type Single \
42+
CONFIG.result_tlast_behv Null] -objects [get_ips Filter_ap_uitofp_4_no_dsp_32] -quiet
43+
# END Vivado Parameters
44+
set_property generate_synth_checkpoint false [get_files Filter_ap_uitofp_4_no_dsp_32.xci]
45+
generate_target {synthesis simulation} [get_files Filter_ap_uitofp_4_no_dsp_32.xci]
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// ==============================================================
2+
// Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC v2019.1 (64-bit)
3+
// Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.
4+
// ==============================================================
5+
6+
`timescale 1ns/1ps
7+
8+
module Filter_dmul_64ns_64ns_64_6_max_dsp_1
9+
#(parameter
10+
ID = 4,
11+
NUM_STAGE = 6,
12+
din0_WIDTH = 64,
13+
din1_WIDTH = 64,
14+
dout_WIDTH = 64
15+
)(
16+
input wire clk,
17+
input wire reset,
18+
input wire ce,
19+
input wire [din0_WIDTH-1:0] din0,
20+
input wire [din1_WIDTH-1:0] din1,
21+
output wire [dout_WIDTH-1:0] dout
22+
);
23+
//------------------------Local signal-------------------
24+
wire aclk;
25+
wire aclken;
26+
wire a_tvalid;
27+
wire [63:0] a_tdata;
28+
wire b_tvalid;
29+
wire [63:0] b_tdata;
30+
wire r_tvalid;
31+
wire [63:0] r_tdata;
32+
reg [din0_WIDTH-1:0] din0_buf1;
33+
reg [din1_WIDTH-1:0] din1_buf1;
34+
reg ce_r;
35+
wire [dout_WIDTH-1:0] dout_i;
36+
reg [dout_WIDTH-1:0] dout_r;
37+
//------------------------Instantiation------------------
38+
Filter_ap_dmul_4_max_dsp_64 Filter_ap_dmul_4_max_dsp_64_u (
39+
.aclk ( aclk ),
40+
.aclken ( aclken ),
41+
.s_axis_a_tvalid ( a_tvalid ),
42+
.s_axis_a_tdata ( a_tdata ),
43+
.s_axis_b_tvalid ( b_tvalid ),
44+
.s_axis_b_tdata ( b_tdata ),
45+
.m_axis_result_tvalid ( r_tvalid ),
46+
.m_axis_result_tdata ( r_tdata )
47+
);
48+
//------------------------Body---------------------------
49+
assign aclk = clk;
50+
assign aclken = ce_r;
51+
assign a_tvalid = 1'b1;
52+
assign a_tdata = din0_buf1;
53+
assign b_tvalid = 1'b1;
54+
assign b_tdata = din1_buf1;
55+
assign dout_i = r_tdata;
56+
57+
always @(posedge clk) begin
58+
if (ce) begin
59+
din0_buf1 <= din0;
60+
din1_buf1 <= din1;
61+
end
62+
end
63+
64+
always @ (posedge clk) begin
65+
ce_r <= ce;
66+
end
67+
68+
always @ (posedge clk) begin
69+
if (ce_r) begin
70+
dout_r <= dout_i;
71+
end
72+
end
73+
74+
assign dout = ce_r?dout_i:dout_r;
75+
endmodule

0 commit comments

Comments
 (0)