Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_gt_nin_rem0_ap_fixed_ap_fixed_config17_mult_s_w17_ROM_NP_BReVV.vhd +0 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_gt_nin_rem0_ap_fixed_ap_fixed_config19_mult_s_w19_ROM_NP_BRg1b.vhd +0 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_leq_nin_ap_fixed_ap_fixed_40_20_5_3_0_config4_mult_s_w4_ROMvdy.vhd +90 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_leq_nin_ap_fixed_ap_fixed_42_22_5_3_0_config29_mult_s_w29_RmLc.vhd +0 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w1024_d256_A.vhd +305 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w1344_d256_A.vhd +305 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w1536_d256_A.vhd +305 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w16_d4356_A.vhd +305 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w16_d64_S.vhd +195 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w384_d4096_A.vhd +305 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w512_d1024_A.vhd +305 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_mac_muladd_16s_11s_40s_41_1_1.vhd +84 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_mac_muladd_16s_9s_32s_32_1_1.vhd +84 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_mac_muladd_16s_9s_41s_42_1_1.vhd +84 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_mul_16s_16s_32_1_1.vhd +87 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0.vhd +190 -0
- myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0.vhd +190 -0
- myproject_prj/solution1/impl/misc/logo.png +0 -0
- myproject_prj/solution1/impl/vhdl/myproject_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384_s.vhd +346 -0
- myproject_prj/solution1/impl/vhdl/myproject_clone_stream_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_8192_s.vhd +346 -0
- myproject_prj/solution1/impl/vhdl/myproject_clone_stream_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_32768_s.vhd +346 -0
- myproject_prj/solution1/impl/vhdl/myproject_compute_output_buffer_2d_array_array_ap_fixed_42_22_5_3_0_16u_config29_s.vhd +0 -0
- myproject_prj/solution1/impl/vhdl/myproject_compute_output_buffer_2d_array_array_ap_fixed_42_22_5_3_0_32u_config14_s.vhd +0 -0
- myproject_prj/solution1/impl/vhdl/myproject_concatenate3d_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s.vhd +333 -0
- myproject_prj/solution1/impl/vhdl/myproject_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7_s.vhd +415 -0
- myproject_prj/solution1/impl/vhdl/myproject_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_16u_config31_s.vhd +463 -0
myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_gt_nin_rem0_ap_fixed_ap_fixed_config17_mult_s_w17_ROM_NP_BReVV.vhd
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_gt_nin_rem0_ap_fixed_ap_fixed_config19_mult_s_w19_ROM_NP_BRg1b.vhd
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_leq_nin_ap_fixed_ap_fixed_40_20_5_3_0_config4_mult_s_w4_ROMvdy.vhd
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
library ieee;
|
| 7 |
+
use ieee.std_logic_1164.all;
|
| 8 |
+
use ieee.std_logic_unsigned.all;
|
| 9 |
+
|
| 10 |
+
entity myproject_dense_resource_rf_leq_nin_ap_fixed_ap_fixed_40_20_5_3_0_config4_mult_s_w4_ROMvdy is
|
| 11 |
+
generic(
|
| 12 |
+
DataWidth : integer := 120;
|
| 13 |
+
AddressWidth : integer := 7;
|
| 14 |
+
AddressRange : integer := 72
|
| 15 |
+
);
|
| 16 |
+
port (
|
| 17 |
+
|
| 18 |
+
address0 : in std_logic_vector(AddressWidth-1 downto 0);
|
| 19 |
+
ce0 : in std_logic;
|
| 20 |
+
q0 : out std_logic_vector(DataWidth-1 downto 0);
|
| 21 |
+
|
| 22 |
+
reset : in std_logic;
|
| 23 |
+
clk : in std_logic
|
| 24 |
+
);
|
| 25 |
+
end entity;
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
architecture rtl of myproject_dense_resource_rf_leq_nin_ap_fixed_ap_fixed_40_20_5_3_0_config4_mult_s_w4_ROMvdy is
|
| 29 |
+
|
| 30 |
+
signal address0_tmp : std_logic_vector(AddressWidth-1 downto 0);
|
| 31 |
+
|
| 32 |
+
type mem_array is array (0 to AddressRange-1) of std_logic_vector (DataWidth-1 downto 0);
|
| 33 |
+
|
| 34 |
+
signal mem0 : mem_array := (
|
| 35 |
+
0 => "111101110000000000000101111111111111010011111111100101010000000100110010111111111100111100000000100001111111111011001101", 1 => "010001100000000000110101111111111110101011111111101101111111111100110110111111100001010011111111010110101111111100110011", 2 => "001011101111111111100101000000000000010011111111110100111111111110000011111111011001000111111111101001111111111001110010", 3 => "000011001111111111011101111111111011011100000000011010011111111110101111111111111110010111111111111100011111111101110110",
|
| 36 |
+
4 => "000100010000000000000111111111110110010100000000001010100000000100010101111111111001010100000000010001010000000010101101", 5 => "110111111111111111111010000000000110000111111111101110000000000000110100111111010101101100000001011100011111111010100110", 6 => "001110110000000000000001000000001001100100000000001111111111111111010000000000000001011100000000011100111111111010110000", 7 => "001101110000000000100110111111111011000100000000000110011111111111000010111111101100011100000000001001001111111011011000",
|
| 37 |
+
8 => "111001111111111111100101111111111101111100000001001101100000000001111100000000010111011100000000011110110000000000000010", 9 => "010100110000000001001110111111111111010111111111111111101111111101100010000000000001110111111111001110001111111110100100", 10 => "001011110000000000011111000000000011101111111110110001011111111100110101111111111110001111111111000101110000000000011011", 11 => "000111011111111110111110000000000010100000000000110011110000000011100000111111111111001100000001000000101111111000110101",
|
| 38 |
+
12 => "000100000000000000000001111111111010110000000000110001000000000000101010111111111010110011111111000111101111111010110010", 13 => "000011011111111110111110000000000100110011111110111000111111111101000001000000000000111100000000100100001111110101010011", 14 => "111110111111111111101001000000001000001000000000001001010000000001001001000000001110001000000000011010001111111110101100", 15 => "001001100000000001001101111111111001100000000000001010111111111111100101111111111111010000000000011110101111111100000010",
|
| 39 |
+
16 => "111110100000000000001010000000001010001111111110111010001111111110011010111111111110101111111111110101011111111101001011", 17 => "001010010000000001010011111111111111010011111111000001011111111111000111000000010011001011111111101001011111111110000101", 18 => "001010101111111111100011000000000100111111111110110011001111111111001100000000011010100111111111101111001111111011011000", 19 => "111111111111111111000010111111111100111100000000101110010000000111100011000000000001111011111111111000011111111000010101",
|
| 40 |
+
20 => "111110110000000000001010111111110111010011111110100011110000000001100100111111111001101000000000010010011111111111100011", 21 => "111100001111111111000101000000000100000011111111100011001111111111101111000000000010101000000000110111010000000011000010", 22 => "110010110000000000000010000000000011100000000000110001010000000010100011000000001010110011111111111000100000000011111110", 23 => "000010110000000000111010111111111111000111111111010010010000000000010100111111111101011000000000101100111111111101000110",
|
| 41 |
+
24 => "010001001111111111111001111111111011110111111111100110101111111110010110111111110001000100000000111110101111111111001000", 25 => "010101010000000000110100111111110101001000000000000110001111111110111100111111101110000011111111011100000000000001010111", 26 => "001011001111111111101010111111111100010100000000100100001111111111001010111111100111010100000000010001101111111111101110", 27 => "000100001111111111101000111111111110001100000000011010011111110110101111000000001000101111111111001011000000000001010000",
|
| 42 |
+
28 => "000011111111111111101010111111111100011011111111100101100000000001010111111111101000001011111111011101100000000010001110", 29 => "000101100000000000100000000000000011010111111111011101100000000000000100000000000101101000000000011011100000000000111001", 30 => "010110000000000000100000000000000111001100000000101000100000000001001100111111001000101100000000011101001111111111111101", 31 => "010101110000000001000010000000000001000100000000000000010000000000011111111111100110001111111111011111100000000011000101",
|
| 43 |
+
32 => "010000001111111111011111000000000000101100000000101000001111111110011101000000010101001111111111100011100000000000010100", 33 => "011000000000000001100001111111111010001011111111111010111111111111111111000000001010010011111111111011110000000011110111", 34 => "010001010000000001001110000000000010100111111111101010100000000000100011000000000000000111111111010111001111111111101111", 35 => "000100001111111111101001000000000011001111111111010101101111111001011110111111101010100000000001011010110000000010001001",
|
| 44 |
+
36 => "000101011111111111010010111111111010110100000000000100001111111111010010111111111011010100000000011111100000000001111000", 37 => "000101101111111111010110111111111000111100000000011100000000000010111011111111011100110100000000010000001111111101100011", 38 => "000110010000000000100101000000001001010100000000000000100000000000000110000000011011011100000000011010001111111111000000", 39 => "001000110000000001111101111111111101110011111111110011101111111110011000000000000110000111111111011011000000000101101101",
|
| 45 |
+
40 => "001000101111111111110100111111111101100111111111010000111111111111011010111111100111000000000000001110010000000111100100", 41 => "000110100000000001000101111111111010011011111111010111000000000010001011000000000111010000000000010100010000000100100001", 42 => "001000000000000000001010111111111111011011111111000110100000000010011010000000010100110011111111101100011111111111000110", 43 => "000001101111111111100100000000000000000100000000110000010000000001100100000000011110100000000000101101010000000010011000",
|
| 46 |
+
44 => "000011011111111111011001111111111010010111111111110010110000000100000010000000001001010000000000000000000000001010001101", 45 => "111011011111111111011010000000001100110111111110111100010000000110100110111111100101000000000001100011111111111110010100", 46 => "111101110000000000101101000000001110000100000000010110001111111111110010111111011101101100000000010110001111111001101100", 47 => "111011010000000001101011000000000000111011111111000110001111111011001011111111111010100111111111110110011111111111101111",
|
| 47 |
+
48 => "000100101111111111111001111111111011010000000000101010011111111111010011000000010111100011111111011010101111111100010100", 49 => "011001010000000001100010111111111101101000000000000101111111111111001111111111101010111011111111100110000000000011000101", 50 => "000110101111111111010111000000000101101100000000010011011111111011111011111111100000011011111111101101000000000001111101", 51 => "000101101111111111101000111111111011000100000000001100000000000010001011000000101101001011111110101100011111111101010010",
|
| 48 |
+
52 => "001000111111111111110110000000000001000000000000011001101111111101011100000000100100011111111110110101110000000011011010", 53 => "001010011111111111101101111111111111110000000000000110111111111111011001111111100100010000000000111001000000000011011000", 54 => "001100001111111111100001000000000111100000000000001101100000000010010001111111000101000111111111110101000000000011011111", 55 => "001010111111111111111110000000000111010000000000000010101111111110111100111111101101000111111110111110001111111101110111",
|
| 49 |
+
56 => "001101011111111111011011111111111010111000000000010001000000000001001000111111101111011011111111001111111111111110000001", 57 => "010000010000000010000010111111111100100111111111110001011111111111010001111111111100100111111111111000010000000010100001", 58 => "111001010000000000010101000000000110111111111111111111101111111101001001000000000010011111111111101010000000001000000010", 59 => "001100101111111101111000000000000001111100000000011101100000000000100001000000001010010111111110101010001111110110111001",
|
| 50 |
+
60 => "001110110000000000001111111111111011111000000000010000010000000000000101111111110001111000000000010101001111111011110001", 61 => "001110011111111101110101111111111001101011111111111011001111111110011011111111110010001100000001000000111111110110110001", 62 => "111011011111111111100100000000000111001100000000011001110000000010000110000000100111000111111111001001110000000111110000", 63 => "000111110000000000010101000000000000101011111111100110001111111101101000111111110101011111111111011111001111111100110011",
|
| 51 |
+
64 => "001000011111111111011011111111111110001011111110110100111111111001101101111111110100110100000000110110101111111011000111", 65 => "111101100000000001110101111111111101111111111111011110000000000000011110000000000110001011111111111101010000000010111101", 66 => "110111011111111111010110000000001000100111111111110000100000000000010101000000010011011111111111011001000000000001010101", 67 => "001011001111111101101000111111111001011100000000000100100000000111011000000000001011000111111111011011001111110111111000",
|
| 52 |
+
68 => "001010111111111111110110111111111001110011111111010000100000000000110011000000010101001100000000011000001111111111100110", 69 => "111010011111111101010000000000001000000011111111011001010000000001000111111111111011000100000000101010010000000011011000", 70 => "110100110000000000011111000000000111001000000000100100000000000001100000111111011111101011111111101001011111111101000100", 71 => "111100100000000000100110000000000010100011111110101011101111111000000100111111110100100100000000001001111111111010111000");
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
attribute syn_rom_style : string;
|
| 57 |
+
|
| 58 |
+
attribute syn_rom_style of mem0 : signal is "block_rom";
|
| 59 |
+
attribute ROM_STYLE : string;
|
| 60 |
+
|
| 61 |
+
attribute ROM_STYLE of mem0 : signal is "block";
|
| 62 |
+
|
| 63 |
+
begin
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
memory_access_guard_0: process (address0)
|
| 67 |
+
begin
|
| 68 |
+
address0_tmp <= address0;
|
| 69 |
+
--synthesis translate_off
|
| 70 |
+
if (CONV_INTEGER(address0) > AddressRange-1) then
|
| 71 |
+
address0_tmp <= (others => '0');
|
| 72 |
+
else
|
| 73 |
+
address0_tmp <= address0;
|
| 74 |
+
end if;
|
| 75 |
+
--synthesis translate_on
|
| 76 |
+
end process;
|
| 77 |
+
|
| 78 |
+
p_rom_access: process (clk)
|
| 79 |
+
begin
|
| 80 |
+
if (clk'event and clk = '1') then
|
| 81 |
+
|
| 82 |
+
if (ce0 = '1') then
|
| 83 |
+
q0 <= mem0(CONV_INTEGER(address0_tmp));
|
| 84 |
+
end if;
|
| 85 |
+
|
| 86 |
+
end if;
|
| 87 |
+
end process;
|
| 88 |
+
|
| 89 |
+
end rtl;
|
| 90 |
+
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_dense_resource_rf_leq_nin_ap_fixed_ap_fixed_42_22_5_3_0_config29_mult_s_w29_RmLc.vhd
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w1024_d256_A.vhd
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 2
|
| 12 |
+
|
| 13 |
+
entity myproject_fifo_w1024_d256_A is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "auto";
|
| 16 |
+
DATA_WIDTH : integer := 1024;
|
| 17 |
+
ADDR_WIDTH : integer := 8;
|
| 18 |
+
DEPTH : integer := 256);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
if_num_data_valid : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 31 |
+
if_fifo_cap : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 32 |
+
|
| 33 |
+
if_empty_n : out std_logic;
|
| 34 |
+
if_read_ce : in std_logic;
|
| 35 |
+
if_read : in std_logic;
|
| 36 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 37 |
+
);
|
| 38 |
+
end entity;
|
| 39 |
+
|
| 40 |
+
architecture arch of myproject_fifo_w1024_d256_A is
|
| 41 |
+
------------------------Task and function--------------
|
| 42 |
+
function clog2 (x : INTEGER) return INTEGER is
|
| 43 |
+
variable n, m : INTEGER;
|
| 44 |
+
begin
|
| 45 |
+
n := 1;
|
| 46 |
+
m := 2;
|
| 47 |
+
while m < x loop
|
| 48 |
+
n := n + 1;
|
| 49 |
+
m := m * 2;
|
| 50 |
+
end loop;
|
| 51 |
+
return n;
|
| 52 |
+
end function clog2;
|
| 53 |
+
------------------------Parameter----------------------
|
| 54 |
+
constant MEM_DEPTH : INTEGER := DEPTH - 1;
|
| 55 |
+
constant MEM_AWIDTH : INTEGER := clog2(MEM_DEPTH);
|
| 56 |
+
------------------------Component----------------------
|
| 57 |
+
component myproject_fifo_w1024_d256_A_ram is
|
| 58 |
+
generic (
|
| 59 |
+
MEM_STYLE : string := "auto";
|
| 60 |
+
DATA_WIDTH : integer := 1024;
|
| 61 |
+
ADDR_WIDTH : integer := 8;
|
| 62 |
+
DEPTH : integer := 256);
|
| 63 |
+
port (
|
| 64 |
+
clk : in std_logic;
|
| 65 |
+
reset : in std_logic;
|
| 66 |
+
we : in std_logic;
|
| 67 |
+
waddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 68 |
+
din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 69 |
+
raddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 70 |
+
rden : in std_logic;
|
| 71 |
+
dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));
|
| 72 |
+
end component;
|
| 73 |
+
------------------------Local signal-------------------
|
| 74 |
+
signal waddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 75 |
+
signal raddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 76 |
+
signal wnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 77 |
+
signal rnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 78 |
+
signal push : std_logic;
|
| 79 |
+
signal pop : std_logic;
|
| 80 |
+
signal mOutPtr : unsigned(MEM_AWIDTH downto 0) := (others => '0');
|
| 81 |
+
signal empty_n : std_logic := '0';
|
| 82 |
+
signal full_n : std_logic := '1';
|
| 83 |
+
-- has num_data_valid ?
|
| 84 |
+
signal num_extra_words: UNSIGNED(0 downto 0); -- yes
|
| 85 |
+
signal num_data_valid : UNSIGNED(ADDR_WIDTH downto 0); -- yes
|
| 86 |
+
|
| 87 |
+
signal pop_dout : std_logic;
|
| 88 |
+
signal num_data_cnt : UNSIGNED(ADDR_WIDTH downto 0);
|
| 89 |
+
signal dout_vld : std_logic := '0';
|
| 90 |
+
begin
|
| 91 |
+
----------------------- Instantiation -----------------------
|
| 92 |
+
U_myproject_fifo_w1024_d256_A_ram : myproject_fifo_w1024_d256_A_ram
|
| 93 |
+
generic map (
|
| 94 |
+
MEM_STYLE => MEM_STYLE,
|
| 95 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 96 |
+
ADDR_WIDTH => MEM_AWIDTH,
|
| 97 |
+
DEPTH => MEM_DEPTH)
|
| 98 |
+
port map (
|
| 99 |
+
clk => clk,
|
| 100 |
+
reset => reset,
|
| 101 |
+
we => push,
|
| 102 |
+
waddr => std_logic_vector(waddr),
|
| 103 |
+
din => if_din,
|
| 104 |
+
raddr => std_logic_vector(raddr),
|
| 105 |
+
rden => pop,
|
| 106 |
+
dout => if_dout);
|
| 107 |
+
|
| 108 |
+
--------------------------- Body ----------------------------
|
| 109 |
+
-- has num_data_valid ?
|
| 110 |
+
if_num_data_valid <= STD_LOGIC_VECTOR(num_data_valid); -- yes
|
| 111 |
+
if_fifo_cap <= STD_LOGIC_VECTOR(TO_UNSIGNED(DEPTH, ADDR_WIDTH + 1)); -- yes
|
| 112 |
+
|
| 113 |
+
-- almost full/empty
|
| 114 |
+
|
| 115 |
+
-- program full/empty
|
| 116 |
+
|
| 117 |
+
if_full_n <= full_n;
|
| 118 |
+
if_empty_n <= dout_vld;
|
| 119 |
+
|
| 120 |
+
push <= full_n and if_write_ce and if_write;
|
| 121 |
+
pop <= empty_n and (not dout_vld or pop_dout);
|
| 122 |
+
pop_dout <= dout_vld and if_read_ce and if_read;
|
| 123 |
+
|
| 124 |
+
wnext <= waddr when push = '0' else
|
| 125 |
+
(others => '0') when waddr = MEM_DEPTH - 1 else
|
| 126 |
+
waddr + 1;
|
| 127 |
+
rnext <= raddr when pop = '0' else
|
| 128 |
+
(others => '0') when raddr = MEM_DEPTH - 1 else
|
| 129 |
+
raddr + 1;
|
| 130 |
+
|
| 131 |
+
-- waddr
|
| 132 |
+
process (clk) begin
|
| 133 |
+
-- reset sync
|
| 134 |
+
if clk'event and clk = '1' then
|
| 135 |
+
if reset = '1' then
|
| 136 |
+
waddr <= (others => '0');
|
| 137 |
+
else
|
| 138 |
+
waddr <= wnext;
|
| 139 |
+
end if;
|
| 140 |
+
end if; -- sync end
|
| 141 |
+
end process;
|
| 142 |
+
|
| 143 |
+
-- raddr
|
| 144 |
+
process (clk) begin
|
| 145 |
+
-- reset sync
|
| 146 |
+
if clk'event and clk = '1' then
|
| 147 |
+
if reset = '1' then
|
| 148 |
+
raddr <= (others => '0');
|
| 149 |
+
else
|
| 150 |
+
raddr <= rnext;
|
| 151 |
+
end if;
|
| 152 |
+
end if; -- sync end
|
| 153 |
+
end process;
|
| 154 |
+
|
| 155 |
+
-- mOutPtr
|
| 156 |
+
process (clk) begin
|
| 157 |
+
-- reset sync
|
| 158 |
+
if clk'event and clk = '1' then
|
| 159 |
+
if reset = '1' then
|
| 160 |
+
mOutPtr <= (others => '0');
|
| 161 |
+
elsif push = '1' and pop = '0' then
|
| 162 |
+
mOutPtr <= mOutPtr + 1;
|
| 163 |
+
elsif push = '0' and pop = '1' then
|
| 164 |
+
mOutPtr <= mOutPtr - 1;
|
| 165 |
+
end if;
|
| 166 |
+
end if; -- sync end
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
-- full_n
|
| 170 |
+
process (clk) begin
|
| 171 |
+
-- reset sync
|
| 172 |
+
if clk'event and clk = '1' then
|
| 173 |
+
if reset = '1' then
|
| 174 |
+
full_n <= '1';
|
| 175 |
+
elsif push = '1' and pop_dout = '0' and num_data_cnt = DEPTH - 1 then
|
| 176 |
+
full_n <= '0';
|
| 177 |
+
elsif push = '0' and pop_dout = '1' then
|
| 178 |
+
full_n <= '1';
|
| 179 |
+
end if;
|
| 180 |
+
end if; -- sync end
|
| 181 |
+
end process;
|
| 182 |
+
|
| 183 |
+
-- empty_n
|
| 184 |
+
process (clk) begin
|
| 185 |
+
-- reset sync
|
| 186 |
+
if clk'event and clk = '1' then
|
| 187 |
+
if reset = '1' then
|
| 188 |
+
empty_n <= '0';
|
| 189 |
+
elsif push = '1' and pop = '0' then
|
| 190 |
+
empty_n <= '1';
|
| 191 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 192 |
+
empty_n <= '0';
|
| 193 |
+
end if;
|
| 194 |
+
end if; -- sync end
|
| 195 |
+
end process;
|
| 196 |
+
|
| 197 |
+
-- almost_full_n
|
| 198 |
+
|
| 199 |
+
-- almost_empty_n
|
| 200 |
+
|
| 201 |
+
-- prog_full_n
|
| 202 |
+
|
| 203 |
+
-- prog_empty_n
|
| 204 |
+
|
| 205 |
+
-- num_data_cnt
|
| 206 |
+
process (clk) begin
|
| 207 |
+
-- reset sync
|
| 208 |
+
if clk'event and clk = '1' then
|
| 209 |
+
if reset = '1' then
|
| 210 |
+
num_data_cnt <= (others => '0');
|
| 211 |
+
elsif push = '1' and pop_dout = '0' then
|
| 212 |
+
num_data_cnt <= num_data_cnt + 1;
|
| 213 |
+
elsif push = '0' and pop_dout = '1' then
|
| 214 |
+
num_data_cnt <= num_data_cnt - 1;
|
| 215 |
+
end if;
|
| 216 |
+
end if; -- sync end
|
| 217 |
+
end process;
|
| 218 |
+
|
| 219 |
+
-- num_data_valid
|
| 220 |
+
num_extra_words <= TO_UNSIGNED(1,1) when (dout_vld and not pop_dout) = '1' else (others=>'0');
|
| 221 |
+
process (clk) begin
|
| 222 |
+
-- reset sync
|
| 223 |
+
if clk'event and clk = '1' then
|
| 224 |
+
if reset = '1' then
|
| 225 |
+
num_data_valid <= (others => '0');
|
| 226 |
+
elsif (empty_n or (dout_vld and not pop_dout)) = '1' then
|
| 227 |
+
if (push = '1') then
|
| 228 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + 1 + num_extra_words;
|
| 229 |
+
else
|
| 230 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + num_extra_words;
|
| 231 |
+
end if;
|
| 232 |
+
else
|
| 233 |
+
num_data_valid <= RESIZE(num_extra_words, ADDR_WIDTH + 1);
|
| 234 |
+
end if;
|
| 235 |
+
end if; -- sync end
|
| 236 |
+
end process; --
|
| 237 |
+
|
| 238 |
+
-- dout_vld
|
| 239 |
+
process (clk) begin
|
| 240 |
+
-- reset sync
|
| 241 |
+
if clk'event and clk = '1' then
|
| 242 |
+
if reset = '1' then
|
| 243 |
+
dout_vld <= '0';
|
| 244 |
+
elsif pop = '1' then
|
| 245 |
+
dout_vld <= '1';
|
| 246 |
+
elsif pop_dout = '1' then
|
| 247 |
+
dout_vld <= '0';
|
| 248 |
+
end if;
|
| 249 |
+
end if; -- sync end
|
| 250 |
+
end process;
|
| 251 |
+
end architecture;
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
library ieee;
|
| 255 |
+
use ieee.std_logic_1164.all;
|
| 256 |
+
use ieee.std_logic_unsigned.all;
|
| 257 |
+
|
| 258 |
+
entity myproject_fifo_w1024_d256_A_ram is
|
| 259 |
+
generic (
|
| 260 |
+
MEM_STYLE : string := "auto";
|
| 261 |
+
DATA_WIDTH : integer := 1024;
|
| 262 |
+
ADDR_WIDTH : integer := 8;
|
| 263 |
+
DEPTH : integer := 256);
|
| 264 |
+
port (
|
| 265 |
+
clk : in std_logic;
|
| 266 |
+
reset : in std_logic;
|
| 267 |
+
we : in std_logic;
|
| 268 |
+
waddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 269 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 270 |
+
raddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 271 |
+
rden : in std_logic;
|
| 272 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0)
|
| 273 |
+
);
|
| 274 |
+
end entity;
|
| 275 |
+
|
| 276 |
+
architecture arch of myproject_fifo_w1024_d256_A_ram is
|
| 277 |
+
type memtype is array (0 to DEPTH - 1) of std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 278 |
+
signal mem : memtype;
|
| 279 |
+
attribute ram_style: string;
|
| 280 |
+
attribute ram_style of mem: signal is MEM_STYLE;
|
| 281 |
+
signal mem_reg : std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 282 |
+
|
| 283 |
+
begin
|
| 284 |
+
dout <= mem_reg;
|
| 285 |
+
|
| 286 |
+
process (clk) begin
|
| 287 |
+
-- reset sync
|
| 288 |
+
if clk'event and clk = '1' then
|
| 289 |
+
if reset = '1' then
|
| 290 |
+
mem_reg <= ( others=> '0');
|
| 291 |
+
elsif (rden = '1') then
|
| 292 |
+
mem_reg <= mem(conv_integer(raddr));
|
| 293 |
+
end if;
|
| 294 |
+
end if; -- sync end
|
| 295 |
+
end process;
|
| 296 |
+
|
| 297 |
+
process (clk) begin
|
| 298 |
+
if clk'event and clk = '1' then
|
| 299 |
+
if we = '1' then
|
| 300 |
+
mem(conv_integer(waddr)) <= din;
|
| 301 |
+
end if;
|
| 302 |
+
end if;
|
| 303 |
+
end process;
|
| 304 |
+
|
| 305 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w1344_d256_A.vhd
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 2
|
| 12 |
+
|
| 13 |
+
entity myproject_fifo_w1344_d256_A is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "auto";
|
| 16 |
+
DATA_WIDTH : integer := 1344;
|
| 17 |
+
ADDR_WIDTH : integer := 8;
|
| 18 |
+
DEPTH : integer := 256);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
if_num_data_valid : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 31 |
+
if_fifo_cap : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 32 |
+
|
| 33 |
+
if_empty_n : out std_logic;
|
| 34 |
+
if_read_ce : in std_logic;
|
| 35 |
+
if_read : in std_logic;
|
| 36 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 37 |
+
);
|
| 38 |
+
end entity;
|
| 39 |
+
|
| 40 |
+
architecture arch of myproject_fifo_w1344_d256_A is
|
| 41 |
+
------------------------Task and function--------------
|
| 42 |
+
function clog2 (x : INTEGER) return INTEGER is
|
| 43 |
+
variable n, m : INTEGER;
|
| 44 |
+
begin
|
| 45 |
+
n := 1;
|
| 46 |
+
m := 2;
|
| 47 |
+
while m < x loop
|
| 48 |
+
n := n + 1;
|
| 49 |
+
m := m * 2;
|
| 50 |
+
end loop;
|
| 51 |
+
return n;
|
| 52 |
+
end function clog2;
|
| 53 |
+
------------------------Parameter----------------------
|
| 54 |
+
constant MEM_DEPTH : INTEGER := DEPTH - 1;
|
| 55 |
+
constant MEM_AWIDTH : INTEGER := clog2(MEM_DEPTH);
|
| 56 |
+
------------------------Component----------------------
|
| 57 |
+
component myproject_fifo_w1344_d256_A_ram is
|
| 58 |
+
generic (
|
| 59 |
+
MEM_STYLE : string := "auto";
|
| 60 |
+
DATA_WIDTH : integer := 1344;
|
| 61 |
+
ADDR_WIDTH : integer := 8;
|
| 62 |
+
DEPTH : integer := 256);
|
| 63 |
+
port (
|
| 64 |
+
clk : in std_logic;
|
| 65 |
+
reset : in std_logic;
|
| 66 |
+
we : in std_logic;
|
| 67 |
+
waddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 68 |
+
din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 69 |
+
raddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 70 |
+
rden : in std_logic;
|
| 71 |
+
dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));
|
| 72 |
+
end component;
|
| 73 |
+
------------------------Local signal-------------------
|
| 74 |
+
signal waddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 75 |
+
signal raddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 76 |
+
signal wnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 77 |
+
signal rnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 78 |
+
signal push : std_logic;
|
| 79 |
+
signal pop : std_logic;
|
| 80 |
+
signal mOutPtr : unsigned(MEM_AWIDTH downto 0) := (others => '0');
|
| 81 |
+
signal empty_n : std_logic := '0';
|
| 82 |
+
signal full_n : std_logic := '1';
|
| 83 |
+
-- has num_data_valid ?
|
| 84 |
+
signal num_extra_words: UNSIGNED(0 downto 0); -- yes
|
| 85 |
+
signal num_data_valid : UNSIGNED(ADDR_WIDTH downto 0); -- yes
|
| 86 |
+
|
| 87 |
+
signal pop_dout : std_logic;
|
| 88 |
+
signal num_data_cnt : UNSIGNED(ADDR_WIDTH downto 0);
|
| 89 |
+
signal dout_vld : std_logic := '0';
|
| 90 |
+
begin
|
| 91 |
+
----------------------- Instantiation -----------------------
|
| 92 |
+
U_myproject_fifo_w1344_d256_A_ram : myproject_fifo_w1344_d256_A_ram
|
| 93 |
+
generic map (
|
| 94 |
+
MEM_STYLE => MEM_STYLE,
|
| 95 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 96 |
+
ADDR_WIDTH => MEM_AWIDTH,
|
| 97 |
+
DEPTH => MEM_DEPTH)
|
| 98 |
+
port map (
|
| 99 |
+
clk => clk,
|
| 100 |
+
reset => reset,
|
| 101 |
+
we => push,
|
| 102 |
+
waddr => std_logic_vector(waddr),
|
| 103 |
+
din => if_din,
|
| 104 |
+
raddr => std_logic_vector(raddr),
|
| 105 |
+
rden => pop,
|
| 106 |
+
dout => if_dout);
|
| 107 |
+
|
| 108 |
+
--------------------------- Body ----------------------------
|
| 109 |
+
-- has num_data_valid ?
|
| 110 |
+
if_num_data_valid <= STD_LOGIC_VECTOR(num_data_valid); -- yes
|
| 111 |
+
if_fifo_cap <= STD_LOGIC_VECTOR(TO_UNSIGNED(DEPTH, ADDR_WIDTH + 1)); -- yes
|
| 112 |
+
|
| 113 |
+
-- almost full/empty
|
| 114 |
+
|
| 115 |
+
-- program full/empty
|
| 116 |
+
|
| 117 |
+
if_full_n <= full_n;
|
| 118 |
+
if_empty_n <= dout_vld;
|
| 119 |
+
|
| 120 |
+
push <= full_n and if_write_ce and if_write;
|
| 121 |
+
pop <= empty_n and (not dout_vld or pop_dout);
|
| 122 |
+
pop_dout <= dout_vld and if_read_ce and if_read;
|
| 123 |
+
|
| 124 |
+
wnext <= waddr when push = '0' else
|
| 125 |
+
(others => '0') when waddr = MEM_DEPTH - 1 else
|
| 126 |
+
waddr + 1;
|
| 127 |
+
rnext <= raddr when pop = '0' else
|
| 128 |
+
(others => '0') when raddr = MEM_DEPTH - 1 else
|
| 129 |
+
raddr + 1;
|
| 130 |
+
|
| 131 |
+
-- waddr
|
| 132 |
+
process (clk) begin
|
| 133 |
+
-- reset sync
|
| 134 |
+
if clk'event and clk = '1' then
|
| 135 |
+
if reset = '1' then
|
| 136 |
+
waddr <= (others => '0');
|
| 137 |
+
else
|
| 138 |
+
waddr <= wnext;
|
| 139 |
+
end if;
|
| 140 |
+
end if; -- sync end
|
| 141 |
+
end process;
|
| 142 |
+
|
| 143 |
+
-- raddr
|
| 144 |
+
process (clk) begin
|
| 145 |
+
-- reset sync
|
| 146 |
+
if clk'event and clk = '1' then
|
| 147 |
+
if reset = '1' then
|
| 148 |
+
raddr <= (others => '0');
|
| 149 |
+
else
|
| 150 |
+
raddr <= rnext;
|
| 151 |
+
end if;
|
| 152 |
+
end if; -- sync end
|
| 153 |
+
end process;
|
| 154 |
+
|
| 155 |
+
-- mOutPtr
|
| 156 |
+
process (clk) begin
|
| 157 |
+
-- reset sync
|
| 158 |
+
if clk'event and clk = '1' then
|
| 159 |
+
if reset = '1' then
|
| 160 |
+
mOutPtr <= (others => '0');
|
| 161 |
+
elsif push = '1' and pop = '0' then
|
| 162 |
+
mOutPtr <= mOutPtr + 1;
|
| 163 |
+
elsif push = '0' and pop = '1' then
|
| 164 |
+
mOutPtr <= mOutPtr - 1;
|
| 165 |
+
end if;
|
| 166 |
+
end if; -- sync end
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
-- full_n
|
| 170 |
+
process (clk) begin
|
| 171 |
+
-- reset sync
|
| 172 |
+
if clk'event and clk = '1' then
|
| 173 |
+
if reset = '1' then
|
| 174 |
+
full_n <= '1';
|
| 175 |
+
elsif push = '1' and pop_dout = '0' and num_data_cnt = DEPTH - 1 then
|
| 176 |
+
full_n <= '0';
|
| 177 |
+
elsif push = '0' and pop_dout = '1' then
|
| 178 |
+
full_n <= '1';
|
| 179 |
+
end if;
|
| 180 |
+
end if; -- sync end
|
| 181 |
+
end process;
|
| 182 |
+
|
| 183 |
+
-- empty_n
|
| 184 |
+
process (clk) begin
|
| 185 |
+
-- reset sync
|
| 186 |
+
if clk'event and clk = '1' then
|
| 187 |
+
if reset = '1' then
|
| 188 |
+
empty_n <= '0';
|
| 189 |
+
elsif push = '1' and pop = '0' then
|
| 190 |
+
empty_n <= '1';
|
| 191 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 192 |
+
empty_n <= '0';
|
| 193 |
+
end if;
|
| 194 |
+
end if; -- sync end
|
| 195 |
+
end process;
|
| 196 |
+
|
| 197 |
+
-- almost_full_n
|
| 198 |
+
|
| 199 |
+
-- almost_empty_n
|
| 200 |
+
|
| 201 |
+
-- prog_full_n
|
| 202 |
+
|
| 203 |
+
-- prog_empty_n
|
| 204 |
+
|
| 205 |
+
-- num_data_cnt
|
| 206 |
+
process (clk) begin
|
| 207 |
+
-- reset sync
|
| 208 |
+
if clk'event and clk = '1' then
|
| 209 |
+
if reset = '1' then
|
| 210 |
+
num_data_cnt <= (others => '0');
|
| 211 |
+
elsif push = '1' and pop_dout = '0' then
|
| 212 |
+
num_data_cnt <= num_data_cnt + 1;
|
| 213 |
+
elsif push = '0' and pop_dout = '1' then
|
| 214 |
+
num_data_cnt <= num_data_cnt - 1;
|
| 215 |
+
end if;
|
| 216 |
+
end if; -- sync end
|
| 217 |
+
end process;
|
| 218 |
+
|
| 219 |
+
-- num_data_valid
|
| 220 |
+
num_extra_words <= TO_UNSIGNED(1,1) when (dout_vld and not pop_dout) = '1' else (others=>'0');
|
| 221 |
+
process (clk) begin
|
| 222 |
+
-- reset sync
|
| 223 |
+
if clk'event and clk = '1' then
|
| 224 |
+
if reset = '1' then
|
| 225 |
+
num_data_valid <= (others => '0');
|
| 226 |
+
elsif (empty_n or (dout_vld and not pop_dout)) = '1' then
|
| 227 |
+
if (push = '1') then
|
| 228 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + 1 + num_extra_words;
|
| 229 |
+
else
|
| 230 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + num_extra_words;
|
| 231 |
+
end if;
|
| 232 |
+
else
|
| 233 |
+
num_data_valid <= RESIZE(num_extra_words, ADDR_WIDTH + 1);
|
| 234 |
+
end if;
|
| 235 |
+
end if; -- sync end
|
| 236 |
+
end process; --
|
| 237 |
+
|
| 238 |
+
-- dout_vld
|
| 239 |
+
process (clk) begin
|
| 240 |
+
-- reset sync
|
| 241 |
+
if clk'event and clk = '1' then
|
| 242 |
+
if reset = '1' then
|
| 243 |
+
dout_vld <= '0';
|
| 244 |
+
elsif pop = '1' then
|
| 245 |
+
dout_vld <= '1';
|
| 246 |
+
elsif pop_dout = '1' then
|
| 247 |
+
dout_vld <= '0';
|
| 248 |
+
end if;
|
| 249 |
+
end if; -- sync end
|
| 250 |
+
end process;
|
| 251 |
+
end architecture;
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
library ieee;
|
| 255 |
+
use ieee.std_logic_1164.all;
|
| 256 |
+
use ieee.std_logic_unsigned.all;
|
| 257 |
+
|
| 258 |
+
entity myproject_fifo_w1344_d256_A_ram is
|
| 259 |
+
generic (
|
| 260 |
+
MEM_STYLE : string := "auto";
|
| 261 |
+
DATA_WIDTH : integer := 1344;
|
| 262 |
+
ADDR_WIDTH : integer := 8;
|
| 263 |
+
DEPTH : integer := 256);
|
| 264 |
+
port (
|
| 265 |
+
clk : in std_logic;
|
| 266 |
+
reset : in std_logic;
|
| 267 |
+
we : in std_logic;
|
| 268 |
+
waddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 269 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 270 |
+
raddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 271 |
+
rden : in std_logic;
|
| 272 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0)
|
| 273 |
+
);
|
| 274 |
+
end entity;
|
| 275 |
+
|
| 276 |
+
architecture arch of myproject_fifo_w1344_d256_A_ram is
|
| 277 |
+
type memtype is array (0 to DEPTH - 1) of std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 278 |
+
signal mem : memtype;
|
| 279 |
+
attribute ram_style: string;
|
| 280 |
+
attribute ram_style of mem: signal is MEM_STYLE;
|
| 281 |
+
signal mem_reg : std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 282 |
+
|
| 283 |
+
begin
|
| 284 |
+
dout <= mem_reg;
|
| 285 |
+
|
| 286 |
+
process (clk) begin
|
| 287 |
+
-- reset sync
|
| 288 |
+
if clk'event and clk = '1' then
|
| 289 |
+
if reset = '1' then
|
| 290 |
+
mem_reg <= ( others=> '0');
|
| 291 |
+
elsif (rden = '1') then
|
| 292 |
+
mem_reg <= mem(conv_integer(raddr));
|
| 293 |
+
end if;
|
| 294 |
+
end if; -- sync end
|
| 295 |
+
end process;
|
| 296 |
+
|
| 297 |
+
process (clk) begin
|
| 298 |
+
if clk'event and clk = '1' then
|
| 299 |
+
if we = '1' then
|
| 300 |
+
mem(conv_integer(waddr)) <= din;
|
| 301 |
+
end if;
|
| 302 |
+
end if;
|
| 303 |
+
end process;
|
| 304 |
+
|
| 305 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w1536_d256_A.vhd
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 2
|
| 12 |
+
|
| 13 |
+
entity myproject_fifo_w1536_d256_A is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "auto";
|
| 16 |
+
DATA_WIDTH : integer := 1536;
|
| 17 |
+
ADDR_WIDTH : integer := 8;
|
| 18 |
+
DEPTH : integer := 256);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
if_num_data_valid : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 31 |
+
if_fifo_cap : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 32 |
+
|
| 33 |
+
if_empty_n : out std_logic;
|
| 34 |
+
if_read_ce : in std_logic;
|
| 35 |
+
if_read : in std_logic;
|
| 36 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 37 |
+
);
|
| 38 |
+
end entity;
|
| 39 |
+
|
| 40 |
+
architecture arch of myproject_fifo_w1536_d256_A is
|
| 41 |
+
------------------------Task and function--------------
|
| 42 |
+
function clog2 (x : INTEGER) return INTEGER is
|
| 43 |
+
variable n, m : INTEGER;
|
| 44 |
+
begin
|
| 45 |
+
n := 1;
|
| 46 |
+
m := 2;
|
| 47 |
+
while m < x loop
|
| 48 |
+
n := n + 1;
|
| 49 |
+
m := m * 2;
|
| 50 |
+
end loop;
|
| 51 |
+
return n;
|
| 52 |
+
end function clog2;
|
| 53 |
+
------------------------Parameter----------------------
|
| 54 |
+
constant MEM_DEPTH : INTEGER := DEPTH - 1;
|
| 55 |
+
constant MEM_AWIDTH : INTEGER := clog2(MEM_DEPTH);
|
| 56 |
+
------------------------Component----------------------
|
| 57 |
+
component myproject_fifo_w1536_d256_A_ram is
|
| 58 |
+
generic (
|
| 59 |
+
MEM_STYLE : string := "auto";
|
| 60 |
+
DATA_WIDTH : integer := 1536;
|
| 61 |
+
ADDR_WIDTH : integer := 8;
|
| 62 |
+
DEPTH : integer := 256);
|
| 63 |
+
port (
|
| 64 |
+
clk : in std_logic;
|
| 65 |
+
reset : in std_logic;
|
| 66 |
+
we : in std_logic;
|
| 67 |
+
waddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 68 |
+
din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 69 |
+
raddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 70 |
+
rden : in std_logic;
|
| 71 |
+
dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));
|
| 72 |
+
end component;
|
| 73 |
+
------------------------Local signal-------------------
|
| 74 |
+
signal waddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 75 |
+
signal raddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 76 |
+
signal wnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 77 |
+
signal rnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 78 |
+
signal push : std_logic;
|
| 79 |
+
signal pop : std_logic;
|
| 80 |
+
signal mOutPtr : unsigned(MEM_AWIDTH downto 0) := (others => '0');
|
| 81 |
+
signal empty_n : std_logic := '0';
|
| 82 |
+
signal full_n : std_logic := '1';
|
| 83 |
+
-- has num_data_valid ?
|
| 84 |
+
signal num_extra_words: UNSIGNED(0 downto 0); -- yes
|
| 85 |
+
signal num_data_valid : UNSIGNED(ADDR_WIDTH downto 0); -- yes
|
| 86 |
+
|
| 87 |
+
signal pop_dout : std_logic;
|
| 88 |
+
signal num_data_cnt : UNSIGNED(ADDR_WIDTH downto 0);
|
| 89 |
+
signal dout_vld : std_logic := '0';
|
| 90 |
+
begin
|
| 91 |
+
----------------------- Instantiation -----------------------
|
| 92 |
+
U_myproject_fifo_w1536_d256_A_ram : myproject_fifo_w1536_d256_A_ram
|
| 93 |
+
generic map (
|
| 94 |
+
MEM_STYLE => MEM_STYLE,
|
| 95 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 96 |
+
ADDR_WIDTH => MEM_AWIDTH,
|
| 97 |
+
DEPTH => MEM_DEPTH)
|
| 98 |
+
port map (
|
| 99 |
+
clk => clk,
|
| 100 |
+
reset => reset,
|
| 101 |
+
we => push,
|
| 102 |
+
waddr => std_logic_vector(waddr),
|
| 103 |
+
din => if_din,
|
| 104 |
+
raddr => std_logic_vector(raddr),
|
| 105 |
+
rden => pop,
|
| 106 |
+
dout => if_dout);
|
| 107 |
+
|
| 108 |
+
--------------------------- Body ----------------------------
|
| 109 |
+
-- has num_data_valid ?
|
| 110 |
+
if_num_data_valid <= STD_LOGIC_VECTOR(num_data_valid); -- yes
|
| 111 |
+
if_fifo_cap <= STD_LOGIC_VECTOR(TO_UNSIGNED(DEPTH, ADDR_WIDTH + 1)); -- yes
|
| 112 |
+
|
| 113 |
+
-- almost full/empty
|
| 114 |
+
|
| 115 |
+
-- program full/empty
|
| 116 |
+
|
| 117 |
+
if_full_n <= full_n;
|
| 118 |
+
if_empty_n <= dout_vld;
|
| 119 |
+
|
| 120 |
+
push <= full_n and if_write_ce and if_write;
|
| 121 |
+
pop <= empty_n and (not dout_vld or pop_dout);
|
| 122 |
+
pop_dout <= dout_vld and if_read_ce and if_read;
|
| 123 |
+
|
| 124 |
+
wnext <= waddr when push = '0' else
|
| 125 |
+
(others => '0') when waddr = MEM_DEPTH - 1 else
|
| 126 |
+
waddr + 1;
|
| 127 |
+
rnext <= raddr when pop = '0' else
|
| 128 |
+
(others => '0') when raddr = MEM_DEPTH - 1 else
|
| 129 |
+
raddr + 1;
|
| 130 |
+
|
| 131 |
+
-- waddr
|
| 132 |
+
process (clk) begin
|
| 133 |
+
-- reset sync
|
| 134 |
+
if clk'event and clk = '1' then
|
| 135 |
+
if reset = '1' then
|
| 136 |
+
waddr <= (others => '0');
|
| 137 |
+
else
|
| 138 |
+
waddr <= wnext;
|
| 139 |
+
end if;
|
| 140 |
+
end if; -- sync end
|
| 141 |
+
end process;
|
| 142 |
+
|
| 143 |
+
-- raddr
|
| 144 |
+
process (clk) begin
|
| 145 |
+
-- reset sync
|
| 146 |
+
if clk'event and clk = '1' then
|
| 147 |
+
if reset = '1' then
|
| 148 |
+
raddr <= (others => '0');
|
| 149 |
+
else
|
| 150 |
+
raddr <= rnext;
|
| 151 |
+
end if;
|
| 152 |
+
end if; -- sync end
|
| 153 |
+
end process;
|
| 154 |
+
|
| 155 |
+
-- mOutPtr
|
| 156 |
+
process (clk) begin
|
| 157 |
+
-- reset sync
|
| 158 |
+
if clk'event and clk = '1' then
|
| 159 |
+
if reset = '1' then
|
| 160 |
+
mOutPtr <= (others => '0');
|
| 161 |
+
elsif push = '1' and pop = '0' then
|
| 162 |
+
mOutPtr <= mOutPtr + 1;
|
| 163 |
+
elsif push = '0' and pop = '1' then
|
| 164 |
+
mOutPtr <= mOutPtr - 1;
|
| 165 |
+
end if;
|
| 166 |
+
end if; -- sync end
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
-- full_n
|
| 170 |
+
process (clk) begin
|
| 171 |
+
-- reset sync
|
| 172 |
+
if clk'event and clk = '1' then
|
| 173 |
+
if reset = '1' then
|
| 174 |
+
full_n <= '1';
|
| 175 |
+
elsif push = '1' and pop_dout = '0' and num_data_cnt = DEPTH - 1 then
|
| 176 |
+
full_n <= '0';
|
| 177 |
+
elsif push = '0' and pop_dout = '1' then
|
| 178 |
+
full_n <= '1';
|
| 179 |
+
end if;
|
| 180 |
+
end if; -- sync end
|
| 181 |
+
end process;
|
| 182 |
+
|
| 183 |
+
-- empty_n
|
| 184 |
+
process (clk) begin
|
| 185 |
+
-- reset sync
|
| 186 |
+
if clk'event and clk = '1' then
|
| 187 |
+
if reset = '1' then
|
| 188 |
+
empty_n <= '0';
|
| 189 |
+
elsif push = '1' and pop = '0' then
|
| 190 |
+
empty_n <= '1';
|
| 191 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 192 |
+
empty_n <= '0';
|
| 193 |
+
end if;
|
| 194 |
+
end if; -- sync end
|
| 195 |
+
end process;
|
| 196 |
+
|
| 197 |
+
-- almost_full_n
|
| 198 |
+
|
| 199 |
+
-- almost_empty_n
|
| 200 |
+
|
| 201 |
+
-- prog_full_n
|
| 202 |
+
|
| 203 |
+
-- prog_empty_n
|
| 204 |
+
|
| 205 |
+
-- num_data_cnt
|
| 206 |
+
process (clk) begin
|
| 207 |
+
-- reset sync
|
| 208 |
+
if clk'event and clk = '1' then
|
| 209 |
+
if reset = '1' then
|
| 210 |
+
num_data_cnt <= (others => '0');
|
| 211 |
+
elsif push = '1' and pop_dout = '0' then
|
| 212 |
+
num_data_cnt <= num_data_cnt + 1;
|
| 213 |
+
elsif push = '0' and pop_dout = '1' then
|
| 214 |
+
num_data_cnt <= num_data_cnt - 1;
|
| 215 |
+
end if;
|
| 216 |
+
end if; -- sync end
|
| 217 |
+
end process;
|
| 218 |
+
|
| 219 |
+
-- num_data_valid
|
| 220 |
+
num_extra_words <= TO_UNSIGNED(1,1) when (dout_vld and not pop_dout) = '1' else (others=>'0');
|
| 221 |
+
process (clk) begin
|
| 222 |
+
-- reset sync
|
| 223 |
+
if clk'event and clk = '1' then
|
| 224 |
+
if reset = '1' then
|
| 225 |
+
num_data_valid <= (others => '0');
|
| 226 |
+
elsif (empty_n or (dout_vld and not pop_dout)) = '1' then
|
| 227 |
+
if (push = '1') then
|
| 228 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + 1 + num_extra_words;
|
| 229 |
+
else
|
| 230 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + num_extra_words;
|
| 231 |
+
end if;
|
| 232 |
+
else
|
| 233 |
+
num_data_valid <= RESIZE(num_extra_words, ADDR_WIDTH + 1);
|
| 234 |
+
end if;
|
| 235 |
+
end if; -- sync end
|
| 236 |
+
end process; --
|
| 237 |
+
|
| 238 |
+
-- dout_vld
|
| 239 |
+
process (clk) begin
|
| 240 |
+
-- reset sync
|
| 241 |
+
if clk'event and clk = '1' then
|
| 242 |
+
if reset = '1' then
|
| 243 |
+
dout_vld <= '0';
|
| 244 |
+
elsif pop = '1' then
|
| 245 |
+
dout_vld <= '1';
|
| 246 |
+
elsif pop_dout = '1' then
|
| 247 |
+
dout_vld <= '0';
|
| 248 |
+
end if;
|
| 249 |
+
end if; -- sync end
|
| 250 |
+
end process;
|
| 251 |
+
end architecture;
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
library ieee;
|
| 255 |
+
use ieee.std_logic_1164.all;
|
| 256 |
+
use ieee.std_logic_unsigned.all;
|
| 257 |
+
|
| 258 |
+
entity myproject_fifo_w1536_d256_A_ram is
|
| 259 |
+
generic (
|
| 260 |
+
MEM_STYLE : string := "auto";
|
| 261 |
+
DATA_WIDTH : integer := 1536;
|
| 262 |
+
ADDR_WIDTH : integer := 8;
|
| 263 |
+
DEPTH : integer := 256);
|
| 264 |
+
port (
|
| 265 |
+
clk : in std_logic;
|
| 266 |
+
reset : in std_logic;
|
| 267 |
+
we : in std_logic;
|
| 268 |
+
waddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 269 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 270 |
+
raddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 271 |
+
rden : in std_logic;
|
| 272 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0)
|
| 273 |
+
);
|
| 274 |
+
end entity;
|
| 275 |
+
|
| 276 |
+
architecture arch of myproject_fifo_w1536_d256_A_ram is
|
| 277 |
+
type memtype is array (0 to DEPTH - 1) of std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 278 |
+
signal mem : memtype;
|
| 279 |
+
attribute ram_style: string;
|
| 280 |
+
attribute ram_style of mem: signal is MEM_STYLE;
|
| 281 |
+
signal mem_reg : std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 282 |
+
|
| 283 |
+
begin
|
| 284 |
+
dout <= mem_reg;
|
| 285 |
+
|
| 286 |
+
process (clk) begin
|
| 287 |
+
-- reset sync
|
| 288 |
+
if clk'event and clk = '1' then
|
| 289 |
+
if reset = '1' then
|
| 290 |
+
mem_reg <= ( others=> '0');
|
| 291 |
+
elsif (rden = '1') then
|
| 292 |
+
mem_reg <= mem(conv_integer(raddr));
|
| 293 |
+
end if;
|
| 294 |
+
end if; -- sync end
|
| 295 |
+
end process;
|
| 296 |
+
|
| 297 |
+
process (clk) begin
|
| 298 |
+
if clk'event and clk = '1' then
|
| 299 |
+
if we = '1' then
|
| 300 |
+
mem(conv_integer(waddr)) <= din;
|
| 301 |
+
end if;
|
| 302 |
+
end if;
|
| 303 |
+
end process;
|
| 304 |
+
|
| 305 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w16_d4356_A.vhd
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 2
|
| 12 |
+
|
| 13 |
+
entity myproject_fifo_w16_d4356_A is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "auto";
|
| 16 |
+
DATA_WIDTH : integer := 16;
|
| 17 |
+
ADDR_WIDTH : integer := 13;
|
| 18 |
+
DEPTH : integer := 4356);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
if_num_data_valid : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 31 |
+
if_fifo_cap : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 32 |
+
|
| 33 |
+
if_empty_n : out std_logic;
|
| 34 |
+
if_read_ce : in std_logic;
|
| 35 |
+
if_read : in std_logic;
|
| 36 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 37 |
+
);
|
| 38 |
+
end entity;
|
| 39 |
+
|
| 40 |
+
architecture arch of myproject_fifo_w16_d4356_A is
|
| 41 |
+
------------------------Task and function--------------
|
| 42 |
+
function clog2 (x : INTEGER) return INTEGER is
|
| 43 |
+
variable n, m : INTEGER;
|
| 44 |
+
begin
|
| 45 |
+
n := 1;
|
| 46 |
+
m := 2;
|
| 47 |
+
while m < x loop
|
| 48 |
+
n := n + 1;
|
| 49 |
+
m := m * 2;
|
| 50 |
+
end loop;
|
| 51 |
+
return n;
|
| 52 |
+
end function clog2;
|
| 53 |
+
------------------------Parameter----------------------
|
| 54 |
+
constant MEM_DEPTH : INTEGER := DEPTH - 1;
|
| 55 |
+
constant MEM_AWIDTH : INTEGER := clog2(MEM_DEPTH);
|
| 56 |
+
------------------------Component----------------------
|
| 57 |
+
component myproject_fifo_w16_d4356_A_ram is
|
| 58 |
+
generic (
|
| 59 |
+
MEM_STYLE : string := "auto";
|
| 60 |
+
DATA_WIDTH : integer := 16;
|
| 61 |
+
ADDR_WIDTH : integer := 13;
|
| 62 |
+
DEPTH : integer := 4356);
|
| 63 |
+
port (
|
| 64 |
+
clk : in std_logic;
|
| 65 |
+
reset : in std_logic;
|
| 66 |
+
we : in std_logic;
|
| 67 |
+
waddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 68 |
+
din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 69 |
+
raddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 70 |
+
rden : in std_logic;
|
| 71 |
+
dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));
|
| 72 |
+
end component;
|
| 73 |
+
------------------------Local signal-------------------
|
| 74 |
+
signal waddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 75 |
+
signal raddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 76 |
+
signal wnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 77 |
+
signal rnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 78 |
+
signal push : std_logic;
|
| 79 |
+
signal pop : std_logic;
|
| 80 |
+
signal mOutPtr : unsigned(MEM_AWIDTH downto 0) := (others => '0');
|
| 81 |
+
signal empty_n : std_logic := '0';
|
| 82 |
+
signal full_n : std_logic := '1';
|
| 83 |
+
-- has num_data_valid ?
|
| 84 |
+
signal num_extra_words: UNSIGNED(0 downto 0); -- yes
|
| 85 |
+
signal num_data_valid : UNSIGNED(ADDR_WIDTH downto 0); -- yes
|
| 86 |
+
|
| 87 |
+
signal pop_dout : std_logic;
|
| 88 |
+
signal num_data_cnt : UNSIGNED(ADDR_WIDTH downto 0);
|
| 89 |
+
signal dout_vld : std_logic := '0';
|
| 90 |
+
begin
|
| 91 |
+
----------------------- Instantiation -----------------------
|
| 92 |
+
U_myproject_fifo_w16_d4356_A_ram : myproject_fifo_w16_d4356_A_ram
|
| 93 |
+
generic map (
|
| 94 |
+
MEM_STYLE => MEM_STYLE,
|
| 95 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 96 |
+
ADDR_WIDTH => MEM_AWIDTH,
|
| 97 |
+
DEPTH => MEM_DEPTH)
|
| 98 |
+
port map (
|
| 99 |
+
clk => clk,
|
| 100 |
+
reset => reset,
|
| 101 |
+
we => push,
|
| 102 |
+
waddr => std_logic_vector(waddr),
|
| 103 |
+
din => if_din,
|
| 104 |
+
raddr => std_logic_vector(raddr),
|
| 105 |
+
rden => pop,
|
| 106 |
+
dout => if_dout);
|
| 107 |
+
|
| 108 |
+
--------------------------- Body ----------------------------
|
| 109 |
+
-- has num_data_valid ?
|
| 110 |
+
if_num_data_valid <= STD_LOGIC_VECTOR(num_data_valid); -- yes
|
| 111 |
+
if_fifo_cap <= STD_LOGIC_VECTOR(TO_UNSIGNED(DEPTH, ADDR_WIDTH + 1)); -- yes
|
| 112 |
+
|
| 113 |
+
-- almost full/empty
|
| 114 |
+
|
| 115 |
+
-- program full/empty
|
| 116 |
+
|
| 117 |
+
if_full_n <= full_n;
|
| 118 |
+
if_empty_n <= dout_vld;
|
| 119 |
+
|
| 120 |
+
push <= full_n and if_write_ce and if_write;
|
| 121 |
+
pop <= empty_n and (not dout_vld or pop_dout);
|
| 122 |
+
pop_dout <= dout_vld and if_read_ce and if_read;
|
| 123 |
+
|
| 124 |
+
wnext <= waddr when push = '0' else
|
| 125 |
+
(others => '0') when waddr = MEM_DEPTH - 1 else
|
| 126 |
+
waddr + 1;
|
| 127 |
+
rnext <= raddr when pop = '0' else
|
| 128 |
+
(others => '0') when raddr = MEM_DEPTH - 1 else
|
| 129 |
+
raddr + 1;
|
| 130 |
+
|
| 131 |
+
-- waddr
|
| 132 |
+
process (clk) begin
|
| 133 |
+
-- reset sync
|
| 134 |
+
if clk'event and clk = '1' then
|
| 135 |
+
if reset = '1' then
|
| 136 |
+
waddr <= (others => '0');
|
| 137 |
+
else
|
| 138 |
+
waddr <= wnext;
|
| 139 |
+
end if;
|
| 140 |
+
end if; -- sync end
|
| 141 |
+
end process;
|
| 142 |
+
|
| 143 |
+
-- raddr
|
| 144 |
+
process (clk) begin
|
| 145 |
+
-- reset sync
|
| 146 |
+
if clk'event and clk = '1' then
|
| 147 |
+
if reset = '1' then
|
| 148 |
+
raddr <= (others => '0');
|
| 149 |
+
else
|
| 150 |
+
raddr <= rnext;
|
| 151 |
+
end if;
|
| 152 |
+
end if; -- sync end
|
| 153 |
+
end process;
|
| 154 |
+
|
| 155 |
+
-- mOutPtr
|
| 156 |
+
process (clk) begin
|
| 157 |
+
-- reset sync
|
| 158 |
+
if clk'event and clk = '1' then
|
| 159 |
+
if reset = '1' then
|
| 160 |
+
mOutPtr <= (others => '0');
|
| 161 |
+
elsif push = '1' and pop = '0' then
|
| 162 |
+
mOutPtr <= mOutPtr + 1;
|
| 163 |
+
elsif push = '0' and pop = '1' then
|
| 164 |
+
mOutPtr <= mOutPtr - 1;
|
| 165 |
+
end if;
|
| 166 |
+
end if; -- sync end
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
-- full_n
|
| 170 |
+
process (clk) begin
|
| 171 |
+
-- reset sync
|
| 172 |
+
if clk'event and clk = '1' then
|
| 173 |
+
if reset = '1' then
|
| 174 |
+
full_n <= '1';
|
| 175 |
+
elsif push = '1' and pop_dout = '0' and num_data_cnt = DEPTH - 1 then
|
| 176 |
+
full_n <= '0';
|
| 177 |
+
elsif push = '0' and pop_dout = '1' then
|
| 178 |
+
full_n <= '1';
|
| 179 |
+
end if;
|
| 180 |
+
end if; -- sync end
|
| 181 |
+
end process;
|
| 182 |
+
|
| 183 |
+
-- empty_n
|
| 184 |
+
process (clk) begin
|
| 185 |
+
-- reset sync
|
| 186 |
+
if clk'event and clk = '1' then
|
| 187 |
+
if reset = '1' then
|
| 188 |
+
empty_n <= '0';
|
| 189 |
+
elsif push = '1' and pop = '0' then
|
| 190 |
+
empty_n <= '1';
|
| 191 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 192 |
+
empty_n <= '0';
|
| 193 |
+
end if;
|
| 194 |
+
end if; -- sync end
|
| 195 |
+
end process;
|
| 196 |
+
|
| 197 |
+
-- almost_full_n
|
| 198 |
+
|
| 199 |
+
-- almost_empty_n
|
| 200 |
+
|
| 201 |
+
-- prog_full_n
|
| 202 |
+
|
| 203 |
+
-- prog_empty_n
|
| 204 |
+
|
| 205 |
+
-- num_data_cnt
|
| 206 |
+
process (clk) begin
|
| 207 |
+
-- reset sync
|
| 208 |
+
if clk'event and clk = '1' then
|
| 209 |
+
if reset = '1' then
|
| 210 |
+
num_data_cnt <= (others => '0');
|
| 211 |
+
elsif push = '1' and pop_dout = '0' then
|
| 212 |
+
num_data_cnt <= num_data_cnt + 1;
|
| 213 |
+
elsif push = '0' and pop_dout = '1' then
|
| 214 |
+
num_data_cnt <= num_data_cnt - 1;
|
| 215 |
+
end if;
|
| 216 |
+
end if; -- sync end
|
| 217 |
+
end process;
|
| 218 |
+
|
| 219 |
+
-- num_data_valid
|
| 220 |
+
num_extra_words <= TO_UNSIGNED(1,1) when (dout_vld and not pop_dout) = '1' else (others=>'0');
|
| 221 |
+
process (clk) begin
|
| 222 |
+
-- reset sync
|
| 223 |
+
if clk'event and clk = '1' then
|
| 224 |
+
if reset = '1' then
|
| 225 |
+
num_data_valid <= (others => '0');
|
| 226 |
+
elsif (empty_n or (dout_vld and not pop_dout)) = '1' then
|
| 227 |
+
if (push = '1') then
|
| 228 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + 1 + num_extra_words;
|
| 229 |
+
else
|
| 230 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + num_extra_words;
|
| 231 |
+
end if;
|
| 232 |
+
else
|
| 233 |
+
num_data_valid <= RESIZE(num_extra_words, ADDR_WIDTH + 1);
|
| 234 |
+
end if;
|
| 235 |
+
end if; -- sync end
|
| 236 |
+
end process; --
|
| 237 |
+
|
| 238 |
+
-- dout_vld
|
| 239 |
+
process (clk) begin
|
| 240 |
+
-- reset sync
|
| 241 |
+
if clk'event and clk = '1' then
|
| 242 |
+
if reset = '1' then
|
| 243 |
+
dout_vld <= '0';
|
| 244 |
+
elsif pop = '1' then
|
| 245 |
+
dout_vld <= '1';
|
| 246 |
+
elsif pop_dout = '1' then
|
| 247 |
+
dout_vld <= '0';
|
| 248 |
+
end if;
|
| 249 |
+
end if; -- sync end
|
| 250 |
+
end process;
|
| 251 |
+
end architecture;
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
library ieee;
|
| 255 |
+
use ieee.std_logic_1164.all;
|
| 256 |
+
use ieee.std_logic_unsigned.all;
|
| 257 |
+
|
| 258 |
+
entity myproject_fifo_w16_d4356_A_ram is
|
| 259 |
+
generic (
|
| 260 |
+
MEM_STYLE : string := "auto";
|
| 261 |
+
DATA_WIDTH : integer := 16;
|
| 262 |
+
ADDR_WIDTH : integer := 13;
|
| 263 |
+
DEPTH : integer := 4356);
|
| 264 |
+
port (
|
| 265 |
+
clk : in std_logic;
|
| 266 |
+
reset : in std_logic;
|
| 267 |
+
we : in std_logic;
|
| 268 |
+
waddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 269 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 270 |
+
raddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 271 |
+
rden : in std_logic;
|
| 272 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0)
|
| 273 |
+
);
|
| 274 |
+
end entity;
|
| 275 |
+
|
| 276 |
+
architecture arch of myproject_fifo_w16_d4356_A_ram is
|
| 277 |
+
type memtype is array (0 to DEPTH - 1) of std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 278 |
+
signal mem : memtype;
|
| 279 |
+
attribute ram_style: string;
|
| 280 |
+
attribute ram_style of mem: signal is MEM_STYLE;
|
| 281 |
+
signal mem_reg : std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 282 |
+
|
| 283 |
+
begin
|
| 284 |
+
dout <= mem_reg;
|
| 285 |
+
|
| 286 |
+
process (clk) begin
|
| 287 |
+
-- reset sync
|
| 288 |
+
if clk'event and clk = '1' then
|
| 289 |
+
if reset = '1' then
|
| 290 |
+
mem_reg <= ( others=> '0');
|
| 291 |
+
elsif (rden = '1') then
|
| 292 |
+
mem_reg <= mem(conv_integer(raddr));
|
| 293 |
+
end if;
|
| 294 |
+
end if; -- sync end
|
| 295 |
+
end process;
|
| 296 |
+
|
| 297 |
+
process (clk) begin
|
| 298 |
+
if clk'event and clk = '1' then
|
| 299 |
+
if we = '1' then
|
| 300 |
+
mem(conv_integer(waddr)) <= din;
|
| 301 |
+
end if;
|
| 302 |
+
end if;
|
| 303 |
+
end process;
|
| 304 |
+
|
| 305 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w16_d64_S.vhd
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_fifo_w16_d64_S is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 16;
|
| 17 |
+
ADDR_WIDTH : integer := 6;
|
| 18 |
+
DEPTH : integer := 64);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
if_num_data_valid : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 31 |
+
if_fifo_cap : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 32 |
+
|
| 33 |
+
if_empty_n : out std_logic;
|
| 34 |
+
if_read_ce : in std_logic;
|
| 35 |
+
if_read : in std_logic;
|
| 36 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 37 |
+
);
|
| 38 |
+
end entity;
|
| 39 |
+
|
| 40 |
+
architecture rtl of myproject_fifo_w16_d64_S is
|
| 41 |
+
------------------------Task and function--------------
|
| 42 |
+
------------------------Parameter----------------------
|
| 43 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 44 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 45 |
+
------------------------Component----------------------
|
| 46 |
+
component myproject_fifo_w16_d64_S_ShiftReg is
|
| 47 |
+
generic (
|
| 48 |
+
DATA_WIDTH : integer := 16;
|
| 49 |
+
ADDR_WIDTH : integer := 6;
|
| 50 |
+
DEPTH : integer := 64);
|
| 51 |
+
port (
|
| 52 |
+
clk : in std_logic;
|
| 53 |
+
we : in std_logic;
|
| 54 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 55 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 56 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 57 |
+
end component;
|
| 58 |
+
|
| 59 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 60 |
+
signal push : STD_LOGIC;
|
| 61 |
+
signal pop : STD_LOGIC;
|
| 62 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 63 |
+
signal empty_n : STD_LOGIC := '0';
|
| 64 |
+
signal full_n : std_logic := '1';
|
| 65 |
+
-- has num_data_valid?
|
| 66 |
+
signal num_data_valid: UNSIGNED(ADDR_WIDTH downto 0); -- yes
|
| 67 |
+
begin
|
| 68 |
+
----------------------- Instantiation -----------------------
|
| 69 |
+
U_myproject_fifo_w16_d64_S_ShiftReg : myproject_fifo_w16_d64_S_ShiftReg
|
| 70 |
+
generic map (
|
| 71 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 72 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 73 |
+
DEPTH => SRL_DEPTH)
|
| 74 |
+
port map (
|
| 75 |
+
clk => clk,
|
| 76 |
+
we => push,
|
| 77 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 78 |
+
din => if_din,
|
| 79 |
+
dout => if_dout);
|
| 80 |
+
--------------------------- Body ----------------------------
|
| 81 |
+
-- has num_data_valid ?
|
| 82 |
+
if_num_data_valid <= STD_LOGIC_VECTOR(mOutPtr); -- yes
|
| 83 |
+
if_fifo_cap <= STD_LOGIC_VECTOR(TO_UNSIGNED(DEPTH, ADDR_WIDTH + 1)); --yes
|
| 84 |
+
|
| 85 |
+
-- almost full/empty
|
| 86 |
+
|
| 87 |
+
-- program full/empty
|
| 88 |
+
|
| 89 |
+
if_full_n <= full_n;
|
| 90 |
+
if_empty_n <= empty_n;
|
| 91 |
+
|
| 92 |
+
push <= full_n and if_write_ce and if_write;
|
| 93 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 94 |
+
|
| 95 |
+
-- addr
|
| 96 |
+
process (clk) begin
|
| 97 |
+
-- reset sync
|
| 98 |
+
if clk'event and clk = '1' then
|
| 99 |
+
if reset = '1' then
|
| 100 |
+
addr <= (others => '0');
|
| 101 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 102 |
+
addr <= addr + 1;
|
| 103 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 104 |
+
addr <= addr - 1;
|
| 105 |
+
end if;
|
| 106 |
+
end if; -- sync end
|
| 107 |
+
end process;
|
| 108 |
+
|
| 109 |
+
-- mOutPtr
|
| 110 |
+
process (clk) begin
|
| 111 |
+
-- reset sync
|
| 112 |
+
if clk'event and clk = '1' then
|
| 113 |
+
if reset = '1' then
|
| 114 |
+
mOutPtr <= (others => '0');
|
| 115 |
+
elsif push = '1' and pop = '0' then
|
| 116 |
+
mOutPtr <= mOutPtr + 1;
|
| 117 |
+
elsif push = '0' and pop = '1' then
|
| 118 |
+
mOutPtr <= mOutPtr - 1;
|
| 119 |
+
end if;
|
| 120 |
+
end if; -- sync end
|
| 121 |
+
end process;
|
| 122 |
+
|
| 123 |
+
-- full_n
|
| 124 |
+
process (clk) begin
|
| 125 |
+
-- reset sync
|
| 126 |
+
if clk'event and clk = '1' then
|
| 127 |
+
if reset = '1' then
|
| 128 |
+
full_n <= '1';
|
| 129 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 130 |
+
full_n <= '0';
|
| 131 |
+
elsif push = '0' and pop = '1' then
|
| 132 |
+
full_n <= '1';
|
| 133 |
+
end if;
|
| 134 |
+
end if; -- sync end
|
| 135 |
+
end process;
|
| 136 |
+
|
| 137 |
+
-- empty_n
|
| 138 |
+
process (clk) begin
|
| 139 |
+
-- reset sync
|
| 140 |
+
if clk'event and clk = '1' then
|
| 141 |
+
if reset = '1' then
|
| 142 |
+
empty_n <= '0';
|
| 143 |
+
elsif push = '1' and pop = '0' then
|
| 144 |
+
empty_n <= '1';
|
| 145 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 146 |
+
empty_n <= '0';
|
| 147 |
+
end if;
|
| 148 |
+
end if; -- sync end
|
| 149 |
+
end process;
|
| 150 |
+
|
| 151 |
+
-- almost_full_n
|
| 152 |
+
|
| 153 |
+
-- almost_empty_n
|
| 154 |
+
|
| 155 |
+
-- prog_full_n
|
| 156 |
+
|
| 157 |
+
-- prog_empty_n
|
| 158 |
+
|
| 159 |
+
end architecture rtl;
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
library IEEE;
|
| 163 |
+
use IEEE.std_logic_1164.all;
|
| 164 |
+
use IEEE.std_logic_unsigned.all;
|
| 165 |
+
|
| 166 |
+
entity myproject_fifo_w16_d64_S_ShiftReg is
|
| 167 |
+
generic (
|
| 168 |
+
DATA_WIDTH : integer := 16;
|
| 169 |
+
ADDR_WIDTH : integer := 6;
|
| 170 |
+
DEPTH : integer := 64);
|
| 171 |
+
port (
|
| 172 |
+
clk : in std_logic;
|
| 173 |
+
we : in std_logic;
|
| 174 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 175 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 177 |
+
end myproject_fifo_w16_d64_S_ShiftReg;
|
| 178 |
+
|
| 179 |
+
architecture rtl of myproject_fifo_w16_d64_S_ShiftReg is
|
| 180 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 181 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 182 |
+
|
| 183 |
+
begin
|
| 184 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 185 |
+
|
| 186 |
+
process (clk)
|
| 187 |
+
begin
|
| 188 |
+
if (clk'event and clk = '1') then
|
| 189 |
+
if (we = '1') then
|
| 190 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 191 |
+
end if;
|
| 192 |
+
end if;
|
| 193 |
+
end process;
|
| 194 |
+
|
| 195 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w384_d4096_A.vhd
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 2
|
| 12 |
+
|
| 13 |
+
entity myproject_fifo_w384_d4096_A is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "auto";
|
| 16 |
+
DATA_WIDTH : integer := 384;
|
| 17 |
+
ADDR_WIDTH : integer := 12;
|
| 18 |
+
DEPTH : integer := 4096);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
if_num_data_valid : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 31 |
+
if_fifo_cap : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 32 |
+
|
| 33 |
+
if_empty_n : out std_logic;
|
| 34 |
+
if_read_ce : in std_logic;
|
| 35 |
+
if_read : in std_logic;
|
| 36 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 37 |
+
);
|
| 38 |
+
end entity;
|
| 39 |
+
|
| 40 |
+
architecture arch of myproject_fifo_w384_d4096_A is
|
| 41 |
+
------------------------Task and function--------------
|
| 42 |
+
function clog2 (x : INTEGER) return INTEGER is
|
| 43 |
+
variable n, m : INTEGER;
|
| 44 |
+
begin
|
| 45 |
+
n := 1;
|
| 46 |
+
m := 2;
|
| 47 |
+
while m < x loop
|
| 48 |
+
n := n + 1;
|
| 49 |
+
m := m * 2;
|
| 50 |
+
end loop;
|
| 51 |
+
return n;
|
| 52 |
+
end function clog2;
|
| 53 |
+
------------------------Parameter----------------------
|
| 54 |
+
constant MEM_DEPTH : INTEGER := DEPTH - 1;
|
| 55 |
+
constant MEM_AWIDTH : INTEGER := clog2(MEM_DEPTH);
|
| 56 |
+
------------------------Component----------------------
|
| 57 |
+
component myproject_fifo_w384_d4096_A_ram is
|
| 58 |
+
generic (
|
| 59 |
+
MEM_STYLE : string := "auto";
|
| 60 |
+
DATA_WIDTH : integer := 384;
|
| 61 |
+
ADDR_WIDTH : integer := 12;
|
| 62 |
+
DEPTH : integer := 4096);
|
| 63 |
+
port (
|
| 64 |
+
clk : in std_logic;
|
| 65 |
+
reset : in std_logic;
|
| 66 |
+
we : in std_logic;
|
| 67 |
+
waddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 68 |
+
din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 69 |
+
raddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 70 |
+
rden : in std_logic;
|
| 71 |
+
dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));
|
| 72 |
+
end component;
|
| 73 |
+
------------------------Local signal-------------------
|
| 74 |
+
signal waddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 75 |
+
signal raddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 76 |
+
signal wnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 77 |
+
signal rnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 78 |
+
signal push : std_logic;
|
| 79 |
+
signal pop : std_logic;
|
| 80 |
+
signal mOutPtr : unsigned(MEM_AWIDTH downto 0) := (others => '0');
|
| 81 |
+
signal empty_n : std_logic := '0';
|
| 82 |
+
signal full_n : std_logic := '1';
|
| 83 |
+
-- has num_data_valid ?
|
| 84 |
+
signal num_extra_words: UNSIGNED(0 downto 0); -- yes
|
| 85 |
+
signal num_data_valid : UNSIGNED(ADDR_WIDTH downto 0); -- yes
|
| 86 |
+
|
| 87 |
+
signal pop_dout : std_logic;
|
| 88 |
+
signal num_data_cnt : UNSIGNED(ADDR_WIDTH downto 0);
|
| 89 |
+
signal dout_vld : std_logic := '0';
|
| 90 |
+
begin
|
| 91 |
+
----------------------- Instantiation -----------------------
|
| 92 |
+
U_myproject_fifo_w384_d4096_A_ram : myproject_fifo_w384_d4096_A_ram
|
| 93 |
+
generic map (
|
| 94 |
+
MEM_STYLE => MEM_STYLE,
|
| 95 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 96 |
+
ADDR_WIDTH => MEM_AWIDTH,
|
| 97 |
+
DEPTH => MEM_DEPTH)
|
| 98 |
+
port map (
|
| 99 |
+
clk => clk,
|
| 100 |
+
reset => reset,
|
| 101 |
+
we => push,
|
| 102 |
+
waddr => std_logic_vector(waddr),
|
| 103 |
+
din => if_din,
|
| 104 |
+
raddr => std_logic_vector(raddr),
|
| 105 |
+
rden => pop,
|
| 106 |
+
dout => if_dout);
|
| 107 |
+
|
| 108 |
+
--------------------------- Body ----------------------------
|
| 109 |
+
-- has num_data_valid ?
|
| 110 |
+
if_num_data_valid <= STD_LOGIC_VECTOR(num_data_valid); -- yes
|
| 111 |
+
if_fifo_cap <= STD_LOGIC_VECTOR(TO_UNSIGNED(DEPTH, ADDR_WIDTH + 1)); -- yes
|
| 112 |
+
|
| 113 |
+
-- almost full/empty
|
| 114 |
+
|
| 115 |
+
-- program full/empty
|
| 116 |
+
|
| 117 |
+
if_full_n <= full_n;
|
| 118 |
+
if_empty_n <= dout_vld;
|
| 119 |
+
|
| 120 |
+
push <= full_n and if_write_ce and if_write;
|
| 121 |
+
pop <= empty_n and (not dout_vld or pop_dout);
|
| 122 |
+
pop_dout <= dout_vld and if_read_ce and if_read;
|
| 123 |
+
|
| 124 |
+
wnext <= waddr when push = '0' else
|
| 125 |
+
(others => '0') when waddr = MEM_DEPTH - 1 else
|
| 126 |
+
waddr + 1;
|
| 127 |
+
rnext <= raddr when pop = '0' else
|
| 128 |
+
(others => '0') when raddr = MEM_DEPTH - 1 else
|
| 129 |
+
raddr + 1;
|
| 130 |
+
|
| 131 |
+
-- waddr
|
| 132 |
+
process (clk) begin
|
| 133 |
+
-- reset sync
|
| 134 |
+
if clk'event and clk = '1' then
|
| 135 |
+
if reset = '1' then
|
| 136 |
+
waddr <= (others => '0');
|
| 137 |
+
else
|
| 138 |
+
waddr <= wnext;
|
| 139 |
+
end if;
|
| 140 |
+
end if; -- sync end
|
| 141 |
+
end process;
|
| 142 |
+
|
| 143 |
+
-- raddr
|
| 144 |
+
process (clk) begin
|
| 145 |
+
-- reset sync
|
| 146 |
+
if clk'event and clk = '1' then
|
| 147 |
+
if reset = '1' then
|
| 148 |
+
raddr <= (others => '0');
|
| 149 |
+
else
|
| 150 |
+
raddr <= rnext;
|
| 151 |
+
end if;
|
| 152 |
+
end if; -- sync end
|
| 153 |
+
end process;
|
| 154 |
+
|
| 155 |
+
-- mOutPtr
|
| 156 |
+
process (clk) begin
|
| 157 |
+
-- reset sync
|
| 158 |
+
if clk'event and clk = '1' then
|
| 159 |
+
if reset = '1' then
|
| 160 |
+
mOutPtr <= (others => '0');
|
| 161 |
+
elsif push = '1' and pop = '0' then
|
| 162 |
+
mOutPtr <= mOutPtr + 1;
|
| 163 |
+
elsif push = '0' and pop = '1' then
|
| 164 |
+
mOutPtr <= mOutPtr - 1;
|
| 165 |
+
end if;
|
| 166 |
+
end if; -- sync end
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
-- full_n
|
| 170 |
+
process (clk) begin
|
| 171 |
+
-- reset sync
|
| 172 |
+
if clk'event and clk = '1' then
|
| 173 |
+
if reset = '1' then
|
| 174 |
+
full_n <= '1';
|
| 175 |
+
elsif push = '1' and pop_dout = '0' and num_data_cnt = DEPTH - 1 then
|
| 176 |
+
full_n <= '0';
|
| 177 |
+
elsif push = '0' and pop_dout = '1' then
|
| 178 |
+
full_n <= '1';
|
| 179 |
+
end if;
|
| 180 |
+
end if; -- sync end
|
| 181 |
+
end process;
|
| 182 |
+
|
| 183 |
+
-- empty_n
|
| 184 |
+
process (clk) begin
|
| 185 |
+
-- reset sync
|
| 186 |
+
if clk'event and clk = '1' then
|
| 187 |
+
if reset = '1' then
|
| 188 |
+
empty_n <= '0';
|
| 189 |
+
elsif push = '1' and pop = '0' then
|
| 190 |
+
empty_n <= '1';
|
| 191 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 192 |
+
empty_n <= '0';
|
| 193 |
+
end if;
|
| 194 |
+
end if; -- sync end
|
| 195 |
+
end process;
|
| 196 |
+
|
| 197 |
+
-- almost_full_n
|
| 198 |
+
|
| 199 |
+
-- almost_empty_n
|
| 200 |
+
|
| 201 |
+
-- prog_full_n
|
| 202 |
+
|
| 203 |
+
-- prog_empty_n
|
| 204 |
+
|
| 205 |
+
-- num_data_cnt
|
| 206 |
+
process (clk) begin
|
| 207 |
+
-- reset sync
|
| 208 |
+
if clk'event and clk = '1' then
|
| 209 |
+
if reset = '1' then
|
| 210 |
+
num_data_cnt <= (others => '0');
|
| 211 |
+
elsif push = '1' and pop_dout = '0' then
|
| 212 |
+
num_data_cnt <= num_data_cnt + 1;
|
| 213 |
+
elsif push = '0' and pop_dout = '1' then
|
| 214 |
+
num_data_cnt <= num_data_cnt - 1;
|
| 215 |
+
end if;
|
| 216 |
+
end if; -- sync end
|
| 217 |
+
end process;
|
| 218 |
+
|
| 219 |
+
-- num_data_valid
|
| 220 |
+
num_extra_words <= TO_UNSIGNED(1,1) when (dout_vld and not pop_dout) = '1' else (others=>'0');
|
| 221 |
+
process (clk) begin
|
| 222 |
+
-- reset sync
|
| 223 |
+
if clk'event and clk = '1' then
|
| 224 |
+
if reset = '1' then
|
| 225 |
+
num_data_valid <= (others => '0');
|
| 226 |
+
elsif (empty_n or (dout_vld and not pop_dout)) = '1' then
|
| 227 |
+
if (push = '1') then
|
| 228 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + 1 + num_extra_words;
|
| 229 |
+
else
|
| 230 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + num_extra_words;
|
| 231 |
+
end if;
|
| 232 |
+
else
|
| 233 |
+
num_data_valid <= RESIZE(num_extra_words, ADDR_WIDTH + 1);
|
| 234 |
+
end if;
|
| 235 |
+
end if; -- sync end
|
| 236 |
+
end process; --
|
| 237 |
+
|
| 238 |
+
-- dout_vld
|
| 239 |
+
process (clk) begin
|
| 240 |
+
-- reset sync
|
| 241 |
+
if clk'event and clk = '1' then
|
| 242 |
+
if reset = '1' then
|
| 243 |
+
dout_vld <= '0';
|
| 244 |
+
elsif pop = '1' then
|
| 245 |
+
dout_vld <= '1';
|
| 246 |
+
elsif pop_dout = '1' then
|
| 247 |
+
dout_vld <= '0';
|
| 248 |
+
end if;
|
| 249 |
+
end if; -- sync end
|
| 250 |
+
end process;
|
| 251 |
+
end architecture;
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
library ieee;
|
| 255 |
+
use ieee.std_logic_1164.all;
|
| 256 |
+
use ieee.std_logic_unsigned.all;
|
| 257 |
+
|
| 258 |
+
entity myproject_fifo_w384_d4096_A_ram is
|
| 259 |
+
generic (
|
| 260 |
+
MEM_STYLE : string := "auto";
|
| 261 |
+
DATA_WIDTH : integer := 384;
|
| 262 |
+
ADDR_WIDTH : integer := 12;
|
| 263 |
+
DEPTH : integer := 4096);
|
| 264 |
+
port (
|
| 265 |
+
clk : in std_logic;
|
| 266 |
+
reset : in std_logic;
|
| 267 |
+
we : in std_logic;
|
| 268 |
+
waddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 269 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 270 |
+
raddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 271 |
+
rden : in std_logic;
|
| 272 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0)
|
| 273 |
+
);
|
| 274 |
+
end entity;
|
| 275 |
+
|
| 276 |
+
architecture arch of myproject_fifo_w384_d4096_A_ram is
|
| 277 |
+
type memtype is array (0 to DEPTH - 1) of std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 278 |
+
signal mem : memtype;
|
| 279 |
+
attribute ram_style: string;
|
| 280 |
+
attribute ram_style of mem: signal is MEM_STYLE;
|
| 281 |
+
signal mem_reg : std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 282 |
+
|
| 283 |
+
begin
|
| 284 |
+
dout <= mem_reg;
|
| 285 |
+
|
| 286 |
+
process (clk) begin
|
| 287 |
+
-- reset sync
|
| 288 |
+
if clk'event and clk = '1' then
|
| 289 |
+
if reset = '1' then
|
| 290 |
+
mem_reg <= ( others=> '0');
|
| 291 |
+
elsif (rden = '1') then
|
| 292 |
+
mem_reg <= mem(conv_integer(raddr));
|
| 293 |
+
end if;
|
| 294 |
+
end if; -- sync end
|
| 295 |
+
end process;
|
| 296 |
+
|
| 297 |
+
process (clk) begin
|
| 298 |
+
if clk'event and clk = '1' then
|
| 299 |
+
if we = '1' then
|
| 300 |
+
mem(conv_integer(waddr)) <= din;
|
| 301 |
+
end if;
|
| 302 |
+
end if;
|
| 303 |
+
end process;
|
| 304 |
+
|
| 305 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_fifo_w512_d1024_A.vhd
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 2
|
| 12 |
+
|
| 13 |
+
entity myproject_fifo_w512_d1024_A is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "auto";
|
| 16 |
+
DATA_WIDTH : integer := 512;
|
| 17 |
+
ADDR_WIDTH : integer := 10;
|
| 18 |
+
DEPTH : integer := 1024);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
if_num_data_valid : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 31 |
+
if_fifo_cap : out std_logic_vector(ADDR_WIDTH downto 0); -- for FRP
|
| 32 |
+
|
| 33 |
+
if_empty_n : out std_logic;
|
| 34 |
+
if_read_ce : in std_logic;
|
| 35 |
+
if_read : in std_logic;
|
| 36 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 37 |
+
);
|
| 38 |
+
end entity;
|
| 39 |
+
|
| 40 |
+
architecture arch of myproject_fifo_w512_d1024_A is
|
| 41 |
+
------------------------Task and function--------------
|
| 42 |
+
function clog2 (x : INTEGER) return INTEGER is
|
| 43 |
+
variable n, m : INTEGER;
|
| 44 |
+
begin
|
| 45 |
+
n := 1;
|
| 46 |
+
m := 2;
|
| 47 |
+
while m < x loop
|
| 48 |
+
n := n + 1;
|
| 49 |
+
m := m * 2;
|
| 50 |
+
end loop;
|
| 51 |
+
return n;
|
| 52 |
+
end function clog2;
|
| 53 |
+
------------------------Parameter----------------------
|
| 54 |
+
constant MEM_DEPTH : INTEGER := DEPTH - 1;
|
| 55 |
+
constant MEM_AWIDTH : INTEGER := clog2(MEM_DEPTH);
|
| 56 |
+
------------------------Component----------------------
|
| 57 |
+
component myproject_fifo_w512_d1024_A_ram is
|
| 58 |
+
generic (
|
| 59 |
+
MEM_STYLE : string := "auto";
|
| 60 |
+
DATA_WIDTH : integer := 512;
|
| 61 |
+
ADDR_WIDTH : integer := 10;
|
| 62 |
+
DEPTH : integer := 1024);
|
| 63 |
+
port (
|
| 64 |
+
clk : in std_logic;
|
| 65 |
+
reset : in std_logic;
|
| 66 |
+
we : in std_logic;
|
| 67 |
+
waddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 68 |
+
din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 69 |
+
raddr : in std_logic_vector(ADDR_WIDTH - 1 downto 0);
|
| 70 |
+
rden : in std_logic;
|
| 71 |
+
dout : out std_logic_vector(DATA_WIDTH - 1 downto 0));
|
| 72 |
+
end component;
|
| 73 |
+
------------------------Local signal-------------------
|
| 74 |
+
signal waddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 75 |
+
signal raddr : unsigned(MEM_AWIDTH - 1 downto 0) := (others => '0');
|
| 76 |
+
signal wnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 77 |
+
signal rnext : unsigned(MEM_AWIDTH - 1 downto 0);
|
| 78 |
+
signal push : std_logic;
|
| 79 |
+
signal pop : std_logic;
|
| 80 |
+
signal mOutPtr : unsigned(MEM_AWIDTH downto 0) := (others => '0');
|
| 81 |
+
signal empty_n : std_logic := '0';
|
| 82 |
+
signal full_n : std_logic := '1';
|
| 83 |
+
-- has num_data_valid ?
|
| 84 |
+
signal num_extra_words: UNSIGNED(0 downto 0); -- yes
|
| 85 |
+
signal num_data_valid : UNSIGNED(ADDR_WIDTH downto 0); -- yes
|
| 86 |
+
|
| 87 |
+
signal pop_dout : std_logic;
|
| 88 |
+
signal num_data_cnt : UNSIGNED(ADDR_WIDTH downto 0);
|
| 89 |
+
signal dout_vld : std_logic := '0';
|
| 90 |
+
begin
|
| 91 |
+
----------------------- Instantiation -----------------------
|
| 92 |
+
U_myproject_fifo_w512_d1024_A_ram : myproject_fifo_w512_d1024_A_ram
|
| 93 |
+
generic map (
|
| 94 |
+
MEM_STYLE => MEM_STYLE,
|
| 95 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 96 |
+
ADDR_WIDTH => MEM_AWIDTH,
|
| 97 |
+
DEPTH => MEM_DEPTH)
|
| 98 |
+
port map (
|
| 99 |
+
clk => clk,
|
| 100 |
+
reset => reset,
|
| 101 |
+
we => push,
|
| 102 |
+
waddr => std_logic_vector(waddr),
|
| 103 |
+
din => if_din,
|
| 104 |
+
raddr => std_logic_vector(raddr),
|
| 105 |
+
rden => pop,
|
| 106 |
+
dout => if_dout);
|
| 107 |
+
|
| 108 |
+
--------------------------- Body ----------------------------
|
| 109 |
+
-- has num_data_valid ?
|
| 110 |
+
if_num_data_valid <= STD_LOGIC_VECTOR(num_data_valid); -- yes
|
| 111 |
+
if_fifo_cap <= STD_LOGIC_VECTOR(TO_UNSIGNED(DEPTH, ADDR_WIDTH + 1)); -- yes
|
| 112 |
+
|
| 113 |
+
-- almost full/empty
|
| 114 |
+
|
| 115 |
+
-- program full/empty
|
| 116 |
+
|
| 117 |
+
if_full_n <= full_n;
|
| 118 |
+
if_empty_n <= dout_vld;
|
| 119 |
+
|
| 120 |
+
push <= full_n and if_write_ce and if_write;
|
| 121 |
+
pop <= empty_n and (not dout_vld or pop_dout);
|
| 122 |
+
pop_dout <= dout_vld and if_read_ce and if_read;
|
| 123 |
+
|
| 124 |
+
wnext <= waddr when push = '0' else
|
| 125 |
+
(others => '0') when waddr = MEM_DEPTH - 1 else
|
| 126 |
+
waddr + 1;
|
| 127 |
+
rnext <= raddr when pop = '0' else
|
| 128 |
+
(others => '0') when raddr = MEM_DEPTH - 1 else
|
| 129 |
+
raddr + 1;
|
| 130 |
+
|
| 131 |
+
-- waddr
|
| 132 |
+
process (clk) begin
|
| 133 |
+
-- reset sync
|
| 134 |
+
if clk'event and clk = '1' then
|
| 135 |
+
if reset = '1' then
|
| 136 |
+
waddr <= (others => '0');
|
| 137 |
+
else
|
| 138 |
+
waddr <= wnext;
|
| 139 |
+
end if;
|
| 140 |
+
end if; -- sync end
|
| 141 |
+
end process;
|
| 142 |
+
|
| 143 |
+
-- raddr
|
| 144 |
+
process (clk) begin
|
| 145 |
+
-- reset sync
|
| 146 |
+
if clk'event and clk = '1' then
|
| 147 |
+
if reset = '1' then
|
| 148 |
+
raddr <= (others => '0');
|
| 149 |
+
else
|
| 150 |
+
raddr <= rnext;
|
| 151 |
+
end if;
|
| 152 |
+
end if; -- sync end
|
| 153 |
+
end process;
|
| 154 |
+
|
| 155 |
+
-- mOutPtr
|
| 156 |
+
process (clk) begin
|
| 157 |
+
-- reset sync
|
| 158 |
+
if clk'event and clk = '1' then
|
| 159 |
+
if reset = '1' then
|
| 160 |
+
mOutPtr <= (others => '0');
|
| 161 |
+
elsif push = '1' and pop = '0' then
|
| 162 |
+
mOutPtr <= mOutPtr + 1;
|
| 163 |
+
elsif push = '0' and pop = '1' then
|
| 164 |
+
mOutPtr <= mOutPtr - 1;
|
| 165 |
+
end if;
|
| 166 |
+
end if; -- sync end
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
-- full_n
|
| 170 |
+
process (clk) begin
|
| 171 |
+
-- reset sync
|
| 172 |
+
if clk'event and clk = '1' then
|
| 173 |
+
if reset = '1' then
|
| 174 |
+
full_n <= '1';
|
| 175 |
+
elsif push = '1' and pop_dout = '0' and num_data_cnt = DEPTH - 1 then
|
| 176 |
+
full_n <= '0';
|
| 177 |
+
elsif push = '0' and pop_dout = '1' then
|
| 178 |
+
full_n <= '1';
|
| 179 |
+
end if;
|
| 180 |
+
end if; -- sync end
|
| 181 |
+
end process;
|
| 182 |
+
|
| 183 |
+
-- empty_n
|
| 184 |
+
process (clk) begin
|
| 185 |
+
-- reset sync
|
| 186 |
+
if clk'event and clk = '1' then
|
| 187 |
+
if reset = '1' then
|
| 188 |
+
empty_n <= '0';
|
| 189 |
+
elsif push = '1' and pop = '0' then
|
| 190 |
+
empty_n <= '1';
|
| 191 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 192 |
+
empty_n <= '0';
|
| 193 |
+
end if;
|
| 194 |
+
end if; -- sync end
|
| 195 |
+
end process;
|
| 196 |
+
|
| 197 |
+
-- almost_full_n
|
| 198 |
+
|
| 199 |
+
-- almost_empty_n
|
| 200 |
+
|
| 201 |
+
-- prog_full_n
|
| 202 |
+
|
| 203 |
+
-- prog_empty_n
|
| 204 |
+
|
| 205 |
+
-- num_data_cnt
|
| 206 |
+
process (clk) begin
|
| 207 |
+
-- reset sync
|
| 208 |
+
if clk'event and clk = '1' then
|
| 209 |
+
if reset = '1' then
|
| 210 |
+
num_data_cnt <= (others => '0');
|
| 211 |
+
elsif push = '1' and pop_dout = '0' then
|
| 212 |
+
num_data_cnt <= num_data_cnt + 1;
|
| 213 |
+
elsif push = '0' and pop_dout = '1' then
|
| 214 |
+
num_data_cnt <= num_data_cnt - 1;
|
| 215 |
+
end if;
|
| 216 |
+
end if; -- sync end
|
| 217 |
+
end process;
|
| 218 |
+
|
| 219 |
+
-- num_data_valid
|
| 220 |
+
num_extra_words <= TO_UNSIGNED(1,1) when (dout_vld and not pop_dout) = '1' else (others=>'0');
|
| 221 |
+
process (clk) begin
|
| 222 |
+
-- reset sync
|
| 223 |
+
if clk'event and clk = '1' then
|
| 224 |
+
if reset = '1' then
|
| 225 |
+
num_data_valid <= (others => '0');
|
| 226 |
+
elsif (empty_n or (dout_vld and not pop_dout)) = '1' then
|
| 227 |
+
if (push = '1') then
|
| 228 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + 1 + num_extra_words;
|
| 229 |
+
else
|
| 230 |
+
num_data_valid <= RESIZE(mOutPtr, ADDR_WIDTH + 1) + num_extra_words;
|
| 231 |
+
end if;
|
| 232 |
+
else
|
| 233 |
+
num_data_valid <= RESIZE(num_extra_words, ADDR_WIDTH + 1);
|
| 234 |
+
end if;
|
| 235 |
+
end if; -- sync end
|
| 236 |
+
end process; --
|
| 237 |
+
|
| 238 |
+
-- dout_vld
|
| 239 |
+
process (clk) begin
|
| 240 |
+
-- reset sync
|
| 241 |
+
if clk'event and clk = '1' then
|
| 242 |
+
if reset = '1' then
|
| 243 |
+
dout_vld <= '0';
|
| 244 |
+
elsif pop = '1' then
|
| 245 |
+
dout_vld <= '1';
|
| 246 |
+
elsif pop_dout = '1' then
|
| 247 |
+
dout_vld <= '0';
|
| 248 |
+
end if;
|
| 249 |
+
end if; -- sync end
|
| 250 |
+
end process;
|
| 251 |
+
end architecture;
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
library ieee;
|
| 255 |
+
use ieee.std_logic_1164.all;
|
| 256 |
+
use ieee.std_logic_unsigned.all;
|
| 257 |
+
|
| 258 |
+
entity myproject_fifo_w512_d1024_A_ram is
|
| 259 |
+
generic (
|
| 260 |
+
MEM_STYLE : string := "auto";
|
| 261 |
+
DATA_WIDTH : integer := 512;
|
| 262 |
+
ADDR_WIDTH : integer := 10;
|
| 263 |
+
DEPTH : integer := 1024);
|
| 264 |
+
port (
|
| 265 |
+
clk : in std_logic;
|
| 266 |
+
reset : in std_logic;
|
| 267 |
+
we : in std_logic;
|
| 268 |
+
waddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 269 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 270 |
+
raddr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 271 |
+
rden : in std_logic;
|
| 272 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0)
|
| 273 |
+
);
|
| 274 |
+
end entity;
|
| 275 |
+
|
| 276 |
+
architecture arch of myproject_fifo_w512_d1024_A_ram is
|
| 277 |
+
type memtype is array (0 to DEPTH - 1) of std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 278 |
+
signal mem : memtype;
|
| 279 |
+
attribute ram_style: string;
|
| 280 |
+
attribute ram_style of mem: signal is MEM_STYLE;
|
| 281 |
+
signal mem_reg : std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 282 |
+
|
| 283 |
+
begin
|
| 284 |
+
dout <= mem_reg;
|
| 285 |
+
|
| 286 |
+
process (clk) begin
|
| 287 |
+
-- reset sync
|
| 288 |
+
if clk'event and clk = '1' then
|
| 289 |
+
if reset = '1' then
|
| 290 |
+
mem_reg <= ( others=> '0');
|
| 291 |
+
elsif (rden = '1') then
|
| 292 |
+
mem_reg <= mem(conv_integer(raddr));
|
| 293 |
+
end if;
|
| 294 |
+
end if; -- sync end
|
| 295 |
+
end process;
|
| 296 |
+
|
| 297 |
+
process (clk) begin
|
| 298 |
+
if clk'event and clk = '1' then
|
| 299 |
+
if we = '1' then
|
| 300 |
+
mem(conv_integer(waddr)) <= din;
|
| 301 |
+
end if;
|
| 302 |
+
end if;
|
| 303 |
+
end process;
|
| 304 |
+
|
| 305 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_mac_muladd_16s_11s_40s_41_1_1.vhd
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
library IEEE;
|
| 7 |
+
use IEEE.std_logic_1164.all;
|
| 8 |
+
use IEEE.numeric_std.all;
|
| 9 |
+
|
| 10 |
+
--
|
| 11 |
+
--
|
| 12 |
+
--
|
| 13 |
+
--
|
| 14 |
+
entity myproject_mac_muladd_16s_11s_40s_41_1_1_DSP48_0 is
|
| 15 |
+
port (
|
| 16 |
+
in0: in std_logic_vector(16 - 1 downto 0);
|
| 17 |
+
in1: in std_logic_vector(11 - 1 downto 0);
|
| 18 |
+
in2: in std_logic_vector(40 - 1 downto 0);
|
| 19 |
+
dout: out std_logic_vector(41 - 1 downto 0));
|
| 20 |
+
|
| 21 |
+
end entity;
|
| 22 |
+
|
| 23 |
+
architecture behav of myproject_mac_muladd_16s_11s_40s_41_1_1_DSP48_0 is
|
| 24 |
+
signal a : signed(27-1 downto 0);
|
| 25 |
+
signal b : signed(18-1 downto 0);
|
| 26 |
+
signal c : signed(48-1 downto 0);
|
| 27 |
+
signal m : signed(45-1 downto 0);
|
| 28 |
+
signal p : signed(48-1 downto 0);
|
| 29 |
+
begin
|
| 30 |
+
a <= signed(resize(signed(in0), 27));
|
| 31 |
+
b <= signed(resize(signed(in1), 18));
|
| 32 |
+
c <= signed(resize(signed(in2), 48));
|
| 33 |
+
|
| 34 |
+
m <= a * b;
|
| 35 |
+
--
|
| 36 |
+
p <= m + c;
|
| 37 |
+
--
|
| 38 |
+
|
| 39 |
+
dout <= std_logic_vector(resize(unsigned(p), 41));
|
| 40 |
+
|
| 41 |
+
end architecture;
|
| 42 |
+
--
|
| 43 |
+
|
| 44 |
+
Library IEEE;
|
| 45 |
+
use IEEE.std_logic_1164.all;
|
| 46 |
+
|
| 47 |
+
entity myproject_mac_muladd_16s_11s_40s_41_1_1 is
|
| 48 |
+
generic (
|
| 49 |
+
ID : INTEGER;
|
| 50 |
+
NUM_STAGE : INTEGER;
|
| 51 |
+
din0_WIDTH : INTEGER;
|
| 52 |
+
din1_WIDTH : INTEGER;
|
| 53 |
+
din2_WIDTH : INTEGER;
|
| 54 |
+
dout_WIDTH : INTEGER);
|
| 55 |
+
port (
|
| 56 |
+
--
|
| 57 |
+
din0 : IN STD_LOGIC_VECTOR(din0_WIDTH - 1 DOWNTO 0);
|
| 58 |
+
din1 : IN STD_LOGIC_VECTOR(din1_WIDTH - 1 DOWNTO 0);
|
| 59 |
+
din2 : IN STD_LOGIC_VECTOR(din2_WIDTH - 1 DOWNTO 0);
|
| 60 |
+
dout : OUT STD_LOGIC_VECTOR(dout_WIDTH - 1 DOWNTO 0));
|
| 61 |
+
end entity;
|
| 62 |
+
|
| 63 |
+
architecture arch of myproject_mac_muladd_16s_11s_40s_41_1_1 is
|
| 64 |
+
component myproject_mac_muladd_16s_11s_40s_41_1_1_DSP48_0 is
|
| 65 |
+
port (
|
| 66 |
+
--
|
| 67 |
+
in0 : IN STD_LOGIC_VECTOR;
|
| 68 |
+
in1 : IN STD_LOGIC_VECTOR;
|
| 69 |
+
in2 : IN STD_LOGIC_VECTOR;
|
| 70 |
+
dout : OUT STD_LOGIC_VECTOR);
|
| 71 |
+
end component;
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
begin
|
| 76 |
+
myproject_mac_muladd_16s_11s_40s_41_1_1_DSP48_0_U : component myproject_mac_muladd_16s_11s_40s_41_1_1_DSP48_0
|
| 77 |
+
port map (
|
| 78 |
+
--
|
| 79 |
+
in0 => din0,
|
| 80 |
+
in1 => din1,
|
| 81 |
+
in2 => din2,
|
| 82 |
+
dout => dout);
|
| 83 |
+
|
| 84 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_mac_muladd_16s_9s_32s_32_1_1.vhd
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
library IEEE;
|
| 7 |
+
use IEEE.std_logic_1164.all;
|
| 8 |
+
use IEEE.numeric_std.all;
|
| 9 |
+
|
| 10 |
+
--
|
| 11 |
+
--
|
| 12 |
+
--
|
| 13 |
+
--
|
| 14 |
+
entity myproject_mac_muladd_16s_9s_32s_32_1_1_DSP48_0 is
|
| 15 |
+
port (
|
| 16 |
+
in0: in std_logic_vector(16 - 1 downto 0);
|
| 17 |
+
in1: in std_logic_vector(9 - 1 downto 0);
|
| 18 |
+
in2: in std_logic_vector(32 - 1 downto 0);
|
| 19 |
+
dout: out std_logic_vector(32 - 1 downto 0));
|
| 20 |
+
|
| 21 |
+
end entity;
|
| 22 |
+
|
| 23 |
+
architecture behav of myproject_mac_muladd_16s_9s_32s_32_1_1_DSP48_0 is
|
| 24 |
+
signal a : signed(27-1 downto 0);
|
| 25 |
+
signal b : signed(18-1 downto 0);
|
| 26 |
+
signal c : signed(48-1 downto 0);
|
| 27 |
+
signal m : signed(45-1 downto 0);
|
| 28 |
+
signal p : signed(48-1 downto 0);
|
| 29 |
+
begin
|
| 30 |
+
a <= signed(resize(signed(in0), 27));
|
| 31 |
+
b <= signed(resize(signed(in1), 18));
|
| 32 |
+
c <= signed(resize(signed(in2), 48));
|
| 33 |
+
|
| 34 |
+
m <= a * b;
|
| 35 |
+
--
|
| 36 |
+
p <= m + c;
|
| 37 |
+
--
|
| 38 |
+
|
| 39 |
+
dout <= std_logic_vector(resize(unsigned(p), 32));
|
| 40 |
+
|
| 41 |
+
end architecture;
|
| 42 |
+
--
|
| 43 |
+
|
| 44 |
+
Library IEEE;
|
| 45 |
+
use IEEE.std_logic_1164.all;
|
| 46 |
+
|
| 47 |
+
entity myproject_mac_muladd_16s_9s_32s_32_1_1 is
|
| 48 |
+
generic (
|
| 49 |
+
ID : INTEGER;
|
| 50 |
+
NUM_STAGE : INTEGER;
|
| 51 |
+
din0_WIDTH : INTEGER;
|
| 52 |
+
din1_WIDTH : INTEGER;
|
| 53 |
+
din2_WIDTH : INTEGER;
|
| 54 |
+
dout_WIDTH : INTEGER);
|
| 55 |
+
port (
|
| 56 |
+
--
|
| 57 |
+
din0 : IN STD_LOGIC_VECTOR(din0_WIDTH - 1 DOWNTO 0);
|
| 58 |
+
din1 : IN STD_LOGIC_VECTOR(din1_WIDTH - 1 DOWNTO 0);
|
| 59 |
+
din2 : IN STD_LOGIC_VECTOR(din2_WIDTH - 1 DOWNTO 0);
|
| 60 |
+
dout : OUT STD_LOGIC_VECTOR(dout_WIDTH - 1 DOWNTO 0));
|
| 61 |
+
end entity;
|
| 62 |
+
|
| 63 |
+
architecture arch of myproject_mac_muladd_16s_9s_32s_32_1_1 is
|
| 64 |
+
component myproject_mac_muladd_16s_9s_32s_32_1_1_DSP48_0 is
|
| 65 |
+
port (
|
| 66 |
+
--
|
| 67 |
+
in0 : IN STD_LOGIC_VECTOR;
|
| 68 |
+
in1 : IN STD_LOGIC_VECTOR;
|
| 69 |
+
in2 : IN STD_LOGIC_VECTOR;
|
| 70 |
+
dout : OUT STD_LOGIC_VECTOR);
|
| 71 |
+
end component;
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
begin
|
| 76 |
+
myproject_mac_muladd_16s_9s_32s_32_1_1_DSP48_0_U : component myproject_mac_muladd_16s_9s_32s_32_1_1_DSP48_0
|
| 77 |
+
port map (
|
| 78 |
+
--
|
| 79 |
+
in0 => din0,
|
| 80 |
+
in1 => din1,
|
| 81 |
+
in2 => din2,
|
| 82 |
+
dout => dout);
|
| 83 |
+
|
| 84 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_mac_muladd_16s_9s_41s_42_1_1.vhd
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
library IEEE;
|
| 7 |
+
use IEEE.std_logic_1164.all;
|
| 8 |
+
use IEEE.numeric_std.all;
|
| 9 |
+
|
| 10 |
+
--
|
| 11 |
+
--
|
| 12 |
+
--
|
| 13 |
+
--
|
| 14 |
+
entity myproject_mac_muladd_16s_9s_41s_42_1_1_DSP48_0 is
|
| 15 |
+
port (
|
| 16 |
+
in0: in std_logic_vector(16 - 1 downto 0);
|
| 17 |
+
in1: in std_logic_vector(9 - 1 downto 0);
|
| 18 |
+
in2: in std_logic_vector(41 - 1 downto 0);
|
| 19 |
+
dout: out std_logic_vector(42 - 1 downto 0));
|
| 20 |
+
|
| 21 |
+
end entity;
|
| 22 |
+
|
| 23 |
+
architecture behav of myproject_mac_muladd_16s_9s_41s_42_1_1_DSP48_0 is
|
| 24 |
+
signal a : signed(27-1 downto 0);
|
| 25 |
+
signal b : signed(18-1 downto 0);
|
| 26 |
+
signal c : signed(48-1 downto 0);
|
| 27 |
+
signal m : signed(45-1 downto 0);
|
| 28 |
+
signal p : signed(48-1 downto 0);
|
| 29 |
+
begin
|
| 30 |
+
a <= signed(resize(signed(in0), 27));
|
| 31 |
+
b <= signed(resize(signed(in1), 18));
|
| 32 |
+
c <= signed(resize(signed(in2), 48));
|
| 33 |
+
|
| 34 |
+
m <= a * b;
|
| 35 |
+
--
|
| 36 |
+
p <= m + c;
|
| 37 |
+
--
|
| 38 |
+
|
| 39 |
+
dout <= std_logic_vector(resize(unsigned(p), 42));
|
| 40 |
+
|
| 41 |
+
end architecture;
|
| 42 |
+
--
|
| 43 |
+
|
| 44 |
+
Library IEEE;
|
| 45 |
+
use IEEE.std_logic_1164.all;
|
| 46 |
+
|
| 47 |
+
entity myproject_mac_muladd_16s_9s_41s_42_1_1 is
|
| 48 |
+
generic (
|
| 49 |
+
ID : INTEGER;
|
| 50 |
+
NUM_STAGE : INTEGER;
|
| 51 |
+
din0_WIDTH : INTEGER;
|
| 52 |
+
din1_WIDTH : INTEGER;
|
| 53 |
+
din2_WIDTH : INTEGER;
|
| 54 |
+
dout_WIDTH : INTEGER);
|
| 55 |
+
port (
|
| 56 |
+
--
|
| 57 |
+
din0 : IN STD_LOGIC_VECTOR(din0_WIDTH - 1 DOWNTO 0);
|
| 58 |
+
din1 : IN STD_LOGIC_VECTOR(din1_WIDTH - 1 DOWNTO 0);
|
| 59 |
+
din2 : IN STD_LOGIC_VECTOR(din2_WIDTH - 1 DOWNTO 0);
|
| 60 |
+
dout : OUT STD_LOGIC_VECTOR(dout_WIDTH - 1 DOWNTO 0));
|
| 61 |
+
end entity;
|
| 62 |
+
|
| 63 |
+
architecture arch of myproject_mac_muladd_16s_9s_41s_42_1_1 is
|
| 64 |
+
component myproject_mac_muladd_16s_9s_41s_42_1_1_DSP48_0 is
|
| 65 |
+
port (
|
| 66 |
+
--
|
| 67 |
+
in0 : IN STD_LOGIC_VECTOR;
|
| 68 |
+
in1 : IN STD_LOGIC_VECTOR;
|
| 69 |
+
in2 : IN STD_LOGIC_VECTOR;
|
| 70 |
+
dout : OUT STD_LOGIC_VECTOR);
|
| 71 |
+
end component;
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
begin
|
| 76 |
+
myproject_mac_muladd_16s_9s_41s_42_1_1_DSP48_0_U : component myproject_mac_muladd_16s_9s_41s_42_1_1_DSP48_0
|
| 77 |
+
port map (
|
| 78 |
+
--
|
| 79 |
+
in0 => din0,
|
| 80 |
+
in1 => din1,
|
| 81 |
+
in2 => din2,
|
| 82 |
+
dout => dout);
|
| 83 |
+
|
| 84 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_mul_16s_16s_32_1_1.vhd
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 2 |
+
library IEEE;
|
| 3 |
+
use IEEE.std_logic_1164.all;
|
| 4 |
+
use IEEE.numeric_std.all;
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
entity myproject_mul_16s_16s_32_1_1 is
|
| 8 |
+
generic (
|
| 9 |
+
ID : INTEGER := 1;
|
| 10 |
+
NUM_STAGE : INTEGER := 0;
|
| 11 |
+
din0_WIDTH : INTEGER := 14;
|
| 12 |
+
din1_WIDTH : INTEGER := 12;
|
| 13 |
+
dout_WIDTH : INTEGER := 26);
|
| 14 |
+
port (
|
| 15 |
+
|
| 16 |
+
din0: in std_logic_vector(din0_WIDTH - 1 downto 0);
|
| 17 |
+
din1: in std_logic_vector(din1_WIDTH - 1 downto 0);
|
| 18 |
+
dout: out std_logic_vector(dout_WIDTH - 1 downto 0));
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
end entity;
|
| 22 |
+
|
| 23 |
+
architecture behav of myproject_mul_16s_16s_32_1_1 is
|
| 24 |
+
signal tmp_product : std_logic_vector(dout_WIDTH - 1 downto 0);
|
| 25 |
+
signal a_i : std_logic_vector(din0_WIDTH - 1 downto 0);
|
| 26 |
+
signal b_i : std_logic_vector(din1_WIDTH - 1 downto 0);
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
begin
|
| 48 |
+
a_i <= din0;
|
| 49 |
+
b_i <= din1;
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
tmp_product <= std_logic_vector(resize(unsigned(std_logic_vector(signed(a_i) * signed(b_i))), dout_WIDTH));
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
dout <= tmp_product;
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
end architecture;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc_ShiftReg : myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384oqc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configomc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_16u_array_ap_fixed_41_21_5_3_0_16u_configooc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3owc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_24u_array_ap_fixed_41_21_5_3_0_8u_config3ozc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7okc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7olc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7onc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7otc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc_ShiftReg : myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_8u_config37ozc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0_ShiftReg : myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_32u_config12_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0_ShiftReg : myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_pointwise_conv_2d_cl_array_array_ap_fixed_36_16_5_3_0_1u_config60_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic_ShiftReg : myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_pooling2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config6oic_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0_ShiftReg : myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_pooling2d_cl_array_array_ap_fixed_16_6_5_3_0_16u_config11_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc_ShiftReg : myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_relu_config30oDc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc_ShiftReg : myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config13oxc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc_ShiftReg : myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_relu_config26otc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc_ShiftReg : myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config18oqc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc_ShiftReg : myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_64u_array_ap_fixed_16_6_5_3_0_64u_relu_config20osc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0_ShiftReg : myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_relu_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_relu_config3_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc_ShiftReg : myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4ojc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc_ShiftReg : myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_config4oqc_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0_ShiftReg : myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config49_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0_ShiftReg : myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_32u_config52_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0_ShiftReg : myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_64u_config53_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/.autopilot/db/vhdl/myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0.vhd
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
-- 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689
|
| 7 |
+
|
| 8 |
+
library ieee;
|
| 9 |
+
use ieee.std_logic_1164.all;
|
| 10 |
+
use ieee.numeric_std.all;
|
| 11 |
+
--RAW latency 1
|
| 12 |
+
|
| 13 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0 is
|
| 14 |
+
generic (
|
| 15 |
+
MEM_STYLE : string := "shiftReg";
|
| 16 |
+
DATA_WIDTH : integer := 1;
|
| 17 |
+
ADDR_WIDTH : integer := 1;
|
| 18 |
+
DEPTH : integer := 2);
|
| 19 |
+
port (
|
| 20 |
+
clk : in std_logic;
|
| 21 |
+
reset : in std_logic;
|
| 22 |
+
|
| 23 |
+
-- write
|
| 24 |
+
if_full_n : out std_logic;
|
| 25 |
+
if_write_ce : in std_logic;
|
| 26 |
+
if_write : in std_logic;
|
| 27 |
+
if_din : in std_logic_vector(DATA_WIDTH - 1 downto 0);
|
| 28 |
+
|
| 29 |
+
-- read
|
| 30 |
+
|
| 31 |
+
if_empty_n : out std_logic;
|
| 32 |
+
if_read_ce : in std_logic;
|
| 33 |
+
if_read : in std_logic;
|
| 34 |
+
if_dout : out std_logic_vector(DATA_WIDTH - 1 downto 0)
|
| 35 |
+
);
|
| 36 |
+
end entity;
|
| 37 |
+
|
| 38 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0 is
|
| 39 |
+
------------------------Task and function--------------
|
| 40 |
+
------------------------Parameter----------------------
|
| 41 |
+
constant SRL_DEPTH : INTEGER := DEPTH;
|
| 42 |
+
constant SRL_AWIDTH : INTEGER := ADDR_WIDTH;
|
| 43 |
+
------------------------Component----------------------
|
| 44 |
+
component myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0_ShiftReg is
|
| 45 |
+
generic (
|
| 46 |
+
DATA_WIDTH : integer := 1;
|
| 47 |
+
ADDR_WIDTH : integer := 1;
|
| 48 |
+
DEPTH : integer := 2);
|
| 49 |
+
port (
|
| 50 |
+
clk : in std_logic;
|
| 51 |
+
we : in std_logic;
|
| 52 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 53 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 54 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 55 |
+
end component;
|
| 56 |
+
|
| 57 |
+
signal addr : UNSIGNED(SRL_AWIDTH - 1 downto 0);
|
| 58 |
+
signal push : STD_LOGIC;
|
| 59 |
+
signal pop : STD_LOGIC;
|
| 60 |
+
signal mOutPtr : UNSIGNED(SRL_AWIDTH downto 0) := (others => '0');
|
| 61 |
+
signal empty_n : STD_LOGIC := '0';
|
| 62 |
+
signal full_n : std_logic := '1';
|
| 63 |
+
-- has num_data_valid? no
|
| 64 |
+
begin
|
| 65 |
+
----------------------- Instantiation -----------------------
|
| 66 |
+
U_myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0_ShiftReg : myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0_ShiftReg
|
| 67 |
+
generic map (
|
| 68 |
+
DATA_WIDTH => DATA_WIDTH,
|
| 69 |
+
ADDR_WIDTH => SRL_AWIDTH,
|
| 70 |
+
DEPTH => SRL_DEPTH)
|
| 71 |
+
port map (
|
| 72 |
+
clk => clk,
|
| 73 |
+
we => push,
|
| 74 |
+
addr => STD_LOGIC_VECTOR(addr),
|
| 75 |
+
din => if_din,
|
| 76 |
+
dout => if_dout);
|
| 77 |
+
--------------------------- Body ----------------------------
|
| 78 |
+
-- has num_data_valid ? no
|
| 79 |
+
|
| 80 |
+
-- almost full/empty
|
| 81 |
+
|
| 82 |
+
-- program full/empty
|
| 83 |
+
|
| 84 |
+
if_full_n <= full_n;
|
| 85 |
+
if_empty_n <= empty_n;
|
| 86 |
+
|
| 87 |
+
push <= full_n and if_write_ce and if_write;
|
| 88 |
+
pop <= empty_n and if_read_ce and if_read;
|
| 89 |
+
|
| 90 |
+
-- addr
|
| 91 |
+
process (clk) begin
|
| 92 |
+
-- reset sync
|
| 93 |
+
if clk'event and clk = '1' then
|
| 94 |
+
if reset = '1' then
|
| 95 |
+
addr <= (others => '0');
|
| 96 |
+
elsif push = '1' and pop = '0' and empty_n = '1' then
|
| 97 |
+
addr <= addr + 1;
|
| 98 |
+
elsif push = '0' and pop = '1' and mOutPtr /= 1 then
|
| 99 |
+
addr <= addr - 1;
|
| 100 |
+
end if;
|
| 101 |
+
end if; -- sync end
|
| 102 |
+
end process;
|
| 103 |
+
|
| 104 |
+
-- mOutPtr
|
| 105 |
+
process (clk) begin
|
| 106 |
+
-- reset sync
|
| 107 |
+
if clk'event and clk = '1' then
|
| 108 |
+
if reset = '1' then
|
| 109 |
+
mOutPtr <= (others => '0');
|
| 110 |
+
elsif push = '1' and pop = '0' then
|
| 111 |
+
mOutPtr <= mOutPtr + 1;
|
| 112 |
+
elsif push = '0' and pop = '1' then
|
| 113 |
+
mOutPtr <= mOutPtr - 1;
|
| 114 |
+
end if;
|
| 115 |
+
end if; -- sync end
|
| 116 |
+
end process;
|
| 117 |
+
|
| 118 |
+
-- full_n
|
| 119 |
+
process (clk) begin
|
| 120 |
+
-- reset sync
|
| 121 |
+
if clk'event and clk = '1' then
|
| 122 |
+
if reset = '1' then
|
| 123 |
+
full_n <= '1';
|
| 124 |
+
elsif push = '1' and pop = '0' and mOutPtr = DEPTH - 1 then
|
| 125 |
+
full_n <= '0';
|
| 126 |
+
elsif push = '0' and pop = '1' then
|
| 127 |
+
full_n <= '1';
|
| 128 |
+
end if;
|
| 129 |
+
end if; -- sync end
|
| 130 |
+
end process;
|
| 131 |
+
|
| 132 |
+
-- empty_n
|
| 133 |
+
process (clk) begin
|
| 134 |
+
-- reset sync
|
| 135 |
+
if clk'event and clk = '1' then
|
| 136 |
+
if reset = '1' then
|
| 137 |
+
empty_n <= '0';
|
| 138 |
+
elsif push = '1' and pop = '0' then
|
| 139 |
+
empty_n <= '1';
|
| 140 |
+
elsif push = '0' and pop = '1' and mOutPtr = 1 then
|
| 141 |
+
empty_n <= '0';
|
| 142 |
+
end if;
|
| 143 |
+
end if; -- sync end
|
| 144 |
+
end process;
|
| 145 |
+
|
| 146 |
+
-- almost_full_n
|
| 147 |
+
|
| 148 |
+
-- almost_empty_n
|
| 149 |
+
|
| 150 |
+
-- prog_full_n
|
| 151 |
+
|
| 152 |
+
-- prog_empty_n
|
| 153 |
+
|
| 154 |
+
end architecture rtl;
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
library IEEE;
|
| 158 |
+
use IEEE.std_logic_1164.all;
|
| 159 |
+
use IEEE.std_logic_unsigned.all;
|
| 160 |
+
|
| 161 |
+
entity myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0_ShiftReg is
|
| 162 |
+
generic (
|
| 163 |
+
DATA_WIDTH : integer := 1;
|
| 164 |
+
ADDR_WIDTH : integer := 1;
|
| 165 |
+
DEPTH : integer := 2);
|
| 166 |
+
port (
|
| 167 |
+
clk : in std_logic;
|
| 168 |
+
we : in std_logic;
|
| 169 |
+
addr : in std_logic_vector(ADDR_WIDTH-1 downto 0);
|
| 170 |
+
din : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 171 |
+
dout : out std_logic_vector(DATA_WIDTH-1 downto 0));
|
| 172 |
+
end myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0_ShiftReg;
|
| 173 |
+
|
| 174 |
+
architecture rtl of myproject_start_for_zeropad2d_cl_array_array_ap_fixed_16_6_5_3_0_96u_config54_U0_ShiftReg is
|
| 175 |
+
type SRL_ARRAY is array (0 to DEPTH-1) of std_logic_vector(DATA_WIDTH-1 downto 0);
|
| 176 |
+
signal SRL_SIG : SRL_ARRAY;
|
| 177 |
+
|
| 178 |
+
begin
|
| 179 |
+
dout <= SRL_SIG(conv_integer(addr));
|
| 180 |
+
|
| 181 |
+
process (clk)
|
| 182 |
+
begin
|
| 183 |
+
if (clk'event and clk = '1') then
|
| 184 |
+
if (we = '1') then
|
| 185 |
+
SRL_SIG <= din & SRL_SIG(0 to DEPTH-2);
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
end architecture rtl;
|
myproject_prj/solution1/impl/misc/logo.png
ADDED
|
myproject_prj/solution1/impl/vhdl/myproject_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384_s.vhd
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
|
| 7 |
+
library IEEE;
|
| 8 |
+
use IEEE.std_logic_1164.all;
|
| 9 |
+
use IEEE.numeric_std.all;
|
| 10 |
+
|
| 11 |
+
entity myproject_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384_s is
|
| 12 |
+
port (
|
| 13 |
+
ap_clk : IN STD_LOGIC;
|
| 14 |
+
ap_rst : IN STD_LOGIC;
|
| 15 |
+
ap_start : IN STD_LOGIC;
|
| 16 |
+
start_full_n : IN STD_LOGIC;
|
| 17 |
+
ap_done : OUT STD_LOGIC;
|
| 18 |
+
ap_continue : IN STD_LOGIC;
|
| 19 |
+
ap_idle : OUT STD_LOGIC;
|
| 20 |
+
ap_ready : OUT STD_LOGIC;
|
| 21 |
+
layer10_out_dout : IN STD_LOGIC_VECTOR (255 downto 0);
|
| 22 |
+
layer10_out_num_data_valid : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 23 |
+
layer10_out_fifo_cap : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 24 |
+
layer10_out_empty_n : IN STD_LOGIC;
|
| 25 |
+
layer10_out_read : OUT STD_LOGIC;
|
| 26 |
+
layer44_cpy1_din : OUT STD_LOGIC_VECTOR (255 downto 0);
|
| 27 |
+
layer44_cpy1_num_data_valid : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 28 |
+
layer44_cpy1_fifo_cap : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 29 |
+
layer44_cpy1_full_n : IN STD_LOGIC;
|
| 30 |
+
layer44_cpy1_write : OUT STD_LOGIC;
|
| 31 |
+
layer44_cpy2_din : OUT STD_LOGIC_VECTOR (255 downto 0);
|
| 32 |
+
layer44_cpy2_num_data_valid : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 33 |
+
layer44_cpy2_fifo_cap : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 34 |
+
layer44_cpy2_full_n : IN STD_LOGIC;
|
| 35 |
+
layer44_cpy2_write : OUT STD_LOGIC;
|
| 36 |
+
start_out : OUT STD_LOGIC;
|
| 37 |
+
start_write : OUT STD_LOGIC );
|
| 38 |
+
end;
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
architecture behav of myproject_clone_stream_array_ap_fixed_16u_array_ap_fixed_16_6_5_3_0_16u_16384_s is
|
| 42 |
+
constant ap_const_logic_1 : STD_LOGIC := '1';
|
| 43 |
+
constant ap_const_logic_0 : STD_LOGIC := '0';
|
| 44 |
+
constant ap_ST_fsm_state1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 45 |
+
constant ap_const_boolean_1 : BOOLEAN := true;
|
| 46 |
+
constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000";
|
| 47 |
+
constant ap_const_boolean_0 : BOOLEAN := false;
|
| 48 |
+
constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 49 |
+
constant ap_const_lv10_0 : STD_LOGIC_VECTOR (9 downto 0) := "0000000000";
|
| 50 |
+
constant ap_const_lv10_1 : STD_LOGIC_VECTOR (9 downto 0) := "0000000001";
|
| 51 |
+
constant ap_const_lv10_3FF : STD_LOGIC_VECTOR (9 downto 0) := "1111111111";
|
| 52 |
+
|
| 53 |
+
attribute shreg_extract : string;
|
| 54 |
+
signal real_start : STD_LOGIC;
|
| 55 |
+
signal start_once_reg : STD_LOGIC := '0';
|
| 56 |
+
signal ap_CS_fsm : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 57 |
+
attribute fsm_encoding : string;
|
| 58 |
+
attribute fsm_encoding of ap_CS_fsm : signal is "none";
|
| 59 |
+
signal ap_CS_fsm_state1 : STD_LOGIC;
|
| 60 |
+
attribute fsm_encoding of ap_CS_fsm_state1 : signal is "none";
|
| 61 |
+
signal internal_ap_ready : STD_LOGIC;
|
| 62 |
+
signal ap_done_reg : STD_LOGIC := '0';
|
| 63 |
+
signal ap_block_state1_pp0_stage0_iter0 : BOOLEAN;
|
| 64 |
+
signal icmp_ln22_fu_78_p2 : STD_LOGIC_VECTOR (0 downto 0);
|
| 65 |
+
signal ap_condition_exit_pp0_iter0_stage0 : STD_LOGIC;
|
| 66 |
+
signal ap_loop_exit_ready : STD_LOGIC;
|
| 67 |
+
signal ap_ready_int : STD_LOGIC;
|
| 68 |
+
signal layer10_out_blk_n : STD_LOGIC;
|
| 69 |
+
signal layer44_cpy1_blk_n : STD_LOGIC;
|
| 70 |
+
signal layer44_cpy2_blk_n : STD_LOGIC;
|
| 71 |
+
signal i_0101_fu_38 : STD_LOGIC_VECTOR (9 downto 0) := "0000000000";
|
| 72 |
+
signal i_fu_72_p2 : STD_LOGIC_VECTOR (9 downto 0);
|
| 73 |
+
signal ap_loop_init : STD_LOGIC;
|
| 74 |
+
signal ap_sig_allocacmp_i_0101_load : STD_LOGIC_VECTOR (9 downto 0);
|
| 75 |
+
signal layer10_out_read_local : STD_LOGIC;
|
| 76 |
+
signal layer44_cpy1_write_local : STD_LOGIC;
|
| 77 |
+
signal layer44_cpy2_write_local : STD_LOGIC;
|
| 78 |
+
signal ap_continue_int : STD_LOGIC;
|
| 79 |
+
signal ap_done_int : STD_LOGIC;
|
| 80 |
+
signal ap_NS_fsm : STD_LOGIC_VECTOR (0 downto 0);
|
| 81 |
+
signal ap_ST_fsm_state1_blk : STD_LOGIC;
|
| 82 |
+
signal ap_start_int : STD_LOGIC;
|
| 83 |
+
signal ap_done_sig : STD_LOGIC;
|
| 84 |
+
signal ap_ce_reg : STD_LOGIC;
|
| 85 |
+
|
| 86 |
+
component myproject_flow_control_loop_pipe IS
|
| 87 |
+
port (
|
| 88 |
+
ap_clk : IN STD_LOGIC;
|
| 89 |
+
ap_rst : IN STD_LOGIC;
|
| 90 |
+
ap_start : IN STD_LOGIC;
|
| 91 |
+
ap_ready : OUT STD_LOGIC;
|
| 92 |
+
ap_done : OUT STD_LOGIC;
|
| 93 |
+
ap_start_int : OUT STD_LOGIC;
|
| 94 |
+
ap_loop_init : OUT STD_LOGIC;
|
| 95 |
+
ap_ready_int : IN STD_LOGIC;
|
| 96 |
+
ap_loop_exit_ready : IN STD_LOGIC;
|
| 97 |
+
ap_loop_exit_done : IN STD_LOGIC;
|
| 98 |
+
ap_continue_int : OUT STD_LOGIC;
|
| 99 |
+
ap_done_int : IN STD_LOGIC;
|
| 100 |
+
ap_continue : IN STD_LOGIC );
|
| 101 |
+
end component;
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
begin
|
| 106 |
+
flow_control_loop_pipe_U : component myproject_flow_control_loop_pipe
|
| 107 |
+
port map (
|
| 108 |
+
ap_clk => ap_clk,
|
| 109 |
+
ap_rst => ap_rst,
|
| 110 |
+
ap_start => real_start,
|
| 111 |
+
ap_ready => internal_ap_ready,
|
| 112 |
+
ap_done => ap_done_sig,
|
| 113 |
+
ap_start_int => ap_start_int,
|
| 114 |
+
ap_loop_init => ap_loop_init,
|
| 115 |
+
ap_ready_int => ap_ready_int,
|
| 116 |
+
ap_loop_exit_ready => ap_condition_exit_pp0_iter0_stage0,
|
| 117 |
+
ap_loop_exit_done => ap_done_int,
|
| 118 |
+
ap_continue_int => ap_continue_int,
|
| 119 |
+
ap_done_int => ap_done_int,
|
| 120 |
+
ap_continue => ap_continue);
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
ap_CS_fsm_assign_proc : process(ap_clk)
|
| 127 |
+
begin
|
| 128 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 129 |
+
if (ap_rst = '1') then
|
| 130 |
+
ap_CS_fsm <= ap_ST_fsm_state1;
|
| 131 |
+
else
|
| 132 |
+
ap_CS_fsm <= ap_NS_fsm;
|
| 133 |
+
end if;
|
| 134 |
+
end if;
|
| 135 |
+
end process;
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
ap_done_reg_assign_proc : process(ap_clk)
|
| 139 |
+
begin
|
| 140 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 141 |
+
if (ap_rst = '1') then
|
| 142 |
+
ap_done_reg <= ap_const_logic_0;
|
| 143 |
+
else
|
| 144 |
+
if ((ap_continue_int = ap_const_logic_1)) then
|
| 145 |
+
ap_done_reg <= ap_const_logic_0;
|
| 146 |
+
elsif (((ap_loop_exit_ready = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 147 |
+
ap_done_reg <= ap_const_logic_1;
|
| 148 |
+
end if;
|
| 149 |
+
end if;
|
| 150 |
+
end if;
|
| 151 |
+
end process;
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
start_once_reg_assign_proc : process(ap_clk)
|
| 155 |
+
begin
|
| 156 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 157 |
+
if (ap_rst = '1') then
|
| 158 |
+
start_once_reg <= ap_const_logic_0;
|
| 159 |
+
else
|
| 160 |
+
if (((real_start = ap_const_logic_1) and (internal_ap_ready = ap_const_logic_0))) then
|
| 161 |
+
start_once_reg <= ap_const_logic_1;
|
| 162 |
+
elsif ((internal_ap_ready = ap_const_logic_1)) then
|
| 163 |
+
start_once_reg <= ap_const_logic_0;
|
| 164 |
+
end if;
|
| 165 |
+
end if;
|
| 166 |
+
end if;
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
i_0101_fu_38_assign_proc : process (ap_clk)
|
| 171 |
+
begin
|
| 172 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 173 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 174 |
+
i_0101_fu_38 <= i_fu_72_p2;
|
| 175 |
+
end if;
|
| 176 |
+
end if;
|
| 177 |
+
end process;
|
| 178 |
+
|
| 179 |
+
ap_NS_fsm_assign_proc : process (ap_CS_fsm, ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 180 |
+
begin
|
| 181 |
+
case ap_CS_fsm is
|
| 182 |
+
when ap_ST_fsm_state1 =>
|
| 183 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 184 |
+
when others =>
|
| 185 |
+
ap_NS_fsm <= "X";
|
| 186 |
+
end case;
|
| 187 |
+
end process;
|
| 188 |
+
ap_CS_fsm_state1 <= ap_CS_fsm(0);
|
| 189 |
+
|
| 190 |
+
ap_ST_fsm_state1_blk_assign_proc : process(ap_block_state1_pp0_stage0_iter0)
|
| 191 |
+
begin
|
| 192 |
+
if ((ap_const_boolean_1 = ap_block_state1_pp0_stage0_iter0)) then
|
| 193 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_1;
|
| 194 |
+
else
|
| 195 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_0;
|
| 196 |
+
end if;
|
| 197 |
+
end process;
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
ap_block_state1_pp0_stage0_iter0_assign_proc : process(layer10_out_empty_n, layer44_cpy1_full_n, layer44_cpy2_full_n, ap_done_reg, ap_start_int)
|
| 201 |
+
begin
|
| 202 |
+
ap_block_state1_pp0_stage0_iter0 <= ((ap_done_reg = ap_const_logic_1) or (layer44_cpy2_full_n = ap_const_logic_0) or (layer44_cpy1_full_n = ap_const_logic_0) or (layer10_out_empty_n = ap_const_logic_0) or (ap_start_int = ap_const_logic_0));
|
| 203 |
+
end process;
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
ap_condition_exit_pp0_iter0_stage0_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0, icmp_ln22_fu_78_p2)
|
| 207 |
+
begin
|
| 208 |
+
if (((icmp_ln22_fu_78_p2 = ap_const_lv1_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 209 |
+
ap_condition_exit_pp0_iter0_stage0 <= ap_const_logic_1;
|
| 210 |
+
else
|
| 211 |
+
ap_condition_exit_pp0_iter0_stage0 <= ap_const_logic_0;
|
| 212 |
+
end if;
|
| 213 |
+
end process;
|
| 214 |
+
|
| 215 |
+
ap_done <= ap_done_sig;
|
| 216 |
+
|
| 217 |
+
ap_done_int_assign_proc : process(ap_CS_fsm_state1, ap_done_reg, ap_block_state1_pp0_stage0_iter0, ap_loop_exit_ready)
|
| 218 |
+
begin
|
| 219 |
+
if (((ap_loop_exit_ready = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 220 |
+
ap_done_int <= ap_const_logic_1;
|
| 221 |
+
else
|
| 222 |
+
ap_done_int <= ap_done_reg;
|
| 223 |
+
end if;
|
| 224 |
+
end process;
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
ap_idle_assign_proc : process(ap_CS_fsm_state1, ap_start_int)
|
| 228 |
+
begin
|
| 229 |
+
if (((ap_const_logic_1 = ap_CS_fsm_state1) and (ap_start_int = ap_const_logic_0))) then
|
| 230 |
+
ap_idle <= ap_const_logic_1;
|
| 231 |
+
else
|
| 232 |
+
ap_idle <= ap_const_logic_0;
|
| 233 |
+
end if;
|
| 234 |
+
end process;
|
| 235 |
+
|
| 236 |
+
ap_loop_exit_ready <= ap_condition_exit_pp0_iter0_stage0;
|
| 237 |
+
ap_ready <= internal_ap_ready;
|
| 238 |
+
|
| 239 |
+
ap_ready_int_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 240 |
+
begin
|
| 241 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 242 |
+
ap_ready_int <= ap_const_logic_1;
|
| 243 |
+
else
|
| 244 |
+
ap_ready_int <= ap_const_logic_0;
|
| 245 |
+
end if;
|
| 246 |
+
end process;
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
ap_sig_allocacmp_i_0101_load_assign_proc : process(ap_CS_fsm_state1, i_0101_fu_38, ap_loop_init)
|
| 250 |
+
begin
|
| 251 |
+
if (((ap_loop_init = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 252 |
+
ap_sig_allocacmp_i_0101_load <= ap_const_lv10_0;
|
| 253 |
+
else
|
| 254 |
+
ap_sig_allocacmp_i_0101_load <= i_0101_fu_38;
|
| 255 |
+
end if;
|
| 256 |
+
end process;
|
| 257 |
+
|
| 258 |
+
i_fu_72_p2 <= std_logic_vector(unsigned(ap_sig_allocacmp_i_0101_load) + unsigned(ap_const_lv10_1));
|
| 259 |
+
icmp_ln22_fu_78_p2 <= "1" when (ap_sig_allocacmp_i_0101_load = ap_const_lv10_3FF) else "0";
|
| 260 |
+
|
| 261 |
+
layer10_out_blk_n_assign_proc : process(ap_CS_fsm_state1, layer10_out_empty_n, ap_done_reg, ap_start_int)
|
| 262 |
+
begin
|
| 263 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 264 |
+
layer10_out_blk_n <= layer10_out_empty_n;
|
| 265 |
+
else
|
| 266 |
+
layer10_out_blk_n <= ap_const_logic_1;
|
| 267 |
+
end if;
|
| 268 |
+
end process;
|
| 269 |
+
|
| 270 |
+
layer10_out_read <= layer10_out_read_local;
|
| 271 |
+
|
| 272 |
+
layer10_out_read_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 273 |
+
begin
|
| 274 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 275 |
+
layer10_out_read_local <= ap_const_logic_1;
|
| 276 |
+
else
|
| 277 |
+
layer10_out_read_local <= ap_const_logic_0;
|
| 278 |
+
end if;
|
| 279 |
+
end process;
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
layer44_cpy1_blk_n_assign_proc : process(ap_CS_fsm_state1, layer44_cpy1_full_n, ap_done_reg, ap_start_int)
|
| 283 |
+
begin
|
| 284 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 285 |
+
layer44_cpy1_blk_n <= layer44_cpy1_full_n;
|
| 286 |
+
else
|
| 287 |
+
layer44_cpy1_blk_n <= ap_const_logic_1;
|
| 288 |
+
end if;
|
| 289 |
+
end process;
|
| 290 |
+
|
| 291 |
+
layer44_cpy1_din <= layer10_out_dout;
|
| 292 |
+
layer44_cpy1_write <= layer44_cpy1_write_local;
|
| 293 |
+
|
| 294 |
+
layer44_cpy1_write_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 295 |
+
begin
|
| 296 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 297 |
+
layer44_cpy1_write_local <= ap_const_logic_1;
|
| 298 |
+
else
|
| 299 |
+
layer44_cpy1_write_local <= ap_const_logic_0;
|
| 300 |
+
end if;
|
| 301 |
+
end process;
|
| 302 |
+
|
| 303 |
+
|
| 304 |
+
layer44_cpy2_blk_n_assign_proc : process(ap_CS_fsm_state1, layer44_cpy2_full_n, ap_done_reg, ap_start_int)
|
| 305 |
+
begin
|
| 306 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 307 |
+
layer44_cpy2_blk_n <= layer44_cpy2_full_n;
|
| 308 |
+
else
|
| 309 |
+
layer44_cpy2_blk_n <= ap_const_logic_1;
|
| 310 |
+
end if;
|
| 311 |
+
end process;
|
| 312 |
+
|
| 313 |
+
layer44_cpy2_din <= layer10_out_dout;
|
| 314 |
+
layer44_cpy2_write <= layer44_cpy2_write_local;
|
| 315 |
+
|
| 316 |
+
layer44_cpy2_write_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 317 |
+
begin
|
| 318 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 319 |
+
layer44_cpy2_write_local <= ap_const_logic_1;
|
| 320 |
+
else
|
| 321 |
+
layer44_cpy2_write_local <= ap_const_logic_0;
|
| 322 |
+
end if;
|
| 323 |
+
end process;
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
real_start_assign_proc : process(ap_start, start_full_n, start_once_reg)
|
| 327 |
+
begin
|
| 328 |
+
if (((start_full_n = ap_const_logic_0) and (start_once_reg = ap_const_logic_0))) then
|
| 329 |
+
real_start <= ap_const_logic_0;
|
| 330 |
+
else
|
| 331 |
+
real_start <= ap_start;
|
| 332 |
+
end if;
|
| 333 |
+
end process;
|
| 334 |
+
|
| 335 |
+
start_out <= real_start;
|
| 336 |
+
|
| 337 |
+
start_write_assign_proc : process(real_start, start_once_reg)
|
| 338 |
+
begin
|
| 339 |
+
if (((real_start = ap_const_logic_1) and (start_once_reg = ap_const_logic_0))) then
|
| 340 |
+
start_write <= ap_const_logic_1;
|
| 341 |
+
else
|
| 342 |
+
start_write <= ap_const_logic_0;
|
| 343 |
+
end if;
|
| 344 |
+
end process;
|
| 345 |
+
|
| 346 |
+
end behav;
|
myproject_prj/solution1/impl/vhdl/myproject_clone_stream_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_8192_s.vhd
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
|
| 7 |
+
library IEEE;
|
| 8 |
+
use IEEE.std_logic_1164.all;
|
| 9 |
+
use IEEE.numeric_std.all;
|
| 10 |
+
|
| 11 |
+
entity myproject_clone_stream_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_8192_s is
|
| 12 |
+
port (
|
| 13 |
+
ap_clk : IN STD_LOGIC;
|
| 14 |
+
ap_rst : IN STD_LOGIC;
|
| 15 |
+
ap_start : IN STD_LOGIC;
|
| 16 |
+
start_full_n : IN STD_LOGIC;
|
| 17 |
+
ap_done : OUT STD_LOGIC;
|
| 18 |
+
ap_continue : IN STD_LOGIC;
|
| 19 |
+
ap_idle : OUT STD_LOGIC;
|
| 20 |
+
ap_ready : OUT STD_LOGIC;
|
| 21 |
+
layer15_out_dout : IN STD_LOGIC_VECTOR (511 downto 0);
|
| 22 |
+
layer15_out_num_data_valid : IN STD_LOGIC_VECTOR (8 downto 0);
|
| 23 |
+
layer15_out_fifo_cap : IN STD_LOGIC_VECTOR (8 downto 0);
|
| 24 |
+
layer15_out_empty_n : IN STD_LOGIC;
|
| 25 |
+
layer15_out_read : OUT STD_LOGIC;
|
| 26 |
+
layer45_cpy1_din : OUT STD_LOGIC_VECTOR (511 downto 0);
|
| 27 |
+
layer45_cpy1_num_data_valid : IN STD_LOGIC_VECTOR (8 downto 0);
|
| 28 |
+
layer45_cpy1_fifo_cap : IN STD_LOGIC_VECTOR (8 downto 0);
|
| 29 |
+
layer45_cpy1_full_n : IN STD_LOGIC;
|
| 30 |
+
layer45_cpy1_write : OUT STD_LOGIC;
|
| 31 |
+
layer45_cpy2_din : OUT STD_LOGIC_VECTOR (511 downto 0);
|
| 32 |
+
layer45_cpy2_num_data_valid : IN STD_LOGIC_VECTOR (8 downto 0);
|
| 33 |
+
layer45_cpy2_fifo_cap : IN STD_LOGIC_VECTOR (8 downto 0);
|
| 34 |
+
layer45_cpy2_full_n : IN STD_LOGIC;
|
| 35 |
+
layer45_cpy2_write : OUT STD_LOGIC;
|
| 36 |
+
start_out : OUT STD_LOGIC;
|
| 37 |
+
start_write : OUT STD_LOGIC );
|
| 38 |
+
end;
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
architecture behav of myproject_clone_stream_array_ap_fixed_32u_array_ap_fixed_16_6_5_3_0_32u_8192_s is
|
| 42 |
+
constant ap_const_logic_1 : STD_LOGIC := '1';
|
| 43 |
+
constant ap_const_logic_0 : STD_LOGIC := '0';
|
| 44 |
+
constant ap_ST_fsm_state1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 45 |
+
constant ap_const_boolean_1 : BOOLEAN := true;
|
| 46 |
+
constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000";
|
| 47 |
+
constant ap_const_boolean_0 : BOOLEAN := false;
|
| 48 |
+
constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 49 |
+
constant ap_const_lv8_0 : STD_LOGIC_VECTOR (7 downto 0) := "00000000";
|
| 50 |
+
constant ap_const_lv8_1 : STD_LOGIC_VECTOR (7 downto 0) := "00000001";
|
| 51 |
+
constant ap_const_lv8_FF : STD_LOGIC_VECTOR (7 downto 0) := "11111111";
|
| 52 |
+
|
| 53 |
+
attribute shreg_extract : string;
|
| 54 |
+
signal real_start : STD_LOGIC;
|
| 55 |
+
signal start_once_reg : STD_LOGIC := '0';
|
| 56 |
+
signal ap_CS_fsm : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 57 |
+
attribute fsm_encoding : string;
|
| 58 |
+
attribute fsm_encoding of ap_CS_fsm : signal is "none";
|
| 59 |
+
signal ap_CS_fsm_state1 : STD_LOGIC;
|
| 60 |
+
attribute fsm_encoding of ap_CS_fsm_state1 : signal is "none";
|
| 61 |
+
signal internal_ap_ready : STD_LOGIC;
|
| 62 |
+
signal ap_done_reg : STD_LOGIC := '0';
|
| 63 |
+
signal ap_block_state1_pp0_stage0_iter0 : BOOLEAN;
|
| 64 |
+
signal icmp_ln22_fu_78_p2 : STD_LOGIC_VECTOR (0 downto 0);
|
| 65 |
+
signal ap_condition_exit_pp0_iter0_stage0 : STD_LOGIC;
|
| 66 |
+
signal ap_loop_exit_ready : STD_LOGIC;
|
| 67 |
+
signal ap_ready_int : STD_LOGIC;
|
| 68 |
+
signal layer15_out_blk_n : STD_LOGIC;
|
| 69 |
+
signal layer45_cpy1_blk_n : STD_LOGIC;
|
| 70 |
+
signal layer45_cpy2_blk_n : STD_LOGIC;
|
| 71 |
+
signal i_0101_fu_38 : STD_LOGIC_VECTOR (7 downto 0) := "00000000";
|
| 72 |
+
signal i_fu_72_p2 : STD_LOGIC_VECTOR (7 downto 0);
|
| 73 |
+
signal ap_loop_init : STD_LOGIC;
|
| 74 |
+
signal ap_sig_allocacmp_i_0101_load : STD_LOGIC_VECTOR (7 downto 0);
|
| 75 |
+
signal layer15_out_read_local : STD_LOGIC;
|
| 76 |
+
signal layer45_cpy1_write_local : STD_LOGIC;
|
| 77 |
+
signal layer45_cpy2_write_local : STD_LOGIC;
|
| 78 |
+
signal ap_continue_int : STD_LOGIC;
|
| 79 |
+
signal ap_done_int : STD_LOGIC;
|
| 80 |
+
signal ap_NS_fsm : STD_LOGIC_VECTOR (0 downto 0);
|
| 81 |
+
signal ap_ST_fsm_state1_blk : STD_LOGIC;
|
| 82 |
+
signal ap_start_int : STD_LOGIC;
|
| 83 |
+
signal ap_done_sig : STD_LOGIC;
|
| 84 |
+
signal ap_ce_reg : STD_LOGIC;
|
| 85 |
+
|
| 86 |
+
component myproject_flow_control_loop_pipe IS
|
| 87 |
+
port (
|
| 88 |
+
ap_clk : IN STD_LOGIC;
|
| 89 |
+
ap_rst : IN STD_LOGIC;
|
| 90 |
+
ap_start : IN STD_LOGIC;
|
| 91 |
+
ap_ready : OUT STD_LOGIC;
|
| 92 |
+
ap_done : OUT STD_LOGIC;
|
| 93 |
+
ap_start_int : OUT STD_LOGIC;
|
| 94 |
+
ap_loop_init : OUT STD_LOGIC;
|
| 95 |
+
ap_ready_int : IN STD_LOGIC;
|
| 96 |
+
ap_loop_exit_ready : IN STD_LOGIC;
|
| 97 |
+
ap_loop_exit_done : IN STD_LOGIC;
|
| 98 |
+
ap_continue_int : OUT STD_LOGIC;
|
| 99 |
+
ap_done_int : IN STD_LOGIC;
|
| 100 |
+
ap_continue : IN STD_LOGIC );
|
| 101 |
+
end component;
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
begin
|
| 106 |
+
flow_control_loop_pipe_U : component myproject_flow_control_loop_pipe
|
| 107 |
+
port map (
|
| 108 |
+
ap_clk => ap_clk,
|
| 109 |
+
ap_rst => ap_rst,
|
| 110 |
+
ap_start => real_start,
|
| 111 |
+
ap_ready => internal_ap_ready,
|
| 112 |
+
ap_done => ap_done_sig,
|
| 113 |
+
ap_start_int => ap_start_int,
|
| 114 |
+
ap_loop_init => ap_loop_init,
|
| 115 |
+
ap_ready_int => ap_ready_int,
|
| 116 |
+
ap_loop_exit_ready => ap_condition_exit_pp0_iter0_stage0,
|
| 117 |
+
ap_loop_exit_done => ap_done_int,
|
| 118 |
+
ap_continue_int => ap_continue_int,
|
| 119 |
+
ap_done_int => ap_done_int,
|
| 120 |
+
ap_continue => ap_continue);
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
ap_CS_fsm_assign_proc : process(ap_clk)
|
| 127 |
+
begin
|
| 128 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 129 |
+
if (ap_rst = '1') then
|
| 130 |
+
ap_CS_fsm <= ap_ST_fsm_state1;
|
| 131 |
+
else
|
| 132 |
+
ap_CS_fsm <= ap_NS_fsm;
|
| 133 |
+
end if;
|
| 134 |
+
end if;
|
| 135 |
+
end process;
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
ap_done_reg_assign_proc : process(ap_clk)
|
| 139 |
+
begin
|
| 140 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 141 |
+
if (ap_rst = '1') then
|
| 142 |
+
ap_done_reg <= ap_const_logic_0;
|
| 143 |
+
else
|
| 144 |
+
if ((ap_continue_int = ap_const_logic_1)) then
|
| 145 |
+
ap_done_reg <= ap_const_logic_0;
|
| 146 |
+
elsif (((ap_loop_exit_ready = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 147 |
+
ap_done_reg <= ap_const_logic_1;
|
| 148 |
+
end if;
|
| 149 |
+
end if;
|
| 150 |
+
end if;
|
| 151 |
+
end process;
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
start_once_reg_assign_proc : process(ap_clk)
|
| 155 |
+
begin
|
| 156 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 157 |
+
if (ap_rst = '1') then
|
| 158 |
+
start_once_reg <= ap_const_logic_0;
|
| 159 |
+
else
|
| 160 |
+
if (((real_start = ap_const_logic_1) and (internal_ap_ready = ap_const_logic_0))) then
|
| 161 |
+
start_once_reg <= ap_const_logic_1;
|
| 162 |
+
elsif ((internal_ap_ready = ap_const_logic_1)) then
|
| 163 |
+
start_once_reg <= ap_const_logic_0;
|
| 164 |
+
end if;
|
| 165 |
+
end if;
|
| 166 |
+
end if;
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
i_0101_fu_38_assign_proc : process (ap_clk)
|
| 171 |
+
begin
|
| 172 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 173 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 174 |
+
i_0101_fu_38 <= i_fu_72_p2;
|
| 175 |
+
end if;
|
| 176 |
+
end if;
|
| 177 |
+
end process;
|
| 178 |
+
|
| 179 |
+
ap_NS_fsm_assign_proc : process (ap_CS_fsm, ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 180 |
+
begin
|
| 181 |
+
case ap_CS_fsm is
|
| 182 |
+
when ap_ST_fsm_state1 =>
|
| 183 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 184 |
+
when others =>
|
| 185 |
+
ap_NS_fsm <= "X";
|
| 186 |
+
end case;
|
| 187 |
+
end process;
|
| 188 |
+
ap_CS_fsm_state1 <= ap_CS_fsm(0);
|
| 189 |
+
|
| 190 |
+
ap_ST_fsm_state1_blk_assign_proc : process(ap_block_state1_pp0_stage0_iter0)
|
| 191 |
+
begin
|
| 192 |
+
if ((ap_const_boolean_1 = ap_block_state1_pp0_stage0_iter0)) then
|
| 193 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_1;
|
| 194 |
+
else
|
| 195 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_0;
|
| 196 |
+
end if;
|
| 197 |
+
end process;
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
ap_block_state1_pp0_stage0_iter0_assign_proc : process(layer15_out_empty_n, layer45_cpy1_full_n, layer45_cpy2_full_n, ap_done_reg, ap_start_int)
|
| 201 |
+
begin
|
| 202 |
+
ap_block_state1_pp0_stage0_iter0 <= ((ap_done_reg = ap_const_logic_1) or (layer45_cpy2_full_n = ap_const_logic_0) or (layer45_cpy1_full_n = ap_const_logic_0) or (layer15_out_empty_n = ap_const_logic_0) or (ap_start_int = ap_const_logic_0));
|
| 203 |
+
end process;
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
ap_condition_exit_pp0_iter0_stage0_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0, icmp_ln22_fu_78_p2)
|
| 207 |
+
begin
|
| 208 |
+
if (((icmp_ln22_fu_78_p2 = ap_const_lv1_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 209 |
+
ap_condition_exit_pp0_iter0_stage0 <= ap_const_logic_1;
|
| 210 |
+
else
|
| 211 |
+
ap_condition_exit_pp0_iter0_stage0 <= ap_const_logic_0;
|
| 212 |
+
end if;
|
| 213 |
+
end process;
|
| 214 |
+
|
| 215 |
+
ap_done <= ap_done_sig;
|
| 216 |
+
|
| 217 |
+
ap_done_int_assign_proc : process(ap_CS_fsm_state1, ap_done_reg, ap_block_state1_pp0_stage0_iter0, ap_loop_exit_ready)
|
| 218 |
+
begin
|
| 219 |
+
if (((ap_loop_exit_ready = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 220 |
+
ap_done_int <= ap_const_logic_1;
|
| 221 |
+
else
|
| 222 |
+
ap_done_int <= ap_done_reg;
|
| 223 |
+
end if;
|
| 224 |
+
end process;
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
ap_idle_assign_proc : process(ap_CS_fsm_state1, ap_start_int)
|
| 228 |
+
begin
|
| 229 |
+
if (((ap_const_logic_1 = ap_CS_fsm_state1) and (ap_start_int = ap_const_logic_0))) then
|
| 230 |
+
ap_idle <= ap_const_logic_1;
|
| 231 |
+
else
|
| 232 |
+
ap_idle <= ap_const_logic_0;
|
| 233 |
+
end if;
|
| 234 |
+
end process;
|
| 235 |
+
|
| 236 |
+
ap_loop_exit_ready <= ap_condition_exit_pp0_iter0_stage0;
|
| 237 |
+
ap_ready <= internal_ap_ready;
|
| 238 |
+
|
| 239 |
+
ap_ready_int_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 240 |
+
begin
|
| 241 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 242 |
+
ap_ready_int <= ap_const_logic_1;
|
| 243 |
+
else
|
| 244 |
+
ap_ready_int <= ap_const_logic_0;
|
| 245 |
+
end if;
|
| 246 |
+
end process;
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
ap_sig_allocacmp_i_0101_load_assign_proc : process(ap_CS_fsm_state1, i_0101_fu_38, ap_loop_init)
|
| 250 |
+
begin
|
| 251 |
+
if (((ap_loop_init = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 252 |
+
ap_sig_allocacmp_i_0101_load <= ap_const_lv8_0;
|
| 253 |
+
else
|
| 254 |
+
ap_sig_allocacmp_i_0101_load <= i_0101_fu_38;
|
| 255 |
+
end if;
|
| 256 |
+
end process;
|
| 257 |
+
|
| 258 |
+
i_fu_72_p2 <= std_logic_vector(unsigned(ap_sig_allocacmp_i_0101_load) + unsigned(ap_const_lv8_1));
|
| 259 |
+
icmp_ln22_fu_78_p2 <= "1" when (ap_sig_allocacmp_i_0101_load = ap_const_lv8_FF) else "0";
|
| 260 |
+
|
| 261 |
+
layer15_out_blk_n_assign_proc : process(ap_CS_fsm_state1, layer15_out_empty_n, ap_done_reg, ap_start_int)
|
| 262 |
+
begin
|
| 263 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 264 |
+
layer15_out_blk_n <= layer15_out_empty_n;
|
| 265 |
+
else
|
| 266 |
+
layer15_out_blk_n <= ap_const_logic_1;
|
| 267 |
+
end if;
|
| 268 |
+
end process;
|
| 269 |
+
|
| 270 |
+
layer15_out_read <= layer15_out_read_local;
|
| 271 |
+
|
| 272 |
+
layer15_out_read_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 273 |
+
begin
|
| 274 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 275 |
+
layer15_out_read_local <= ap_const_logic_1;
|
| 276 |
+
else
|
| 277 |
+
layer15_out_read_local <= ap_const_logic_0;
|
| 278 |
+
end if;
|
| 279 |
+
end process;
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
layer45_cpy1_blk_n_assign_proc : process(ap_CS_fsm_state1, layer45_cpy1_full_n, ap_done_reg, ap_start_int)
|
| 283 |
+
begin
|
| 284 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 285 |
+
layer45_cpy1_blk_n <= layer45_cpy1_full_n;
|
| 286 |
+
else
|
| 287 |
+
layer45_cpy1_blk_n <= ap_const_logic_1;
|
| 288 |
+
end if;
|
| 289 |
+
end process;
|
| 290 |
+
|
| 291 |
+
layer45_cpy1_din <= layer15_out_dout;
|
| 292 |
+
layer45_cpy1_write <= layer45_cpy1_write_local;
|
| 293 |
+
|
| 294 |
+
layer45_cpy1_write_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 295 |
+
begin
|
| 296 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 297 |
+
layer45_cpy1_write_local <= ap_const_logic_1;
|
| 298 |
+
else
|
| 299 |
+
layer45_cpy1_write_local <= ap_const_logic_0;
|
| 300 |
+
end if;
|
| 301 |
+
end process;
|
| 302 |
+
|
| 303 |
+
|
| 304 |
+
layer45_cpy2_blk_n_assign_proc : process(ap_CS_fsm_state1, layer45_cpy2_full_n, ap_done_reg, ap_start_int)
|
| 305 |
+
begin
|
| 306 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 307 |
+
layer45_cpy2_blk_n <= layer45_cpy2_full_n;
|
| 308 |
+
else
|
| 309 |
+
layer45_cpy2_blk_n <= ap_const_logic_1;
|
| 310 |
+
end if;
|
| 311 |
+
end process;
|
| 312 |
+
|
| 313 |
+
layer45_cpy2_din <= layer15_out_dout;
|
| 314 |
+
layer45_cpy2_write <= layer45_cpy2_write_local;
|
| 315 |
+
|
| 316 |
+
layer45_cpy2_write_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 317 |
+
begin
|
| 318 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 319 |
+
layer45_cpy2_write_local <= ap_const_logic_1;
|
| 320 |
+
else
|
| 321 |
+
layer45_cpy2_write_local <= ap_const_logic_0;
|
| 322 |
+
end if;
|
| 323 |
+
end process;
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
real_start_assign_proc : process(ap_start, start_full_n, start_once_reg)
|
| 327 |
+
begin
|
| 328 |
+
if (((start_full_n = ap_const_logic_0) and (start_once_reg = ap_const_logic_0))) then
|
| 329 |
+
real_start <= ap_const_logic_0;
|
| 330 |
+
else
|
| 331 |
+
real_start <= ap_start;
|
| 332 |
+
end if;
|
| 333 |
+
end process;
|
| 334 |
+
|
| 335 |
+
start_out <= real_start;
|
| 336 |
+
|
| 337 |
+
start_write_assign_proc : process(real_start, start_once_reg)
|
| 338 |
+
begin
|
| 339 |
+
if (((real_start = ap_const_logic_1) and (start_once_reg = ap_const_logic_0))) then
|
| 340 |
+
start_write <= ap_const_logic_1;
|
| 341 |
+
else
|
| 342 |
+
start_write <= ap_const_logic_0;
|
| 343 |
+
end if;
|
| 344 |
+
end process;
|
| 345 |
+
|
| 346 |
+
end behav;
|
myproject_prj/solution1/impl/vhdl/myproject_clone_stream_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_32768_s.vhd
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
|
| 7 |
+
library IEEE;
|
| 8 |
+
use IEEE.std_logic_1164.all;
|
| 9 |
+
use IEEE.numeric_std.all;
|
| 10 |
+
|
| 11 |
+
entity myproject_clone_stream_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_32768_s is
|
| 12 |
+
port (
|
| 13 |
+
ap_clk : IN STD_LOGIC;
|
| 14 |
+
ap_rst : IN STD_LOGIC;
|
| 15 |
+
ap_start : IN STD_LOGIC;
|
| 16 |
+
start_full_n : IN STD_LOGIC;
|
| 17 |
+
ap_done : OUT STD_LOGIC;
|
| 18 |
+
ap_continue : IN STD_LOGIC;
|
| 19 |
+
ap_idle : OUT STD_LOGIC;
|
| 20 |
+
ap_ready : OUT STD_LOGIC;
|
| 21 |
+
layer5_out_dout : IN STD_LOGIC_VECTOR (127 downto 0);
|
| 22 |
+
layer5_out_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 23 |
+
layer5_out_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 24 |
+
layer5_out_empty_n : IN STD_LOGIC;
|
| 25 |
+
layer5_out_read : OUT STD_LOGIC;
|
| 26 |
+
layer43_cpy1_din : OUT STD_LOGIC_VECTOR (127 downto 0);
|
| 27 |
+
layer43_cpy1_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 28 |
+
layer43_cpy1_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 29 |
+
layer43_cpy1_full_n : IN STD_LOGIC;
|
| 30 |
+
layer43_cpy1_write : OUT STD_LOGIC;
|
| 31 |
+
layer43_cpy2_din : OUT STD_LOGIC_VECTOR (127 downto 0);
|
| 32 |
+
layer43_cpy2_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 33 |
+
layer43_cpy2_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 34 |
+
layer43_cpy2_full_n : IN STD_LOGIC;
|
| 35 |
+
layer43_cpy2_write : OUT STD_LOGIC;
|
| 36 |
+
start_out : OUT STD_LOGIC;
|
| 37 |
+
start_write : OUT STD_LOGIC );
|
| 38 |
+
end;
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
architecture behav of myproject_clone_stream_array_ap_fixed_8u_array_ap_fixed_16_6_5_3_0_8u_32768_s is
|
| 42 |
+
constant ap_const_logic_1 : STD_LOGIC := '1';
|
| 43 |
+
constant ap_const_logic_0 : STD_LOGIC := '0';
|
| 44 |
+
constant ap_ST_fsm_state1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 45 |
+
constant ap_const_boolean_1 : BOOLEAN := true;
|
| 46 |
+
constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000";
|
| 47 |
+
constant ap_const_boolean_0 : BOOLEAN := false;
|
| 48 |
+
constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 49 |
+
constant ap_const_lv12_0 : STD_LOGIC_VECTOR (11 downto 0) := "000000000000";
|
| 50 |
+
constant ap_const_lv12_1 : STD_LOGIC_VECTOR (11 downto 0) := "000000000001";
|
| 51 |
+
constant ap_const_lv12_FFF : STD_LOGIC_VECTOR (11 downto 0) := "111111111111";
|
| 52 |
+
|
| 53 |
+
attribute shreg_extract : string;
|
| 54 |
+
signal real_start : STD_LOGIC;
|
| 55 |
+
signal start_once_reg : STD_LOGIC := '0';
|
| 56 |
+
signal ap_CS_fsm : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 57 |
+
attribute fsm_encoding : string;
|
| 58 |
+
attribute fsm_encoding of ap_CS_fsm : signal is "none";
|
| 59 |
+
signal ap_CS_fsm_state1 : STD_LOGIC;
|
| 60 |
+
attribute fsm_encoding of ap_CS_fsm_state1 : signal is "none";
|
| 61 |
+
signal internal_ap_ready : STD_LOGIC;
|
| 62 |
+
signal ap_done_reg : STD_LOGIC := '0';
|
| 63 |
+
signal ap_block_state1_pp0_stage0_iter0 : BOOLEAN;
|
| 64 |
+
signal icmp_ln22_fu_78_p2 : STD_LOGIC_VECTOR (0 downto 0);
|
| 65 |
+
signal ap_condition_exit_pp0_iter0_stage0 : STD_LOGIC;
|
| 66 |
+
signal ap_loop_exit_ready : STD_LOGIC;
|
| 67 |
+
signal ap_ready_int : STD_LOGIC;
|
| 68 |
+
signal layer5_out_blk_n : STD_LOGIC;
|
| 69 |
+
signal layer43_cpy1_blk_n : STD_LOGIC;
|
| 70 |
+
signal layer43_cpy2_blk_n : STD_LOGIC;
|
| 71 |
+
signal i_0101_fu_38 : STD_LOGIC_VECTOR (11 downto 0) := "000000000000";
|
| 72 |
+
signal i_fu_72_p2 : STD_LOGIC_VECTOR (11 downto 0);
|
| 73 |
+
signal ap_loop_init : STD_LOGIC;
|
| 74 |
+
signal ap_sig_allocacmp_i_0101_load : STD_LOGIC_VECTOR (11 downto 0);
|
| 75 |
+
signal layer5_out_read_local : STD_LOGIC;
|
| 76 |
+
signal layer43_cpy1_write_local : STD_LOGIC;
|
| 77 |
+
signal layer43_cpy2_write_local : STD_LOGIC;
|
| 78 |
+
signal ap_continue_int : STD_LOGIC;
|
| 79 |
+
signal ap_done_int : STD_LOGIC;
|
| 80 |
+
signal ap_NS_fsm : STD_LOGIC_VECTOR (0 downto 0);
|
| 81 |
+
signal ap_ST_fsm_state1_blk : STD_LOGIC;
|
| 82 |
+
signal ap_start_int : STD_LOGIC;
|
| 83 |
+
signal ap_done_sig : STD_LOGIC;
|
| 84 |
+
signal ap_ce_reg : STD_LOGIC;
|
| 85 |
+
|
| 86 |
+
component myproject_flow_control_loop_pipe IS
|
| 87 |
+
port (
|
| 88 |
+
ap_clk : IN STD_LOGIC;
|
| 89 |
+
ap_rst : IN STD_LOGIC;
|
| 90 |
+
ap_start : IN STD_LOGIC;
|
| 91 |
+
ap_ready : OUT STD_LOGIC;
|
| 92 |
+
ap_done : OUT STD_LOGIC;
|
| 93 |
+
ap_start_int : OUT STD_LOGIC;
|
| 94 |
+
ap_loop_init : OUT STD_LOGIC;
|
| 95 |
+
ap_ready_int : IN STD_LOGIC;
|
| 96 |
+
ap_loop_exit_ready : IN STD_LOGIC;
|
| 97 |
+
ap_loop_exit_done : IN STD_LOGIC;
|
| 98 |
+
ap_continue_int : OUT STD_LOGIC;
|
| 99 |
+
ap_done_int : IN STD_LOGIC;
|
| 100 |
+
ap_continue : IN STD_LOGIC );
|
| 101 |
+
end component;
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
begin
|
| 106 |
+
flow_control_loop_pipe_U : component myproject_flow_control_loop_pipe
|
| 107 |
+
port map (
|
| 108 |
+
ap_clk => ap_clk,
|
| 109 |
+
ap_rst => ap_rst,
|
| 110 |
+
ap_start => real_start,
|
| 111 |
+
ap_ready => internal_ap_ready,
|
| 112 |
+
ap_done => ap_done_sig,
|
| 113 |
+
ap_start_int => ap_start_int,
|
| 114 |
+
ap_loop_init => ap_loop_init,
|
| 115 |
+
ap_ready_int => ap_ready_int,
|
| 116 |
+
ap_loop_exit_ready => ap_condition_exit_pp0_iter0_stage0,
|
| 117 |
+
ap_loop_exit_done => ap_done_int,
|
| 118 |
+
ap_continue_int => ap_continue_int,
|
| 119 |
+
ap_done_int => ap_done_int,
|
| 120 |
+
ap_continue => ap_continue);
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
ap_CS_fsm_assign_proc : process(ap_clk)
|
| 127 |
+
begin
|
| 128 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 129 |
+
if (ap_rst = '1') then
|
| 130 |
+
ap_CS_fsm <= ap_ST_fsm_state1;
|
| 131 |
+
else
|
| 132 |
+
ap_CS_fsm <= ap_NS_fsm;
|
| 133 |
+
end if;
|
| 134 |
+
end if;
|
| 135 |
+
end process;
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
ap_done_reg_assign_proc : process(ap_clk)
|
| 139 |
+
begin
|
| 140 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 141 |
+
if (ap_rst = '1') then
|
| 142 |
+
ap_done_reg <= ap_const_logic_0;
|
| 143 |
+
else
|
| 144 |
+
if ((ap_continue_int = ap_const_logic_1)) then
|
| 145 |
+
ap_done_reg <= ap_const_logic_0;
|
| 146 |
+
elsif (((ap_loop_exit_ready = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 147 |
+
ap_done_reg <= ap_const_logic_1;
|
| 148 |
+
end if;
|
| 149 |
+
end if;
|
| 150 |
+
end if;
|
| 151 |
+
end process;
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
start_once_reg_assign_proc : process(ap_clk)
|
| 155 |
+
begin
|
| 156 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 157 |
+
if (ap_rst = '1') then
|
| 158 |
+
start_once_reg <= ap_const_logic_0;
|
| 159 |
+
else
|
| 160 |
+
if (((real_start = ap_const_logic_1) and (internal_ap_ready = ap_const_logic_0))) then
|
| 161 |
+
start_once_reg <= ap_const_logic_1;
|
| 162 |
+
elsif ((internal_ap_ready = ap_const_logic_1)) then
|
| 163 |
+
start_once_reg <= ap_const_logic_0;
|
| 164 |
+
end if;
|
| 165 |
+
end if;
|
| 166 |
+
end if;
|
| 167 |
+
end process;
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
i_0101_fu_38_assign_proc : process (ap_clk)
|
| 171 |
+
begin
|
| 172 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 173 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 174 |
+
i_0101_fu_38 <= i_fu_72_p2;
|
| 175 |
+
end if;
|
| 176 |
+
end if;
|
| 177 |
+
end process;
|
| 178 |
+
|
| 179 |
+
ap_NS_fsm_assign_proc : process (ap_CS_fsm, ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 180 |
+
begin
|
| 181 |
+
case ap_CS_fsm is
|
| 182 |
+
when ap_ST_fsm_state1 =>
|
| 183 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 184 |
+
when others =>
|
| 185 |
+
ap_NS_fsm <= "X";
|
| 186 |
+
end case;
|
| 187 |
+
end process;
|
| 188 |
+
ap_CS_fsm_state1 <= ap_CS_fsm(0);
|
| 189 |
+
|
| 190 |
+
ap_ST_fsm_state1_blk_assign_proc : process(ap_block_state1_pp0_stage0_iter0)
|
| 191 |
+
begin
|
| 192 |
+
if ((ap_const_boolean_1 = ap_block_state1_pp0_stage0_iter0)) then
|
| 193 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_1;
|
| 194 |
+
else
|
| 195 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_0;
|
| 196 |
+
end if;
|
| 197 |
+
end process;
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
ap_block_state1_pp0_stage0_iter0_assign_proc : process(layer5_out_empty_n, layer43_cpy1_full_n, layer43_cpy2_full_n, ap_done_reg, ap_start_int)
|
| 201 |
+
begin
|
| 202 |
+
ap_block_state1_pp0_stage0_iter0 <= ((ap_done_reg = ap_const_logic_1) or (layer43_cpy2_full_n = ap_const_logic_0) or (layer43_cpy1_full_n = ap_const_logic_0) or (layer5_out_empty_n = ap_const_logic_0) or (ap_start_int = ap_const_logic_0));
|
| 203 |
+
end process;
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
ap_condition_exit_pp0_iter0_stage0_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0, icmp_ln22_fu_78_p2)
|
| 207 |
+
begin
|
| 208 |
+
if (((icmp_ln22_fu_78_p2 = ap_const_lv1_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 209 |
+
ap_condition_exit_pp0_iter0_stage0 <= ap_const_logic_1;
|
| 210 |
+
else
|
| 211 |
+
ap_condition_exit_pp0_iter0_stage0 <= ap_const_logic_0;
|
| 212 |
+
end if;
|
| 213 |
+
end process;
|
| 214 |
+
|
| 215 |
+
ap_done <= ap_done_sig;
|
| 216 |
+
|
| 217 |
+
ap_done_int_assign_proc : process(ap_CS_fsm_state1, ap_done_reg, ap_block_state1_pp0_stage0_iter0, ap_loop_exit_ready)
|
| 218 |
+
begin
|
| 219 |
+
if (((ap_loop_exit_ready = ap_const_logic_1) and (ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 220 |
+
ap_done_int <= ap_const_logic_1;
|
| 221 |
+
else
|
| 222 |
+
ap_done_int <= ap_done_reg;
|
| 223 |
+
end if;
|
| 224 |
+
end process;
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
ap_idle_assign_proc : process(ap_CS_fsm_state1, ap_start_int)
|
| 228 |
+
begin
|
| 229 |
+
if (((ap_const_logic_1 = ap_CS_fsm_state1) and (ap_start_int = ap_const_logic_0))) then
|
| 230 |
+
ap_idle <= ap_const_logic_1;
|
| 231 |
+
else
|
| 232 |
+
ap_idle <= ap_const_logic_0;
|
| 233 |
+
end if;
|
| 234 |
+
end process;
|
| 235 |
+
|
| 236 |
+
ap_loop_exit_ready <= ap_condition_exit_pp0_iter0_stage0;
|
| 237 |
+
ap_ready <= internal_ap_ready;
|
| 238 |
+
|
| 239 |
+
ap_ready_int_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 240 |
+
begin
|
| 241 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 242 |
+
ap_ready_int <= ap_const_logic_1;
|
| 243 |
+
else
|
| 244 |
+
ap_ready_int <= ap_const_logic_0;
|
| 245 |
+
end if;
|
| 246 |
+
end process;
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
ap_sig_allocacmp_i_0101_load_assign_proc : process(ap_CS_fsm_state1, i_0101_fu_38, ap_loop_init)
|
| 250 |
+
begin
|
| 251 |
+
if (((ap_loop_init = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 252 |
+
ap_sig_allocacmp_i_0101_load <= ap_const_lv12_0;
|
| 253 |
+
else
|
| 254 |
+
ap_sig_allocacmp_i_0101_load <= i_0101_fu_38;
|
| 255 |
+
end if;
|
| 256 |
+
end process;
|
| 257 |
+
|
| 258 |
+
i_fu_72_p2 <= std_logic_vector(unsigned(ap_sig_allocacmp_i_0101_load) + unsigned(ap_const_lv12_1));
|
| 259 |
+
icmp_ln22_fu_78_p2 <= "1" when (ap_sig_allocacmp_i_0101_load = ap_const_lv12_FFF) else "0";
|
| 260 |
+
|
| 261 |
+
layer43_cpy1_blk_n_assign_proc : process(ap_CS_fsm_state1, layer43_cpy1_full_n, ap_done_reg, ap_start_int)
|
| 262 |
+
begin
|
| 263 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 264 |
+
layer43_cpy1_blk_n <= layer43_cpy1_full_n;
|
| 265 |
+
else
|
| 266 |
+
layer43_cpy1_blk_n <= ap_const_logic_1;
|
| 267 |
+
end if;
|
| 268 |
+
end process;
|
| 269 |
+
|
| 270 |
+
layer43_cpy1_din <= layer5_out_dout;
|
| 271 |
+
layer43_cpy1_write <= layer43_cpy1_write_local;
|
| 272 |
+
|
| 273 |
+
layer43_cpy1_write_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 274 |
+
begin
|
| 275 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 276 |
+
layer43_cpy1_write_local <= ap_const_logic_1;
|
| 277 |
+
else
|
| 278 |
+
layer43_cpy1_write_local <= ap_const_logic_0;
|
| 279 |
+
end if;
|
| 280 |
+
end process;
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
layer43_cpy2_blk_n_assign_proc : process(ap_CS_fsm_state1, layer43_cpy2_full_n, ap_done_reg, ap_start_int)
|
| 284 |
+
begin
|
| 285 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 286 |
+
layer43_cpy2_blk_n <= layer43_cpy2_full_n;
|
| 287 |
+
else
|
| 288 |
+
layer43_cpy2_blk_n <= ap_const_logic_1;
|
| 289 |
+
end if;
|
| 290 |
+
end process;
|
| 291 |
+
|
| 292 |
+
layer43_cpy2_din <= layer5_out_dout;
|
| 293 |
+
layer43_cpy2_write <= layer43_cpy2_write_local;
|
| 294 |
+
|
| 295 |
+
layer43_cpy2_write_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 296 |
+
begin
|
| 297 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 298 |
+
layer43_cpy2_write_local <= ap_const_logic_1;
|
| 299 |
+
else
|
| 300 |
+
layer43_cpy2_write_local <= ap_const_logic_0;
|
| 301 |
+
end if;
|
| 302 |
+
end process;
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
layer5_out_blk_n_assign_proc : process(ap_CS_fsm_state1, layer5_out_empty_n, ap_done_reg, ap_start_int)
|
| 306 |
+
begin
|
| 307 |
+
if ((not(((ap_done_reg = ap_const_logic_1) or (ap_start_int = ap_const_logic_0))) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 308 |
+
layer5_out_blk_n <= layer5_out_empty_n;
|
| 309 |
+
else
|
| 310 |
+
layer5_out_blk_n <= ap_const_logic_1;
|
| 311 |
+
end if;
|
| 312 |
+
end process;
|
| 313 |
+
|
| 314 |
+
layer5_out_read <= layer5_out_read_local;
|
| 315 |
+
|
| 316 |
+
layer5_out_read_local_assign_proc : process(ap_CS_fsm_state1, ap_block_state1_pp0_stage0_iter0)
|
| 317 |
+
begin
|
| 318 |
+
if (((ap_const_boolean_0 = ap_block_state1_pp0_stage0_iter0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 319 |
+
layer5_out_read_local <= ap_const_logic_1;
|
| 320 |
+
else
|
| 321 |
+
layer5_out_read_local <= ap_const_logic_0;
|
| 322 |
+
end if;
|
| 323 |
+
end process;
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
real_start_assign_proc : process(ap_start, start_full_n, start_once_reg)
|
| 327 |
+
begin
|
| 328 |
+
if (((start_full_n = ap_const_logic_0) and (start_once_reg = ap_const_logic_0))) then
|
| 329 |
+
real_start <= ap_const_logic_0;
|
| 330 |
+
else
|
| 331 |
+
real_start <= ap_start;
|
| 332 |
+
end if;
|
| 333 |
+
end process;
|
| 334 |
+
|
| 335 |
+
start_out <= real_start;
|
| 336 |
+
|
| 337 |
+
start_write_assign_proc : process(real_start, start_once_reg)
|
| 338 |
+
begin
|
| 339 |
+
if (((real_start = ap_const_logic_1) and (start_once_reg = ap_const_logic_0))) then
|
| 340 |
+
start_write <= ap_const_logic_1;
|
| 341 |
+
else
|
| 342 |
+
start_write <= ap_const_logic_0;
|
| 343 |
+
end if;
|
| 344 |
+
end process;
|
| 345 |
+
|
| 346 |
+
end behav;
|
myproject_prj/solution1/impl/vhdl/myproject_compute_output_buffer_2d_array_array_ap_fixed_42_22_5_3_0_16u_config29_s.vhd
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
myproject_prj/solution1/impl/vhdl/myproject_compute_output_buffer_2d_array_array_ap_fixed_42_22_5_3_0_32u_config14_s.vhd
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
myproject_prj/solution1/impl/vhdl/myproject_concatenate3d_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s.vhd
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
|
| 7 |
+
library IEEE;
|
| 8 |
+
use IEEE.std_logic_1164.all;
|
| 9 |
+
use IEEE.numeric_std.all;
|
| 10 |
+
|
| 11 |
+
entity myproject_concatenate3d_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s is
|
| 12 |
+
port (
|
| 13 |
+
ap_clk : IN STD_LOGIC;
|
| 14 |
+
ap_rst : IN STD_LOGIC;
|
| 15 |
+
ap_start : IN STD_LOGIC;
|
| 16 |
+
start_full_n : IN STD_LOGIC;
|
| 17 |
+
ap_done : OUT STD_LOGIC;
|
| 18 |
+
ap_continue : IN STD_LOGIC;
|
| 19 |
+
ap_idle : OUT STD_LOGIC;
|
| 20 |
+
ap_ready : OUT STD_LOGIC;
|
| 21 |
+
start_out : OUT STD_LOGIC;
|
| 22 |
+
start_write : OUT STD_LOGIC;
|
| 23 |
+
layer33_out_dout : IN STD_LOGIC_VECTOR (255 downto 0);
|
| 24 |
+
layer33_out_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 25 |
+
layer33_out_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 26 |
+
layer33_out_empty_n : IN STD_LOGIC;
|
| 27 |
+
layer33_out_read : OUT STD_LOGIC;
|
| 28 |
+
layer43_cpy2_dout : IN STD_LOGIC_VECTOR (127 downto 0);
|
| 29 |
+
layer43_cpy2_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 30 |
+
layer43_cpy2_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 31 |
+
layer43_cpy2_empty_n : IN STD_LOGIC;
|
| 32 |
+
layer43_cpy2_read : OUT STD_LOGIC;
|
| 33 |
+
layer34_out_din : OUT STD_LOGIC_VECTOR (383 downto 0);
|
| 34 |
+
layer34_out_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 35 |
+
layer34_out_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 36 |
+
layer34_out_full_n : IN STD_LOGIC;
|
| 37 |
+
layer34_out_write : OUT STD_LOGIC );
|
| 38 |
+
end;
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
architecture behav of myproject_concatenate3d_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s is
|
| 42 |
+
constant ap_const_logic_1 : STD_LOGIC := '1';
|
| 43 |
+
constant ap_const_logic_0 : STD_LOGIC := '0';
|
| 44 |
+
constant ap_ST_fsm_state1 : STD_LOGIC_VECTOR (1 downto 0) := "01";
|
| 45 |
+
constant ap_ST_fsm_state2 : STD_LOGIC_VECTOR (1 downto 0) := "10";
|
| 46 |
+
constant ap_const_boolean_1 : BOOLEAN := true;
|
| 47 |
+
constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000";
|
| 48 |
+
constant ap_const_boolean_0 : BOOLEAN := false;
|
| 49 |
+
constant ap_const_lv32_1 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000001";
|
| 50 |
+
constant ap_const_lv13_0 : STD_LOGIC_VECTOR (12 downto 0) := "0000000000000";
|
| 51 |
+
|
| 52 |
+
attribute shreg_extract : string;
|
| 53 |
+
signal real_start : STD_LOGIC;
|
| 54 |
+
signal start_once_reg : STD_LOGIC := '0';
|
| 55 |
+
signal ap_done_reg : STD_LOGIC := '0';
|
| 56 |
+
signal ap_CS_fsm : STD_LOGIC_VECTOR (1 downto 0) := "01";
|
| 57 |
+
attribute fsm_encoding : string;
|
| 58 |
+
attribute fsm_encoding of ap_CS_fsm : signal is "none";
|
| 59 |
+
signal ap_CS_fsm_state1 : STD_LOGIC;
|
| 60 |
+
attribute fsm_encoding of ap_CS_fsm_state1 : signal is "none";
|
| 61 |
+
signal internal_ap_ready : STD_LOGIC;
|
| 62 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start : STD_LOGIC;
|
| 63 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done : STD_LOGIC;
|
| 64 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_idle : STD_LOGIC;
|
| 65 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_ready : STD_LOGIC;
|
| 66 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer33_out_read : STD_LOGIC;
|
| 67 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer43_cpy2_read : STD_LOGIC;
|
| 68 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer34_out_din : STD_LOGIC_VECTOR (383 downto 0);
|
| 69 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer34_out_write : STD_LOGIC;
|
| 70 |
+
signal grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start_reg : STD_LOGIC := '0';
|
| 71 |
+
signal ap_block_state1_ignore_call3 : BOOLEAN;
|
| 72 |
+
signal ap_CS_fsm_state2 : STD_LOGIC;
|
| 73 |
+
attribute fsm_encoding of ap_CS_fsm_state2 : signal is "none";
|
| 74 |
+
signal ap_NS_fsm : STD_LOGIC_VECTOR (1 downto 0);
|
| 75 |
+
signal ap_block_state1 : BOOLEAN;
|
| 76 |
+
signal ap_ST_fsm_state1_blk : STD_LOGIC;
|
| 77 |
+
signal ap_ST_fsm_state2_blk : STD_LOGIC;
|
| 78 |
+
signal ap_ce_reg : STD_LOGIC;
|
| 79 |
+
|
| 80 |
+
component myproject_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s IS
|
| 81 |
+
port (
|
| 82 |
+
ap_clk : IN STD_LOGIC;
|
| 83 |
+
ap_rst : IN STD_LOGIC;
|
| 84 |
+
ap_start : IN STD_LOGIC;
|
| 85 |
+
ap_done : OUT STD_LOGIC;
|
| 86 |
+
ap_idle : OUT STD_LOGIC;
|
| 87 |
+
ap_ready : OUT STD_LOGIC;
|
| 88 |
+
layer33_out_dout : IN STD_LOGIC_VECTOR (255 downto 0);
|
| 89 |
+
layer33_out_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 90 |
+
layer33_out_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 91 |
+
layer33_out_empty_n : IN STD_LOGIC;
|
| 92 |
+
layer33_out_read : OUT STD_LOGIC;
|
| 93 |
+
layer43_cpy2_dout : IN STD_LOGIC_VECTOR (127 downto 0);
|
| 94 |
+
layer43_cpy2_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 95 |
+
layer43_cpy2_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 96 |
+
layer43_cpy2_empty_n : IN STD_LOGIC;
|
| 97 |
+
layer43_cpy2_read : OUT STD_LOGIC;
|
| 98 |
+
layer34_out_din : OUT STD_LOGIC_VECTOR (383 downto 0);
|
| 99 |
+
layer34_out_num_data_valid : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 100 |
+
layer34_out_fifo_cap : IN STD_LOGIC_VECTOR (12 downto 0);
|
| 101 |
+
layer34_out_full_n : IN STD_LOGIC;
|
| 102 |
+
layer34_out_write : OUT STD_LOGIC );
|
| 103 |
+
end component;
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
begin
|
| 108 |
+
grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18 : component myproject_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s
|
| 109 |
+
port map (
|
| 110 |
+
ap_clk => ap_clk,
|
| 111 |
+
ap_rst => ap_rst,
|
| 112 |
+
ap_start => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start,
|
| 113 |
+
ap_done => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done,
|
| 114 |
+
ap_idle => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_idle,
|
| 115 |
+
ap_ready => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_ready,
|
| 116 |
+
layer33_out_dout => layer33_out_dout,
|
| 117 |
+
layer33_out_num_data_valid => ap_const_lv13_0,
|
| 118 |
+
layer33_out_fifo_cap => ap_const_lv13_0,
|
| 119 |
+
layer33_out_empty_n => layer33_out_empty_n,
|
| 120 |
+
layer33_out_read => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer33_out_read,
|
| 121 |
+
layer43_cpy2_dout => layer43_cpy2_dout,
|
| 122 |
+
layer43_cpy2_num_data_valid => ap_const_lv13_0,
|
| 123 |
+
layer43_cpy2_fifo_cap => ap_const_lv13_0,
|
| 124 |
+
layer43_cpy2_empty_n => layer43_cpy2_empty_n,
|
| 125 |
+
layer43_cpy2_read => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer43_cpy2_read,
|
| 126 |
+
layer34_out_din => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer34_out_din,
|
| 127 |
+
layer34_out_num_data_valid => ap_const_lv13_0,
|
| 128 |
+
layer34_out_fifo_cap => ap_const_lv13_0,
|
| 129 |
+
layer34_out_full_n => layer34_out_full_n,
|
| 130 |
+
layer34_out_write => grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer34_out_write);
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
ap_CS_fsm_assign_proc : process(ap_clk)
|
| 137 |
+
begin
|
| 138 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 139 |
+
if (ap_rst = '1') then
|
| 140 |
+
ap_CS_fsm <= ap_ST_fsm_state1;
|
| 141 |
+
else
|
| 142 |
+
ap_CS_fsm <= ap_NS_fsm;
|
| 143 |
+
end if;
|
| 144 |
+
end if;
|
| 145 |
+
end process;
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
ap_done_reg_assign_proc : process(ap_clk)
|
| 149 |
+
begin
|
| 150 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 151 |
+
if (ap_rst = '1') then
|
| 152 |
+
ap_done_reg <= ap_const_logic_0;
|
| 153 |
+
else
|
| 154 |
+
if ((ap_continue = ap_const_logic_1)) then
|
| 155 |
+
ap_done_reg <= ap_const_logic_0;
|
| 156 |
+
elsif (((grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 157 |
+
ap_done_reg <= ap_const_logic_1;
|
| 158 |
+
end if;
|
| 159 |
+
end if;
|
| 160 |
+
end if;
|
| 161 |
+
end process;
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start_reg_assign_proc : process(ap_clk)
|
| 165 |
+
begin
|
| 166 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 167 |
+
if (ap_rst = '1') then
|
| 168 |
+
grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start_reg <= ap_const_logic_0;
|
| 169 |
+
else
|
| 170 |
+
if (((ap_const_boolean_0 = ap_block_state1_ignore_call3) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 171 |
+
grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start_reg <= ap_const_logic_1;
|
| 172 |
+
elsif ((grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_ready = ap_const_logic_1)) then
|
| 173 |
+
grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start_reg <= ap_const_logic_0;
|
| 174 |
+
end if;
|
| 175 |
+
end if;
|
| 176 |
+
end if;
|
| 177 |
+
end process;
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
start_once_reg_assign_proc : process(ap_clk)
|
| 181 |
+
begin
|
| 182 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 183 |
+
if (ap_rst = '1') then
|
| 184 |
+
start_once_reg <= ap_const_logic_0;
|
| 185 |
+
else
|
| 186 |
+
if (((real_start = ap_const_logic_1) and (internal_ap_ready = ap_const_logic_0))) then
|
| 187 |
+
start_once_reg <= ap_const_logic_1;
|
| 188 |
+
elsif ((internal_ap_ready = ap_const_logic_1)) then
|
| 189 |
+
start_once_reg <= ap_const_logic_0;
|
| 190 |
+
end if;
|
| 191 |
+
end if;
|
| 192 |
+
end if;
|
| 193 |
+
end process;
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
ap_NS_fsm_assign_proc : process (ap_CS_fsm, ap_CS_fsm_state1, grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done, ap_CS_fsm_state2, ap_block_state1)
|
| 197 |
+
begin
|
| 198 |
+
case ap_CS_fsm is
|
| 199 |
+
when ap_ST_fsm_state1 =>
|
| 200 |
+
if (((ap_const_boolean_0 = ap_block_state1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 201 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 202 |
+
else
|
| 203 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 204 |
+
end if;
|
| 205 |
+
when ap_ST_fsm_state2 =>
|
| 206 |
+
if (((grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 207 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 208 |
+
else
|
| 209 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 210 |
+
end if;
|
| 211 |
+
when others =>
|
| 212 |
+
ap_NS_fsm <= "XX";
|
| 213 |
+
end case;
|
| 214 |
+
end process;
|
| 215 |
+
ap_CS_fsm_state1 <= ap_CS_fsm(0);
|
| 216 |
+
ap_CS_fsm_state2 <= ap_CS_fsm(1);
|
| 217 |
+
|
| 218 |
+
ap_ST_fsm_state1_blk_assign_proc : process(ap_block_state1)
|
| 219 |
+
begin
|
| 220 |
+
if ((ap_const_boolean_1 = ap_block_state1)) then
|
| 221 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_1;
|
| 222 |
+
else
|
| 223 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_0;
|
| 224 |
+
end if;
|
| 225 |
+
end process;
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
ap_ST_fsm_state2_blk_assign_proc : process(grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done)
|
| 229 |
+
begin
|
| 230 |
+
if ((grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done = ap_const_logic_0)) then
|
| 231 |
+
ap_ST_fsm_state2_blk <= ap_const_logic_1;
|
| 232 |
+
else
|
| 233 |
+
ap_ST_fsm_state2_blk <= ap_const_logic_0;
|
| 234 |
+
end if;
|
| 235 |
+
end process;
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
ap_block_state1_assign_proc : process(real_start, ap_done_reg)
|
| 239 |
+
begin
|
| 240 |
+
ap_block_state1 <= ((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1));
|
| 241 |
+
end process;
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
ap_block_state1_ignore_call3_assign_proc : process(real_start, ap_done_reg)
|
| 245 |
+
begin
|
| 246 |
+
ap_block_state1_ignore_call3 <= ((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1));
|
| 247 |
+
end process;
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
ap_done_assign_proc : process(ap_done_reg, grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done, ap_CS_fsm_state2)
|
| 251 |
+
begin
|
| 252 |
+
if (((grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 253 |
+
ap_done <= ap_const_logic_1;
|
| 254 |
+
else
|
| 255 |
+
ap_done <= ap_done_reg;
|
| 256 |
+
end if;
|
| 257 |
+
end process;
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
ap_idle_assign_proc : process(real_start, ap_CS_fsm_state1)
|
| 261 |
+
begin
|
| 262 |
+
if (((real_start = ap_const_logic_0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 263 |
+
ap_idle <= ap_const_logic_1;
|
| 264 |
+
else
|
| 265 |
+
ap_idle <= ap_const_logic_0;
|
| 266 |
+
end if;
|
| 267 |
+
end process;
|
| 268 |
+
|
| 269 |
+
ap_ready <= internal_ap_ready;
|
| 270 |
+
grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start <= grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_start_reg;
|
| 271 |
+
|
| 272 |
+
internal_ap_ready_assign_proc : process(grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done, ap_CS_fsm_state2)
|
| 273 |
+
begin
|
| 274 |
+
if (((grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_ap_done = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 275 |
+
internal_ap_ready <= ap_const_logic_1;
|
| 276 |
+
else
|
| 277 |
+
internal_ap_ready <= ap_const_logic_0;
|
| 278 |
+
end if;
|
| 279 |
+
end process;
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
layer33_out_read_assign_proc : process(grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer33_out_read, ap_CS_fsm_state2)
|
| 283 |
+
begin
|
| 284 |
+
if ((ap_const_logic_1 = ap_CS_fsm_state2)) then
|
| 285 |
+
layer33_out_read <= grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer33_out_read;
|
| 286 |
+
else
|
| 287 |
+
layer33_out_read <= ap_const_logic_0;
|
| 288 |
+
end if;
|
| 289 |
+
end process;
|
| 290 |
+
|
| 291 |
+
layer34_out_din <= grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer34_out_din;
|
| 292 |
+
|
| 293 |
+
layer34_out_write_assign_proc : process(grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer34_out_write, ap_CS_fsm_state2)
|
| 294 |
+
begin
|
| 295 |
+
if ((ap_const_logic_1 = ap_CS_fsm_state2)) then
|
| 296 |
+
layer34_out_write <= grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer34_out_write;
|
| 297 |
+
else
|
| 298 |
+
layer34_out_write <= ap_const_logic_0;
|
| 299 |
+
end if;
|
| 300 |
+
end process;
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
layer43_cpy2_read_assign_proc : process(grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer43_cpy2_read, ap_CS_fsm_state2)
|
| 304 |
+
begin
|
| 305 |
+
if ((ap_const_logic_1 = ap_CS_fsm_state2)) then
|
| 306 |
+
layer43_cpy2_read <= grp_concatenate3d_2_array_array_array_ap_fixed_16_6_5_3_0_24u_config34_s_fu_18_layer43_cpy2_read;
|
| 307 |
+
else
|
| 308 |
+
layer43_cpy2_read <= ap_const_logic_0;
|
| 309 |
+
end if;
|
| 310 |
+
end process;
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
real_start_assign_proc : process(ap_start, start_full_n, start_once_reg)
|
| 314 |
+
begin
|
| 315 |
+
if (((start_full_n = ap_const_logic_0) and (start_once_reg = ap_const_logic_0))) then
|
| 316 |
+
real_start <= ap_const_logic_0;
|
| 317 |
+
else
|
| 318 |
+
real_start <= ap_start;
|
| 319 |
+
end if;
|
| 320 |
+
end process;
|
| 321 |
+
|
| 322 |
+
start_out <= real_start;
|
| 323 |
+
|
| 324 |
+
start_write_assign_proc : process(real_start, start_once_reg)
|
| 325 |
+
begin
|
| 326 |
+
if (((real_start = ap_const_logic_1) and (start_once_reg = ap_const_logic_0))) then
|
| 327 |
+
start_write <= ap_const_logic_1;
|
| 328 |
+
else
|
| 329 |
+
start_write <= ap_const_logic_0;
|
| 330 |
+
end if;
|
| 331 |
+
end process;
|
| 332 |
+
|
| 333 |
+
end behav;
|
myproject_prj/solution1/impl/vhdl/myproject_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7_s.vhd
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
|
| 7 |
+
library IEEE;
|
| 8 |
+
use IEEE.std_logic_1164.all;
|
| 9 |
+
use IEEE.numeric_std.all;
|
| 10 |
+
|
| 11 |
+
entity myproject_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7_s is
|
| 12 |
+
port (
|
| 13 |
+
ap_clk : IN STD_LOGIC;
|
| 14 |
+
ap_rst : IN STD_LOGIC;
|
| 15 |
+
ap_start : IN STD_LOGIC;
|
| 16 |
+
start_full_n : IN STD_LOGIC;
|
| 17 |
+
ap_done : OUT STD_LOGIC;
|
| 18 |
+
ap_continue : IN STD_LOGIC;
|
| 19 |
+
ap_idle : OUT STD_LOGIC;
|
| 20 |
+
ap_ready : OUT STD_LOGIC;
|
| 21 |
+
start_out : OUT STD_LOGIC;
|
| 22 |
+
start_write : OUT STD_LOGIC;
|
| 23 |
+
layer48_out_dout : IN STD_LOGIC_VECTOR (127 downto 0);
|
| 24 |
+
layer48_out_num_data_valid : IN STD_LOGIC_VECTOR (11 downto 0);
|
| 25 |
+
layer48_out_fifo_cap : IN STD_LOGIC_VECTOR (11 downto 0);
|
| 26 |
+
layer48_out_empty_n : IN STD_LOGIC;
|
| 27 |
+
layer48_out_read : OUT STD_LOGIC;
|
| 28 |
+
layer7_out_din : OUT STD_LOGIC_VECTOR (639 downto 0);
|
| 29 |
+
layer7_out_num_data_valid : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 30 |
+
layer7_out_fifo_cap : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 31 |
+
layer7_out_full_n : IN STD_LOGIC;
|
| 32 |
+
layer7_out_write : OUT STD_LOGIC );
|
| 33 |
+
end;
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
architecture behav of myproject_conv_2d_cl_array_ap_fixed_8u_array_ap_fixed_40_20_5_3_0_16u_config7_s is
|
| 37 |
+
constant ap_const_logic_1 : STD_LOGIC := '1';
|
| 38 |
+
constant ap_const_logic_0 : STD_LOGIC := '0';
|
| 39 |
+
constant ap_ST_fsm_state1 : STD_LOGIC_VECTOR (2 downto 0) := "001";
|
| 40 |
+
constant ap_ST_fsm_state2 : STD_LOGIC_VECTOR (2 downto 0) := "010";
|
| 41 |
+
constant ap_ST_fsm_state3 : STD_LOGIC_VECTOR (2 downto 0) := "100";
|
| 42 |
+
constant ap_const_boolean_1 : BOOLEAN := true;
|
| 43 |
+
constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000";
|
| 44 |
+
constant ap_const_lv32_1 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000001";
|
| 45 |
+
constant ap_const_lv1_0 : STD_LOGIC_VECTOR (0 downto 0) := "0";
|
| 46 |
+
constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 47 |
+
constant ap_const_boolean_0 : BOOLEAN := false;
|
| 48 |
+
constant ap_const_lv32_2 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000010";
|
| 49 |
+
constant ap_const_lv11_0 : STD_LOGIC_VECTOR (10 downto 0) := "00000000000";
|
| 50 |
+
constant ap_const_lv11_484 : STD_LOGIC_VECTOR (10 downto 0) := "10010000100";
|
| 51 |
+
constant ap_const_lv11_1 : STD_LOGIC_VECTOR (10 downto 0) := "00000000001";
|
| 52 |
+
constant ap_const_lv32_10 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000010000";
|
| 53 |
+
constant ap_const_lv32_1F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000011111";
|
| 54 |
+
constant ap_const_lv32_20 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000100000";
|
| 55 |
+
constant ap_const_lv32_2F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000101111";
|
| 56 |
+
constant ap_const_lv32_30 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000110000";
|
| 57 |
+
constant ap_const_lv32_3F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000111111";
|
| 58 |
+
constant ap_const_lv32_40 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001000000";
|
| 59 |
+
constant ap_const_lv32_4F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001001111";
|
| 60 |
+
constant ap_const_lv32_50 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001010000";
|
| 61 |
+
constant ap_const_lv32_5F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001011111";
|
| 62 |
+
constant ap_const_lv32_60 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001100000";
|
| 63 |
+
constant ap_const_lv32_6F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001101111";
|
| 64 |
+
constant ap_const_lv32_70 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001110000";
|
| 65 |
+
constant ap_const_lv32_7F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001111111";
|
| 66 |
+
|
| 67 |
+
attribute shreg_extract : string;
|
| 68 |
+
signal real_start : STD_LOGIC;
|
| 69 |
+
signal start_once_reg : STD_LOGIC := '0';
|
| 70 |
+
signal ap_done_reg : STD_LOGIC := '0';
|
| 71 |
+
signal ap_CS_fsm : STD_LOGIC_VECTOR (2 downto 0) := "001";
|
| 72 |
+
attribute fsm_encoding : string;
|
| 73 |
+
attribute fsm_encoding of ap_CS_fsm : signal is "none";
|
| 74 |
+
signal ap_CS_fsm_state1 : STD_LOGIC;
|
| 75 |
+
attribute fsm_encoding of ap_CS_fsm_state1 : signal is "none";
|
| 76 |
+
signal internal_ap_ready : STD_LOGIC;
|
| 77 |
+
signal layer48_out_blk_n : STD_LOGIC;
|
| 78 |
+
signal ap_CS_fsm_state2 : STD_LOGIC;
|
| 79 |
+
attribute fsm_encoding of ap_CS_fsm_state2 : signal is "none";
|
| 80 |
+
signal icmp_ln52_fu_468_p2 : STD_LOGIC_VECTOR (0 downto 0);
|
| 81 |
+
signal trunc_ln58_fu_480_p1 : STD_LOGIC_VECTOR (15 downto 0);
|
| 82 |
+
signal trunc_ln58_reg_577 : STD_LOGIC_VECTOR (15 downto 0);
|
| 83 |
+
signal ap_block_state2 : BOOLEAN;
|
| 84 |
+
signal trunc_ln58_s_reg_582 : STD_LOGIC_VECTOR (15 downto 0);
|
| 85 |
+
signal trunc_ln58_4_reg_587 : STD_LOGIC_VECTOR (15 downto 0);
|
| 86 |
+
signal trunc_ln58_5_reg_592 : STD_LOGIC_VECTOR (15 downto 0);
|
| 87 |
+
signal trunc_ln58_6_reg_597 : STD_LOGIC_VECTOR (15 downto 0);
|
| 88 |
+
signal trunc_ln58_7_reg_602 : STD_LOGIC_VECTOR (15 downto 0);
|
| 89 |
+
signal trunc_ln58_8_reg_607 : STD_LOGIC_VECTOR (15 downto 0);
|
| 90 |
+
signal trunc_ln58_9_reg_612 : STD_LOGIC_VECTOR (15 downto 0);
|
| 91 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start : STD_LOGIC;
|
| 92 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_done : STD_LOGIC;
|
| 93 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_idle : STD_LOGIC;
|
| 94 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_ready : STD_LOGIC;
|
| 95 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_layer7_out_din : STD_LOGIC_VECTOR (639 downto 0);
|
| 96 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_layer7_out_write : STD_LOGIC;
|
| 97 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start_reg : STD_LOGIC := '0';
|
| 98 |
+
signal ap_block_state2_ignore_call11 : BOOLEAN;
|
| 99 |
+
signal ap_CS_fsm_state3 : STD_LOGIC;
|
| 100 |
+
attribute fsm_encoding of ap_CS_fsm_state3 : signal is "none";
|
| 101 |
+
signal indvar_flatten_fu_250 : STD_LOGIC_VECTOR (10 downto 0) := "00000000000";
|
| 102 |
+
signal add_ln52_fu_474_p2 : STD_LOGIC_VECTOR (10 downto 0);
|
| 103 |
+
signal ap_block_state1 : BOOLEAN;
|
| 104 |
+
signal layer48_out_read_local : STD_LOGIC;
|
| 105 |
+
signal ap_NS_fsm : STD_LOGIC_VECTOR (2 downto 0);
|
| 106 |
+
signal ap_ST_fsm_state1_blk : STD_LOGIC;
|
| 107 |
+
signal ap_ST_fsm_state2_blk : STD_LOGIC;
|
| 108 |
+
signal ap_ST_fsm_state3_blk : STD_LOGIC;
|
| 109 |
+
signal ap_ce_reg : STD_LOGIC;
|
| 110 |
+
|
| 111 |
+
component myproject_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s IS
|
| 112 |
+
port (
|
| 113 |
+
ap_clk : IN STD_LOGIC;
|
| 114 |
+
ap_rst : IN STD_LOGIC;
|
| 115 |
+
ap_start : IN STD_LOGIC;
|
| 116 |
+
ap_done : OUT STD_LOGIC;
|
| 117 |
+
ap_idle : OUT STD_LOGIC;
|
| 118 |
+
ap_ready : OUT STD_LOGIC;
|
| 119 |
+
p_read : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 120 |
+
p_read1 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 121 |
+
p_read2 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 122 |
+
p_read3 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 123 |
+
p_read4 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 124 |
+
p_read5 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 125 |
+
p_read6 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 126 |
+
p_read7 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 127 |
+
layer7_out_din : OUT STD_LOGIC_VECTOR (639 downto 0);
|
| 128 |
+
layer7_out_num_data_valid : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 129 |
+
layer7_out_fifo_cap : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 130 |
+
layer7_out_full_n : IN STD_LOGIC;
|
| 131 |
+
layer7_out_write : OUT STD_LOGIC );
|
| 132 |
+
end component;
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
begin
|
| 137 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260 : component myproject_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s
|
| 138 |
+
port map (
|
| 139 |
+
ap_clk => ap_clk,
|
| 140 |
+
ap_rst => ap_rst,
|
| 141 |
+
ap_start => grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start,
|
| 142 |
+
ap_done => grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_done,
|
| 143 |
+
ap_idle => grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_idle,
|
| 144 |
+
ap_ready => grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_ready,
|
| 145 |
+
p_read => trunc_ln58_reg_577,
|
| 146 |
+
p_read1 => trunc_ln58_s_reg_582,
|
| 147 |
+
p_read2 => trunc_ln58_4_reg_587,
|
| 148 |
+
p_read3 => trunc_ln58_5_reg_592,
|
| 149 |
+
p_read4 => trunc_ln58_6_reg_597,
|
| 150 |
+
p_read5 => trunc_ln58_7_reg_602,
|
| 151 |
+
p_read6 => trunc_ln58_8_reg_607,
|
| 152 |
+
p_read7 => trunc_ln58_9_reg_612,
|
| 153 |
+
layer7_out_din => grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_layer7_out_din,
|
| 154 |
+
layer7_out_num_data_valid => ap_const_lv11_0,
|
| 155 |
+
layer7_out_fifo_cap => ap_const_lv11_0,
|
| 156 |
+
layer7_out_full_n => layer7_out_full_n,
|
| 157 |
+
layer7_out_write => grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_layer7_out_write);
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
ap_CS_fsm_assign_proc : process(ap_clk)
|
| 164 |
+
begin
|
| 165 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 166 |
+
if (ap_rst = '1') then
|
| 167 |
+
ap_CS_fsm <= ap_ST_fsm_state1;
|
| 168 |
+
else
|
| 169 |
+
ap_CS_fsm <= ap_NS_fsm;
|
| 170 |
+
end if;
|
| 171 |
+
end if;
|
| 172 |
+
end process;
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
ap_done_reg_assign_proc : process(ap_clk)
|
| 176 |
+
begin
|
| 177 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 178 |
+
if (ap_rst = '1') then
|
| 179 |
+
ap_done_reg <= ap_const_logic_0;
|
| 180 |
+
else
|
| 181 |
+
if ((ap_continue = ap_const_logic_1)) then
|
| 182 |
+
ap_done_reg <= ap_const_logic_0;
|
| 183 |
+
elsif (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_468_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 184 |
+
ap_done_reg <= ap_const_logic_1;
|
| 185 |
+
end if;
|
| 186 |
+
end if;
|
| 187 |
+
end if;
|
| 188 |
+
end process;
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start_reg_assign_proc : process(ap_clk)
|
| 192 |
+
begin
|
| 193 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 194 |
+
if (ap_rst = '1') then
|
| 195 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start_reg <= ap_const_logic_0;
|
| 196 |
+
else
|
| 197 |
+
if (((ap_const_boolean_0 = ap_block_state2_ignore_call11) and (icmp_ln52_fu_468_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 198 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start_reg <= ap_const_logic_1;
|
| 199 |
+
elsif ((grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_ready = ap_const_logic_1)) then
|
| 200 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start_reg <= ap_const_logic_0;
|
| 201 |
+
end if;
|
| 202 |
+
end if;
|
| 203 |
+
end if;
|
| 204 |
+
end process;
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
start_once_reg_assign_proc : process(ap_clk)
|
| 208 |
+
begin
|
| 209 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 210 |
+
if (ap_rst = '1') then
|
| 211 |
+
start_once_reg <= ap_const_logic_0;
|
| 212 |
+
else
|
| 213 |
+
if (((real_start = ap_const_logic_1) and (internal_ap_ready = ap_const_logic_0))) then
|
| 214 |
+
start_once_reg <= ap_const_logic_1;
|
| 215 |
+
elsif ((internal_ap_ready = ap_const_logic_1)) then
|
| 216 |
+
start_once_reg <= ap_const_logic_0;
|
| 217 |
+
end if;
|
| 218 |
+
end if;
|
| 219 |
+
end if;
|
| 220 |
+
end process;
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
indvar_flatten_fu_250_assign_proc : process (ap_clk)
|
| 224 |
+
begin
|
| 225 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 226 |
+
if (((ap_const_boolean_0 = ap_block_state1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 227 |
+
indvar_flatten_fu_250 <= ap_const_lv11_0;
|
| 228 |
+
elsif (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_468_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 229 |
+
indvar_flatten_fu_250 <= add_ln52_fu_474_p2;
|
| 230 |
+
end if;
|
| 231 |
+
end if;
|
| 232 |
+
end process;
|
| 233 |
+
process (ap_clk)
|
| 234 |
+
begin
|
| 235 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 236 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 237 |
+
trunc_ln58_4_reg_587 <= layer48_out_dout(47 downto 32);
|
| 238 |
+
trunc_ln58_5_reg_592 <= layer48_out_dout(63 downto 48);
|
| 239 |
+
trunc_ln58_6_reg_597 <= layer48_out_dout(79 downto 64);
|
| 240 |
+
trunc_ln58_7_reg_602 <= layer48_out_dout(95 downto 80);
|
| 241 |
+
trunc_ln58_8_reg_607 <= layer48_out_dout(111 downto 96);
|
| 242 |
+
trunc_ln58_9_reg_612 <= layer48_out_dout(127 downto 112);
|
| 243 |
+
trunc_ln58_reg_577 <= trunc_ln58_fu_480_p1;
|
| 244 |
+
trunc_ln58_s_reg_582 <= layer48_out_dout(31 downto 16);
|
| 245 |
+
end if;
|
| 246 |
+
end if;
|
| 247 |
+
end process;
|
| 248 |
+
|
| 249 |
+
ap_NS_fsm_assign_proc : process (ap_CS_fsm, ap_CS_fsm_state1, ap_CS_fsm_state2, icmp_ln52_fu_468_p2, ap_block_state2, grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_done, ap_CS_fsm_state3, ap_block_state1)
|
| 250 |
+
begin
|
| 251 |
+
case ap_CS_fsm is
|
| 252 |
+
when ap_ST_fsm_state1 =>
|
| 253 |
+
if (((ap_const_boolean_0 = ap_block_state1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 254 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 255 |
+
else
|
| 256 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 257 |
+
end if;
|
| 258 |
+
when ap_ST_fsm_state2 =>
|
| 259 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_468_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 260 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 261 |
+
elsif (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_468_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 262 |
+
ap_NS_fsm <= ap_ST_fsm_state3;
|
| 263 |
+
else
|
| 264 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 265 |
+
end if;
|
| 266 |
+
when ap_ST_fsm_state3 =>
|
| 267 |
+
if (((grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_done = ap_const_logic_1) and (ap_const_logic_1 = ap_CS_fsm_state3))) then
|
| 268 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 269 |
+
else
|
| 270 |
+
ap_NS_fsm <= ap_ST_fsm_state3;
|
| 271 |
+
end if;
|
| 272 |
+
when others =>
|
| 273 |
+
ap_NS_fsm <= "XXX";
|
| 274 |
+
end case;
|
| 275 |
+
end process;
|
| 276 |
+
add_ln52_fu_474_p2 <= std_logic_vector(unsigned(indvar_flatten_fu_250) + unsigned(ap_const_lv11_1));
|
| 277 |
+
ap_CS_fsm_state1 <= ap_CS_fsm(0);
|
| 278 |
+
ap_CS_fsm_state2 <= ap_CS_fsm(1);
|
| 279 |
+
ap_CS_fsm_state3 <= ap_CS_fsm(2);
|
| 280 |
+
|
| 281 |
+
ap_ST_fsm_state1_blk_assign_proc : process(ap_block_state1)
|
| 282 |
+
begin
|
| 283 |
+
if ((ap_const_boolean_1 = ap_block_state1)) then
|
| 284 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_1;
|
| 285 |
+
else
|
| 286 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_0;
|
| 287 |
+
end if;
|
| 288 |
+
end process;
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
ap_ST_fsm_state2_blk_assign_proc : process(ap_block_state2)
|
| 292 |
+
begin
|
| 293 |
+
if ((ap_const_boolean_1 = ap_block_state2)) then
|
| 294 |
+
ap_ST_fsm_state2_blk <= ap_const_logic_1;
|
| 295 |
+
else
|
| 296 |
+
ap_ST_fsm_state2_blk <= ap_const_logic_0;
|
| 297 |
+
end if;
|
| 298 |
+
end process;
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
ap_ST_fsm_state3_blk_assign_proc : process(grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_done)
|
| 302 |
+
begin
|
| 303 |
+
if ((grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_done = ap_const_logic_0)) then
|
| 304 |
+
ap_ST_fsm_state3_blk <= ap_const_logic_1;
|
| 305 |
+
else
|
| 306 |
+
ap_ST_fsm_state3_blk <= ap_const_logic_0;
|
| 307 |
+
end if;
|
| 308 |
+
end process;
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
ap_block_state1_assign_proc : process(real_start, ap_done_reg)
|
| 312 |
+
begin
|
| 313 |
+
ap_block_state1 <= ((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1));
|
| 314 |
+
end process;
|
| 315 |
+
|
| 316 |
+
|
| 317 |
+
ap_block_state2_assign_proc : process(layer48_out_empty_n, icmp_ln52_fu_468_p2)
|
| 318 |
+
begin
|
| 319 |
+
ap_block_state2 <= ((icmp_ln52_fu_468_p2 = ap_const_lv1_0) and (layer48_out_empty_n = ap_const_logic_0));
|
| 320 |
+
end process;
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
ap_block_state2_ignore_call11_assign_proc : process(layer48_out_empty_n, icmp_ln52_fu_468_p2)
|
| 324 |
+
begin
|
| 325 |
+
ap_block_state2_ignore_call11 <= ((icmp_ln52_fu_468_p2 = ap_const_lv1_0) and (layer48_out_empty_n = ap_const_logic_0));
|
| 326 |
+
end process;
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
ap_done_assign_proc : process(ap_done_reg, ap_CS_fsm_state2, icmp_ln52_fu_468_p2, ap_block_state2)
|
| 330 |
+
begin
|
| 331 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_468_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 332 |
+
ap_done <= ap_const_logic_1;
|
| 333 |
+
else
|
| 334 |
+
ap_done <= ap_done_reg;
|
| 335 |
+
end if;
|
| 336 |
+
end process;
|
| 337 |
+
|
| 338 |
+
|
| 339 |
+
ap_idle_assign_proc : process(real_start, ap_CS_fsm_state1)
|
| 340 |
+
begin
|
| 341 |
+
if (((real_start = ap_const_logic_0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 342 |
+
ap_idle <= ap_const_logic_1;
|
| 343 |
+
else
|
| 344 |
+
ap_idle <= ap_const_logic_0;
|
| 345 |
+
end if;
|
| 346 |
+
end process;
|
| 347 |
+
|
| 348 |
+
ap_ready <= internal_ap_ready;
|
| 349 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start <= grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_ap_start_reg;
|
| 350 |
+
icmp_ln52_fu_468_p2 <= "1" when (indvar_flatten_fu_250 = ap_const_lv11_484) else "0";
|
| 351 |
+
|
| 352 |
+
internal_ap_ready_assign_proc : process(ap_CS_fsm_state2, icmp_ln52_fu_468_p2, ap_block_state2)
|
| 353 |
+
begin
|
| 354 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_468_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 355 |
+
internal_ap_ready <= ap_const_logic_1;
|
| 356 |
+
else
|
| 357 |
+
internal_ap_ready <= ap_const_logic_0;
|
| 358 |
+
end if;
|
| 359 |
+
end process;
|
| 360 |
+
|
| 361 |
+
|
| 362 |
+
layer48_out_blk_n_assign_proc : process(layer48_out_empty_n, ap_CS_fsm_state2, icmp_ln52_fu_468_p2)
|
| 363 |
+
begin
|
| 364 |
+
if (((icmp_ln52_fu_468_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 365 |
+
layer48_out_blk_n <= layer48_out_empty_n;
|
| 366 |
+
else
|
| 367 |
+
layer48_out_blk_n <= ap_const_logic_1;
|
| 368 |
+
end if;
|
| 369 |
+
end process;
|
| 370 |
+
|
| 371 |
+
layer48_out_read <= layer48_out_read_local;
|
| 372 |
+
|
| 373 |
+
layer48_out_read_local_assign_proc : process(ap_CS_fsm_state2, icmp_ln52_fu_468_p2, ap_block_state2)
|
| 374 |
+
begin
|
| 375 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_468_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 376 |
+
layer48_out_read_local <= ap_const_logic_1;
|
| 377 |
+
else
|
| 378 |
+
layer48_out_read_local <= ap_const_logic_0;
|
| 379 |
+
end if;
|
| 380 |
+
end process;
|
| 381 |
+
|
| 382 |
+
layer7_out_din <= grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_layer7_out_din;
|
| 383 |
+
|
| 384 |
+
layer7_out_write_assign_proc : process(grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_layer7_out_write, ap_CS_fsm_state3)
|
| 385 |
+
begin
|
| 386 |
+
if ((ap_const_logic_1 = ap_CS_fsm_state3)) then
|
| 387 |
+
layer7_out_write <= grp_compute_output_buffer_2d_array_array_ap_fixed_40_20_5_3_0_16u_config7_s_fu_260_layer7_out_write;
|
| 388 |
+
else
|
| 389 |
+
layer7_out_write <= ap_const_logic_0;
|
| 390 |
+
end if;
|
| 391 |
+
end process;
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
real_start_assign_proc : process(ap_start, start_full_n, start_once_reg)
|
| 395 |
+
begin
|
| 396 |
+
if (((start_once_reg = ap_const_logic_0) and (start_full_n = ap_const_logic_0))) then
|
| 397 |
+
real_start <= ap_const_logic_0;
|
| 398 |
+
else
|
| 399 |
+
real_start <= ap_start;
|
| 400 |
+
end if;
|
| 401 |
+
end process;
|
| 402 |
+
|
| 403 |
+
start_out <= real_start;
|
| 404 |
+
|
| 405 |
+
start_write_assign_proc : process(real_start, start_once_reg)
|
| 406 |
+
begin
|
| 407 |
+
if (((real_start = ap_const_logic_1) and (start_once_reg = ap_const_logic_0))) then
|
| 408 |
+
start_write <= ap_const_logic_1;
|
| 409 |
+
else
|
| 410 |
+
start_write <= ap_const_logic_0;
|
| 411 |
+
end if;
|
| 412 |
+
end process;
|
| 413 |
+
|
| 414 |
+
trunc_ln58_fu_480_p1 <= layer48_out_dout(16 - 1 downto 0);
|
| 415 |
+
end behav;
|
myproject_prj/solution1/impl/vhdl/myproject_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_16u_config31_s.vhd
ADDED
|
@@ -0,0 +1,463 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- ==============================================================
|
| 2 |
+
-- Generated by Vitis HLS v2024.1
|
| 3 |
+
-- Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
|
| 4 |
+
-- Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
|
| 5 |
+
-- ==============================================================
|
| 6 |
+
|
| 7 |
+
library IEEE;
|
| 8 |
+
use IEEE.std_logic_1164.all;
|
| 9 |
+
use IEEE.numeric_std.all;
|
| 10 |
+
|
| 11 |
+
entity myproject_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_16u_config31_s is
|
| 12 |
+
port (
|
| 13 |
+
ap_clk : IN STD_LOGIC;
|
| 14 |
+
ap_rst : IN STD_LOGIC;
|
| 15 |
+
ap_start : IN STD_LOGIC;
|
| 16 |
+
start_full_n : IN STD_LOGIC;
|
| 17 |
+
ap_done : OUT STD_LOGIC;
|
| 18 |
+
ap_continue : IN STD_LOGIC;
|
| 19 |
+
ap_idle : OUT STD_LOGIC;
|
| 20 |
+
ap_ready : OUT STD_LOGIC;
|
| 21 |
+
start_out : OUT STD_LOGIC;
|
| 22 |
+
start_write : OUT STD_LOGIC;
|
| 23 |
+
layer57_out_dout : IN STD_LOGIC_VECTOR (255 downto 0);
|
| 24 |
+
layer57_out_num_data_valid : IN STD_LOGIC_VECTOR (11 downto 0);
|
| 25 |
+
layer57_out_fifo_cap : IN STD_LOGIC_VECTOR (11 downto 0);
|
| 26 |
+
layer57_out_empty_n : IN STD_LOGIC;
|
| 27 |
+
layer57_out_read : OUT STD_LOGIC;
|
| 28 |
+
layer31_out_din : OUT STD_LOGIC_VECTOR (655 downto 0);
|
| 29 |
+
layer31_out_num_data_valid : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 30 |
+
layer31_out_fifo_cap : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 31 |
+
layer31_out_full_n : IN STD_LOGIC;
|
| 32 |
+
layer31_out_write : OUT STD_LOGIC );
|
| 33 |
+
end;
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
architecture behav of myproject_conv_2d_cl_array_array_ap_fixed_41_21_5_3_0_16u_config31_s is
|
| 37 |
+
constant ap_const_logic_1 : STD_LOGIC := '1';
|
| 38 |
+
constant ap_const_logic_0 : STD_LOGIC := '0';
|
| 39 |
+
constant ap_ST_fsm_state1 : STD_LOGIC_VECTOR (2 downto 0) := "001";
|
| 40 |
+
constant ap_ST_fsm_state2 : STD_LOGIC_VECTOR (2 downto 0) := "010";
|
| 41 |
+
constant ap_ST_fsm_state3 : STD_LOGIC_VECTOR (2 downto 0) := "100";
|
| 42 |
+
constant ap_const_boolean_1 : BOOLEAN := true;
|
| 43 |
+
constant ap_const_lv32_0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000000";
|
| 44 |
+
constant ap_const_lv32_1 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000001";
|
| 45 |
+
constant ap_const_lv1_0 : STD_LOGIC_VECTOR (0 downto 0) := "0";
|
| 46 |
+
constant ap_const_lv1_1 : STD_LOGIC_VECTOR (0 downto 0) := "1";
|
| 47 |
+
constant ap_const_boolean_0 : BOOLEAN := false;
|
| 48 |
+
constant ap_const_lv32_2 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000000010";
|
| 49 |
+
constant ap_const_lv11_0 : STD_LOGIC_VECTOR (10 downto 0) := "00000000000";
|
| 50 |
+
constant ap_const_lv11_484 : STD_LOGIC_VECTOR (10 downto 0) := "10010000100";
|
| 51 |
+
constant ap_const_lv11_1 : STD_LOGIC_VECTOR (10 downto 0) := "00000000001";
|
| 52 |
+
constant ap_const_lv32_10 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000010000";
|
| 53 |
+
constant ap_const_lv32_1F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000011111";
|
| 54 |
+
constant ap_const_lv32_20 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000100000";
|
| 55 |
+
constant ap_const_lv32_2F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000101111";
|
| 56 |
+
constant ap_const_lv32_30 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000110000";
|
| 57 |
+
constant ap_const_lv32_3F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000000111111";
|
| 58 |
+
constant ap_const_lv32_40 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001000000";
|
| 59 |
+
constant ap_const_lv32_4F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001001111";
|
| 60 |
+
constant ap_const_lv32_50 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001010000";
|
| 61 |
+
constant ap_const_lv32_5F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001011111";
|
| 62 |
+
constant ap_const_lv32_60 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001100000";
|
| 63 |
+
constant ap_const_lv32_6F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001101111";
|
| 64 |
+
constant ap_const_lv32_70 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001110000";
|
| 65 |
+
constant ap_const_lv32_7F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000001111111";
|
| 66 |
+
constant ap_const_lv32_80 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010000000";
|
| 67 |
+
constant ap_const_lv32_8F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010001111";
|
| 68 |
+
constant ap_const_lv32_90 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010010000";
|
| 69 |
+
constant ap_const_lv32_9F : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010011111";
|
| 70 |
+
constant ap_const_lv32_A0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010100000";
|
| 71 |
+
constant ap_const_lv32_AF : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010101111";
|
| 72 |
+
constant ap_const_lv32_B0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010110000";
|
| 73 |
+
constant ap_const_lv32_BF : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000010111111";
|
| 74 |
+
constant ap_const_lv32_C0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011000000";
|
| 75 |
+
constant ap_const_lv32_CF : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011001111";
|
| 76 |
+
constant ap_const_lv32_D0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011010000";
|
| 77 |
+
constant ap_const_lv32_DF : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011011111";
|
| 78 |
+
constant ap_const_lv32_E0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011100000";
|
| 79 |
+
constant ap_const_lv32_EF : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011101111";
|
| 80 |
+
constant ap_const_lv32_F0 : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011110000";
|
| 81 |
+
constant ap_const_lv32_FF : STD_LOGIC_VECTOR (31 downto 0) := "00000000000000000000000011111111";
|
| 82 |
+
|
| 83 |
+
attribute shreg_extract : string;
|
| 84 |
+
signal real_start : STD_LOGIC;
|
| 85 |
+
signal start_once_reg : STD_LOGIC := '0';
|
| 86 |
+
signal ap_done_reg : STD_LOGIC := '0';
|
| 87 |
+
signal ap_CS_fsm : STD_LOGIC_VECTOR (2 downto 0) := "001";
|
| 88 |
+
attribute fsm_encoding : string;
|
| 89 |
+
attribute fsm_encoding of ap_CS_fsm : signal is "none";
|
| 90 |
+
signal ap_CS_fsm_state1 : STD_LOGIC;
|
| 91 |
+
attribute fsm_encoding of ap_CS_fsm_state1 : signal is "none";
|
| 92 |
+
signal internal_ap_ready : STD_LOGIC;
|
| 93 |
+
signal layer57_out_blk_n : STD_LOGIC;
|
| 94 |
+
signal ap_CS_fsm_state2 : STD_LOGIC;
|
| 95 |
+
attribute fsm_encoding of ap_CS_fsm_state2 : signal is "none";
|
| 96 |
+
signal icmp_ln52_fu_860_p2 : STD_LOGIC_VECTOR (0 downto 0);
|
| 97 |
+
signal trunc_ln58_fu_872_p1 : STD_LOGIC_VECTOR (15 downto 0);
|
| 98 |
+
signal trunc_ln58_reg_1057 : STD_LOGIC_VECTOR (15 downto 0);
|
| 99 |
+
signal ap_block_state2 : BOOLEAN;
|
| 100 |
+
signal trunc_ln58_s_reg_1062 : STD_LOGIC_VECTOR (15 downto 0);
|
| 101 |
+
signal trunc_ln58_240_reg_1067 : STD_LOGIC_VECTOR (15 downto 0);
|
| 102 |
+
signal trunc_ln58_241_reg_1072 : STD_LOGIC_VECTOR (15 downto 0);
|
| 103 |
+
signal trunc_ln58_242_reg_1077 : STD_LOGIC_VECTOR (15 downto 0);
|
| 104 |
+
signal trunc_ln58_243_reg_1082 : STD_LOGIC_VECTOR (15 downto 0);
|
| 105 |
+
signal trunc_ln58_244_reg_1087 : STD_LOGIC_VECTOR (15 downto 0);
|
| 106 |
+
signal trunc_ln58_245_reg_1092 : STD_LOGIC_VECTOR (15 downto 0);
|
| 107 |
+
signal trunc_ln58_246_reg_1097 : STD_LOGIC_VECTOR (15 downto 0);
|
| 108 |
+
signal trunc_ln58_247_reg_1102 : STD_LOGIC_VECTOR (15 downto 0);
|
| 109 |
+
signal trunc_ln58_248_reg_1107 : STD_LOGIC_VECTOR (15 downto 0);
|
| 110 |
+
signal trunc_ln58_249_reg_1112 : STD_LOGIC_VECTOR (15 downto 0);
|
| 111 |
+
signal trunc_ln58_250_reg_1117 : STD_LOGIC_VECTOR (15 downto 0);
|
| 112 |
+
signal trunc_ln58_251_reg_1122 : STD_LOGIC_VECTOR (15 downto 0);
|
| 113 |
+
signal trunc_ln58_252_reg_1127 : STD_LOGIC_VECTOR (15 downto 0);
|
| 114 |
+
signal trunc_ln58_253_reg_1132 : STD_LOGIC_VECTOR (15 downto 0);
|
| 115 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start : STD_LOGIC;
|
| 116 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_done : STD_LOGIC;
|
| 117 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_idle : STD_LOGIC;
|
| 118 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_ready : STD_LOGIC;
|
| 119 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_layer31_out_din : STD_LOGIC_VECTOR (655 downto 0);
|
| 120 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_layer31_out_write : STD_LOGIC;
|
| 121 |
+
signal grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start_reg : STD_LOGIC := '0';
|
| 122 |
+
signal ap_block_state2_ignore_call19 : BOOLEAN;
|
| 123 |
+
signal ap_CS_fsm_state3 : STD_LOGIC;
|
| 124 |
+
attribute fsm_encoding of ap_CS_fsm_state3 : signal is "none";
|
| 125 |
+
signal indvar_flatten_fu_458 : STD_LOGIC_VECTOR (10 downto 0) := "00000000000";
|
| 126 |
+
signal add_ln52_fu_866_p2 : STD_LOGIC_VECTOR (10 downto 0);
|
| 127 |
+
signal ap_block_state1 : BOOLEAN;
|
| 128 |
+
signal layer57_out_read_local : STD_LOGIC;
|
| 129 |
+
signal ap_NS_fsm : STD_LOGIC_VECTOR (2 downto 0);
|
| 130 |
+
signal ap_ST_fsm_state1_blk : STD_LOGIC;
|
| 131 |
+
signal ap_ST_fsm_state2_blk : STD_LOGIC;
|
| 132 |
+
signal ap_ST_fsm_state3_blk : STD_LOGIC;
|
| 133 |
+
signal ap_ce_reg : STD_LOGIC;
|
| 134 |
+
|
| 135 |
+
component myproject_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s IS
|
| 136 |
+
port (
|
| 137 |
+
ap_clk : IN STD_LOGIC;
|
| 138 |
+
ap_rst : IN STD_LOGIC;
|
| 139 |
+
ap_start : IN STD_LOGIC;
|
| 140 |
+
ap_done : OUT STD_LOGIC;
|
| 141 |
+
ap_idle : OUT STD_LOGIC;
|
| 142 |
+
ap_ready : OUT STD_LOGIC;
|
| 143 |
+
p_read : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 144 |
+
p_read1 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 145 |
+
p_read2 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 146 |
+
p_read3 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 147 |
+
p_read4 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 148 |
+
p_read5 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 149 |
+
p_read6 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 150 |
+
p_read7 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 151 |
+
p_read8 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 152 |
+
p_read9 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 153 |
+
p_read10 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 154 |
+
p_read11 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 155 |
+
p_read12 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 156 |
+
p_read13 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 157 |
+
p_read14 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 158 |
+
p_read15 : IN STD_LOGIC_VECTOR (15 downto 0);
|
| 159 |
+
layer31_out_din : OUT STD_LOGIC_VECTOR (655 downto 0);
|
| 160 |
+
layer31_out_num_data_valid : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 161 |
+
layer31_out_fifo_cap : IN STD_LOGIC_VECTOR (10 downto 0);
|
| 162 |
+
layer31_out_full_n : IN STD_LOGIC;
|
| 163 |
+
layer31_out_write : OUT STD_LOGIC );
|
| 164 |
+
end component;
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
begin
|
| 169 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468 : component myproject_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s
|
| 170 |
+
port map (
|
| 171 |
+
ap_clk => ap_clk,
|
| 172 |
+
ap_rst => ap_rst,
|
| 173 |
+
ap_start => grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start,
|
| 174 |
+
ap_done => grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_done,
|
| 175 |
+
ap_idle => grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_idle,
|
| 176 |
+
ap_ready => grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_ready,
|
| 177 |
+
p_read => trunc_ln58_reg_1057,
|
| 178 |
+
p_read1 => trunc_ln58_s_reg_1062,
|
| 179 |
+
p_read2 => trunc_ln58_240_reg_1067,
|
| 180 |
+
p_read3 => trunc_ln58_241_reg_1072,
|
| 181 |
+
p_read4 => trunc_ln58_242_reg_1077,
|
| 182 |
+
p_read5 => trunc_ln58_243_reg_1082,
|
| 183 |
+
p_read6 => trunc_ln58_244_reg_1087,
|
| 184 |
+
p_read7 => trunc_ln58_245_reg_1092,
|
| 185 |
+
p_read8 => trunc_ln58_246_reg_1097,
|
| 186 |
+
p_read9 => trunc_ln58_247_reg_1102,
|
| 187 |
+
p_read10 => trunc_ln58_248_reg_1107,
|
| 188 |
+
p_read11 => trunc_ln58_249_reg_1112,
|
| 189 |
+
p_read12 => trunc_ln58_250_reg_1117,
|
| 190 |
+
p_read13 => trunc_ln58_251_reg_1122,
|
| 191 |
+
p_read14 => trunc_ln58_252_reg_1127,
|
| 192 |
+
p_read15 => trunc_ln58_253_reg_1132,
|
| 193 |
+
layer31_out_din => grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_layer31_out_din,
|
| 194 |
+
layer31_out_num_data_valid => ap_const_lv11_0,
|
| 195 |
+
layer31_out_fifo_cap => ap_const_lv11_0,
|
| 196 |
+
layer31_out_full_n => layer31_out_full_n,
|
| 197 |
+
layer31_out_write => grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_layer31_out_write);
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
ap_CS_fsm_assign_proc : process(ap_clk)
|
| 204 |
+
begin
|
| 205 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 206 |
+
if (ap_rst = '1') then
|
| 207 |
+
ap_CS_fsm <= ap_ST_fsm_state1;
|
| 208 |
+
else
|
| 209 |
+
ap_CS_fsm <= ap_NS_fsm;
|
| 210 |
+
end if;
|
| 211 |
+
end if;
|
| 212 |
+
end process;
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
ap_done_reg_assign_proc : process(ap_clk)
|
| 216 |
+
begin
|
| 217 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 218 |
+
if (ap_rst = '1') then
|
| 219 |
+
ap_done_reg <= ap_const_logic_0;
|
| 220 |
+
else
|
| 221 |
+
if ((ap_continue = ap_const_logic_1)) then
|
| 222 |
+
ap_done_reg <= ap_const_logic_0;
|
| 223 |
+
elsif (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_860_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 224 |
+
ap_done_reg <= ap_const_logic_1;
|
| 225 |
+
end if;
|
| 226 |
+
end if;
|
| 227 |
+
end if;
|
| 228 |
+
end process;
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start_reg_assign_proc : process(ap_clk)
|
| 232 |
+
begin
|
| 233 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 234 |
+
if (ap_rst = '1') then
|
| 235 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start_reg <= ap_const_logic_0;
|
| 236 |
+
else
|
| 237 |
+
if (((ap_const_boolean_0 = ap_block_state2_ignore_call19) and (icmp_ln52_fu_860_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 238 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start_reg <= ap_const_logic_1;
|
| 239 |
+
elsif ((grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_ready = ap_const_logic_1)) then
|
| 240 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start_reg <= ap_const_logic_0;
|
| 241 |
+
end if;
|
| 242 |
+
end if;
|
| 243 |
+
end if;
|
| 244 |
+
end process;
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
start_once_reg_assign_proc : process(ap_clk)
|
| 248 |
+
begin
|
| 249 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 250 |
+
if (ap_rst = '1') then
|
| 251 |
+
start_once_reg <= ap_const_logic_0;
|
| 252 |
+
else
|
| 253 |
+
if (((real_start = ap_const_logic_1) and (internal_ap_ready = ap_const_logic_0))) then
|
| 254 |
+
start_once_reg <= ap_const_logic_1;
|
| 255 |
+
elsif ((internal_ap_ready = ap_const_logic_1)) then
|
| 256 |
+
start_once_reg <= ap_const_logic_0;
|
| 257 |
+
end if;
|
| 258 |
+
end if;
|
| 259 |
+
end if;
|
| 260 |
+
end process;
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
indvar_flatten_fu_458_assign_proc : process (ap_clk)
|
| 264 |
+
begin
|
| 265 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 266 |
+
if (((ap_const_boolean_0 = ap_block_state1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 267 |
+
indvar_flatten_fu_458 <= ap_const_lv11_0;
|
| 268 |
+
elsif (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_860_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 269 |
+
indvar_flatten_fu_458 <= add_ln52_fu_866_p2;
|
| 270 |
+
end if;
|
| 271 |
+
end if;
|
| 272 |
+
end process;
|
| 273 |
+
process (ap_clk)
|
| 274 |
+
begin
|
| 275 |
+
if (ap_clk'event and ap_clk = '1') then
|
| 276 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 277 |
+
trunc_ln58_240_reg_1067 <= layer57_out_dout(47 downto 32);
|
| 278 |
+
trunc_ln58_241_reg_1072 <= layer57_out_dout(63 downto 48);
|
| 279 |
+
trunc_ln58_242_reg_1077 <= layer57_out_dout(79 downto 64);
|
| 280 |
+
trunc_ln58_243_reg_1082 <= layer57_out_dout(95 downto 80);
|
| 281 |
+
trunc_ln58_244_reg_1087 <= layer57_out_dout(111 downto 96);
|
| 282 |
+
trunc_ln58_245_reg_1092 <= layer57_out_dout(127 downto 112);
|
| 283 |
+
trunc_ln58_246_reg_1097 <= layer57_out_dout(143 downto 128);
|
| 284 |
+
trunc_ln58_247_reg_1102 <= layer57_out_dout(159 downto 144);
|
| 285 |
+
trunc_ln58_248_reg_1107 <= layer57_out_dout(175 downto 160);
|
| 286 |
+
trunc_ln58_249_reg_1112 <= layer57_out_dout(191 downto 176);
|
| 287 |
+
trunc_ln58_250_reg_1117 <= layer57_out_dout(207 downto 192);
|
| 288 |
+
trunc_ln58_251_reg_1122 <= layer57_out_dout(223 downto 208);
|
| 289 |
+
trunc_ln58_252_reg_1127 <= layer57_out_dout(239 downto 224);
|
| 290 |
+
trunc_ln58_253_reg_1132 <= layer57_out_dout(255 downto 240);
|
| 291 |
+
trunc_ln58_reg_1057 <= trunc_ln58_fu_872_p1;
|
| 292 |
+
trunc_ln58_s_reg_1062 <= layer57_out_dout(31 downto 16);
|
| 293 |
+
end if;
|
| 294 |
+
end if;
|
| 295 |
+
end process;
|
| 296 |
+
|
| 297 |
+
ap_NS_fsm_assign_proc : process (ap_CS_fsm, ap_CS_fsm_state1, ap_CS_fsm_state2, icmp_ln52_fu_860_p2, ap_block_state2, grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_done, ap_CS_fsm_state3, ap_block_state1)
|
| 298 |
+
begin
|
| 299 |
+
case ap_CS_fsm is
|
| 300 |
+
when ap_ST_fsm_state1 =>
|
| 301 |
+
if (((ap_const_boolean_0 = ap_block_state1) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 302 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 303 |
+
else
|
| 304 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 305 |
+
end if;
|
| 306 |
+
when ap_ST_fsm_state2 =>
|
| 307 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_860_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 308 |
+
ap_NS_fsm <= ap_ST_fsm_state1;
|
| 309 |
+
elsif (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_860_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 310 |
+
ap_NS_fsm <= ap_ST_fsm_state3;
|
| 311 |
+
else
|
| 312 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 313 |
+
end if;
|
| 314 |
+
when ap_ST_fsm_state3 =>
|
| 315 |
+
if (((ap_const_logic_1 = ap_CS_fsm_state3) and (grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_done = ap_const_logic_1))) then
|
| 316 |
+
ap_NS_fsm <= ap_ST_fsm_state2;
|
| 317 |
+
else
|
| 318 |
+
ap_NS_fsm <= ap_ST_fsm_state3;
|
| 319 |
+
end if;
|
| 320 |
+
when others =>
|
| 321 |
+
ap_NS_fsm <= "XXX";
|
| 322 |
+
end case;
|
| 323 |
+
end process;
|
| 324 |
+
add_ln52_fu_866_p2 <= std_logic_vector(unsigned(indvar_flatten_fu_458) + unsigned(ap_const_lv11_1));
|
| 325 |
+
ap_CS_fsm_state1 <= ap_CS_fsm(0);
|
| 326 |
+
ap_CS_fsm_state2 <= ap_CS_fsm(1);
|
| 327 |
+
ap_CS_fsm_state3 <= ap_CS_fsm(2);
|
| 328 |
+
|
| 329 |
+
ap_ST_fsm_state1_blk_assign_proc : process(ap_block_state1)
|
| 330 |
+
begin
|
| 331 |
+
if ((ap_const_boolean_1 = ap_block_state1)) then
|
| 332 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_1;
|
| 333 |
+
else
|
| 334 |
+
ap_ST_fsm_state1_blk <= ap_const_logic_0;
|
| 335 |
+
end if;
|
| 336 |
+
end process;
|
| 337 |
+
|
| 338 |
+
|
| 339 |
+
ap_ST_fsm_state2_blk_assign_proc : process(ap_block_state2)
|
| 340 |
+
begin
|
| 341 |
+
if ((ap_const_boolean_1 = ap_block_state2)) then
|
| 342 |
+
ap_ST_fsm_state2_blk <= ap_const_logic_1;
|
| 343 |
+
else
|
| 344 |
+
ap_ST_fsm_state2_blk <= ap_const_logic_0;
|
| 345 |
+
end if;
|
| 346 |
+
end process;
|
| 347 |
+
|
| 348 |
+
|
| 349 |
+
ap_ST_fsm_state3_blk_assign_proc : process(grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_done)
|
| 350 |
+
begin
|
| 351 |
+
if ((grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_done = ap_const_logic_0)) then
|
| 352 |
+
ap_ST_fsm_state3_blk <= ap_const_logic_1;
|
| 353 |
+
else
|
| 354 |
+
ap_ST_fsm_state3_blk <= ap_const_logic_0;
|
| 355 |
+
end if;
|
| 356 |
+
end process;
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
ap_block_state1_assign_proc : process(real_start, ap_done_reg)
|
| 360 |
+
begin
|
| 361 |
+
ap_block_state1 <= ((real_start = ap_const_logic_0) or (ap_done_reg = ap_const_logic_1));
|
| 362 |
+
end process;
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
ap_block_state2_assign_proc : process(layer57_out_empty_n, icmp_ln52_fu_860_p2)
|
| 366 |
+
begin
|
| 367 |
+
ap_block_state2 <= ((icmp_ln52_fu_860_p2 = ap_const_lv1_0) and (layer57_out_empty_n = ap_const_logic_0));
|
| 368 |
+
end process;
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
ap_block_state2_ignore_call19_assign_proc : process(layer57_out_empty_n, icmp_ln52_fu_860_p2)
|
| 372 |
+
begin
|
| 373 |
+
ap_block_state2_ignore_call19 <= ((icmp_ln52_fu_860_p2 = ap_const_lv1_0) and (layer57_out_empty_n = ap_const_logic_0));
|
| 374 |
+
end process;
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
ap_done_assign_proc : process(ap_done_reg, ap_CS_fsm_state2, icmp_ln52_fu_860_p2, ap_block_state2)
|
| 378 |
+
begin
|
| 379 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_860_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 380 |
+
ap_done <= ap_const_logic_1;
|
| 381 |
+
else
|
| 382 |
+
ap_done <= ap_done_reg;
|
| 383 |
+
end if;
|
| 384 |
+
end process;
|
| 385 |
+
|
| 386 |
+
|
| 387 |
+
ap_idle_assign_proc : process(real_start, ap_CS_fsm_state1)
|
| 388 |
+
begin
|
| 389 |
+
if (((real_start = ap_const_logic_0) and (ap_const_logic_1 = ap_CS_fsm_state1))) then
|
| 390 |
+
ap_idle <= ap_const_logic_1;
|
| 391 |
+
else
|
| 392 |
+
ap_idle <= ap_const_logic_0;
|
| 393 |
+
end if;
|
| 394 |
+
end process;
|
| 395 |
+
|
| 396 |
+
ap_ready <= internal_ap_ready;
|
| 397 |
+
grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start <= grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_ap_start_reg;
|
| 398 |
+
icmp_ln52_fu_860_p2 <= "1" when (indvar_flatten_fu_458 = ap_const_lv11_484) else "0";
|
| 399 |
+
|
| 400 |
+
internal_ap_ready_assign_proc : process(ap_CS_fsm_state2, icmp_ln52_fu_860_p2, ap_block_state2)
|
| 401 |
+
begin
|
| 402 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_860_p2 = ap_const_lv1_1) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 403 |
+
internal_ap_ready <= ap_const_logic_1;
|
| 404 |
+
else
|
| 405 |
+
internal_ap_ready <= ap_const_logic_0;
|
| 406 |
+
end if;
|
| 407 |
+
end process;
|
| 408 |
+
|
| 409 |
+
layer31_out_din <= grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_layer31_out_din;
|
| 410 |
+
|
| 411 |
+
layer31_out_write_assign_proc : process(grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_layer31_out_write, ap_CS_fsm_state3)
|
| 412 |
+
begin
|
| 413 |
+
if ((ap_const_logic_1 = ap_CS_fsm_state3)) then
|
| 414 |
+
layer31_out_write <= grp_compute_output_buffer_2d_array_array_ap_fixed_41_21_5_3_0_16u_config31_s_fu_468_layer31_out_write;
|
| 415 |
+
else
|
| 416 |
+
layer31_out_write <= ap_const_logic_0;
|
| 417 |
+
end if;
|
| 418 |
+
end process;
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
layer57_out_blk_n_assign_proc : process(layer57_out_empty_n, ap_CS_fsm_state2, icmp_ln52_fu_860_p2)
|
| 422 |
+
begin
|
| 423 |
+
if (((icmp_ln52_fu_860_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 424 |
+
layer57_out_blk_n <= layer57_out_empty_n;
|
| 425 |
+
else
|
| 426 |
+
layer57_out_blk_n <= ap_const_logic_1;
|
| 427 |
+
end if;
|
| 428 |
+
end process;
|
| 429 |
+
|
| 430 |
+
layer57_out_read <= layer57_out_read_local;
|
| 431 |
+
|
| 432 |
+
layer57_out_read_local_assign_proc : process(ap_CS_fsm_state2, icmp_ln52_fu_860_p2, ap_block_state2)
|
| 433 |
+
begin
|
| 434 |
+
if (((ap_const_boolean_0 = ap_block_state2) and (icmp_ln52_fu_860_p2 = ap_const_lv1_0) and (ap_const_logic_1 = ap_CS_fsm_state2))) then
|
| 435 |
+
layer57_out_read_local <= ap_const_logic_1;
|
| 436 |
+
else
|
| 437 |
+
layer57_out_read_local <= ap_const_logic_0;
|
| 438 |
+
end if;
|
| 439 |
+
end process;
|
| 440 |
+
|
| 441 |
+
|
| 442 |
+
real_start_assign_proc : process(ap_start, start_full_n, start_once_reg)
|
| 443 |
+
begin
|
| 444 |
+
if (((start_once_reg = ap_const_logic_0) and (start_full_n = ap_const_logic_0))) then
|
| 445 |
+
real_start <= ap_const_logic_0;
|
| 446 |
+
else
|
| 447 |
+
real_start <= ap_start;
|
| 448 |
+
end if;
|
| 449 |
+
end process;
|
| 450 |
+
|
| 451 |
+
start_out <= real_start;
|
| 452 |
+
|
| 453 |
+
start_write_assign_proc : process(real_start, start_once_reg)
|
| 454 |
+
begin
|
| 455 |
+
if (((real_start = ap_const_logic_1) and (start_once_reg = ap_const_logic_0))) then
|
| 456 |
+
start_write <= ap_const_logic_1;
|
| 457 |
+
else
|
| 458 |
+
start_write <= ap_const_logic_0;
|
| 459 |
+
end if;
|
| 460 |
+
end process;
|
| 461 |
+
|
| 462 |
+
trunc_ln58_fu_872_p1 <= layer57_out_dout(16 - 1 downto 0);
|
| 463 |
+
end behav;
|