1 |
17 |
sumanta.ch |
library ieee;
|
2 |
|
|
use ieee.std_logic_1164.all;
|
3 |
|
|
USE ieee.std_logic_arith.ALL;
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
entity AI is
|
8 |
|
|
port(
|
9 |
|
|
iAI_start:in std_logic;
|
10 |
|
|
iAI_DATA: in std_logic_vector(63 downto 0);
|
11 |
|
|
iCOLOR:in std_logic_vector(7 downto 0);
|
12 |
|
|
imovecount:in std_logic_vector(16 downto 0);
|
13 |
|
|
oAI_Done: out std_logic;
|
14 |
|
|
oAI_DATA: out std_logic_vector(63 downto 0);
|
15 |
|
|
iCLK: in std_logic;
|
16 |
|
|
iRST_n:in std_logic
|
17 |
|
|
|
18 |
|
|
);
|
19 |
|
|
end entity AI;
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
architecture c_to_g of AI is
|
23 |
|
|
component bram_based_stream_buffer is
|
24 |
|
|
--#(.width(48), .depth(`CONNECT6AI_SYNTH_ILS_FIFO_QUEUE_DISMANTLE_LENGTH))
|
25 |
|
|
port(
|
26 |
|
|
clk:in std_logic;
|
27 |
|
|
reset:in std_logic;
|
28 |
|
|
store_ready:in std_logic;
|
29 |
|
|
flush:in std_logic;
|
30 |
|
|
store_req:out std_logic;
|
31 |
|
|
load_req:out std_logic;
|
32 |
|
|
load_ready:in std_logic;
|
33 |
|
|
indata:in std_logic_vector(47 downto 0);
|
34 |
|
|
outdata:out std_logic_vector(47 downto 0)
|
35 |
|
|
);
|
36 |
|
|
end component bram_based_stream_buffer;
|
37 |
|
|
|
38 |
|
|
component connect6ai_synth_tcab is
|
39 |
|
|
port(
|
40 |
|
|
clk: in std_logic;
|
41 |
|
|
reset:in std_logic;
|
42 |
|
|
stallbar_out:out std_logic;
|
43 |
|
|
rawdataout_pico_ret_connect6ai_synth_0_outenable:out std_logic;
|
44 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_0_0_outenable:out std_logic;
|
45 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_1_0_outenable:out std_logic;
|
46 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_2_0_outenable:out std_logic;
|
47 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_3_0_outenable:out std_logic;
|
48 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_4_0_outenable:out std_logic;
|
49 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_5_0_outenable:out std_logic;
|
50 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_6_0_outenable:out std_logic;
|
51 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_7_0_outenable:out std_logic;
|
52 |
|
|
start:in std_logic;
|
53 |
|
|
rawdatain_pico_connect6ai_synth_firstmove_in_0_0:in std_logic_vector(16 downto 0);
|
54 |
|
|
rawdatain_pico_connect6ai_synth_movein_0_in_1_0:in std_logic_vector(7 downto 0);
|
55 |
|
|
rawdatain_pico_connect6ai_synth_movein_1_in_2_0:in std_logic_vector(7 downto 0);
|
56 |
|
|
rawdatain_pico_connect6ai_synth_movein_2_in_3_0:in std_logic_vector(7 downto 0);
|
57 |
|
|
rawdatain_pico_connect6ai_synth_movein_3_in_4_0:in std_logic_vector(7 downto 0);
|
58 |
|
|
rawdatain_pico_connect6ai_synth_movein_4_in_5_0:in std_logic_vector(7 downto 0);
|
59 |
|
|
rawdatain_pico_connect6ai_synth_movein_5_in_6_0:in std_logic_vector(7 downto 0);
|
60 |
|
|
rawdatain_pico_connect6ai_synth_movein_6_in_7_0:in std_logic_vector(7 downto 0);
|
61 |
|
|
rawdatain_pico_connect6ai_synth_movein_7_in_8_0:in std_logic_vector(7 downto 0);
|
62 |
|
|
rawdatain_pico_connect6ai_synth_colour_in_9_0:in std_logic_vector(7 downto 0);
|
63 |
|
|
rawdatain_pico_connect6ai_synth_moveout_0_in_10_0: in std_logic_vector(7 downto 0);
|
64 |
|
|
rawdatain_pico_connect6ai_synth_moveout_1_in_11_0: in std_logic_vector(7 downto 0);
|
65 |
|
|
rawdatain_pico_connect6ai_synth_moveout_2_in_12_0: in std_logic_vector(7 downto 0);
|
66 |
|
|
rawdatain_pico_connect6ai_synth_moveout_3_in_13_0: in std_logic_vector(7 downto 0);
|
67 |
|
|
rawdatain_pico_connect6ai_synth_moveout_4_in_14_0: in std_logic_vector(7 downto 0);
|
68 |
|
|
rawdatain_pico_connect6ai_synth_moveout_5_in_15_0: in std_logic_vector(7 downto 0);
|
69 |
|
|
rawdatain_pico_connect6ai_synth_moveout_6_in_16_0: in std_logic_vector(7 downto 0);
|
70 |
|
|
rawdatain_pico_connect6ai_synth_moveout_7_in_17_0: in std_logic_vector(7 downto 0);
|
71 |
|
|
rawdataout_pico_ret_connect6ai_synth_0:out std_logic;
|
72 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_0_0: out std_logic_vector(7 downto 0);
|
73 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_1_0: out std_logic_vector(7 downto 0);
|
74 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_2_0: out std_logic_vector(7 downto 0);
|
75 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_3_0: out std_logic_vector(7 downto 0);
|
76 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_4_0: out std_logic_vector(7 downto 0);
|
77 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_5_0: out std_logic_vector(7 downto 0);
|
78 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_6_0: out std_logic_vector(7 downto 0);
|
79 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_7_0: out std_logic_vector(7 downto 0)
|
80 |
|
|
--instream_queue_di_0:in std_logic_vector(47 downto 0);
|
81 |
|
|
--instream_queue_req_0:out std_logic;
|
82 |
|
|
--instream_queue_ready_0:in std_logic;
|
83 |
|
|
--outstream_queue_do_1:out std_logic_vector(47 downto 0);
|
84 |
|
|
--outstream_queue_req_1:out std_logic;
|
85 |
|
|
--outstream_queue_ready_1:in std_logic
|
86 |
|
|
|
87 |
|
|
);
|
88 |
|
|
end component connect6ai_synth_tcab;
|
89 |
|
|
signal out_enables:std_logic_vector(7 downto 0);
|
90 |
|
|
signal out_enables_reg:std_logic_vector(7 downto 0);
|
91 |
|
|
signal AI_DATA,mAI_DATA: std_logic_vector(63 downto 0);
|
92 |
|
|
signal ils_fifo_queue_dismantle_outdata:std_logic_vector(47 downto 0);
|
93 |
|
|
signal tcab_instream_queue_req_0:std_logic;
|
94 |
|
|
signal ils_fifo_queue_dismantle_store_req: std_logic;
|
95 |
|
|
signal tcab_outstream_queue_do_1:std_logic_vector(47 downto 0);
|
96 |
|
|
signal tcab_outstream_queue_req_1:std_logic;
|
97 |
|
|
signal ils_fifo_queue_dismantle_load_req: std_logic;
|
98 |
|
|
signal iRST_p:std_logic;
|
99 |
|
|
signal UNUSED_INPUT_VECTOR:bit_vector(7 downto 0):=x"00";
|
100 |
|
|
begin
|
101 |
|
|
iRST_p<=not(iRST_n);
|
102 |
|
|
oAI_DATA<=AI_DATA;
|
103 |
|
|
inst_ai:connect6ai_synth_tcab
|
104 |
|
|
port map(
|
105 |
|
|
|
106 |
|
|
clk=>iCLK,
|
107 |
|
|
--reset=>not(iRST_n),
|
108 |
|
|
reset=>iRST_p,
|
109 |
|
|
stallbar_out=>open,
|
110 |
|
|
rawdataout_pico_ret_connect6ai_synth_0_outenable=>open,
|
111 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_0_0_outenable=>out_enables(0),
|
112 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_1_0_outenable=>out_enables(1),
|
113 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_2_0_outenable=>out_enables(2),
|
114 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_3_0_outenable=>out_enables(3),
|
115 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_4_0_outenable=>out_enables(4),
|
116 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_5_0_outenable=>out_enables(5),
|
117 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_6_0_outenable=>out_enables(6),
|
118 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_7_0_outenable=>out_enables(7),
|
119 |
|
|
start=>iAI_start,
|
120 |
|
|
rawdatain_pico_connect6ai_synth_firstmove_in_0_0=>imovecount,
|
121 |
|
|
rawdatain_pico_connect6ai_synth_movein_0_in_1_0=>iAI_DATA(31 downto 24),
|
122 |
|
|
rawdatain_pico_connect6ai_synth_movein_1_in_2_0=>iAI_DATA(23 downto 16),
|
123 |
|
|
rawdatain_pico_connect6ai_synth_movein_2_in_3_0=>iAI_DATA(15 downto 8),
|
124 |
|
|
rawdatain_pico_connect6ai_synth_movein_3_in_4_0=>iAI_DATA(7 downto 0),
|
125 |
|
|
rawdatain_pico_connect6ai_synth_movein_4_in_5_0=>iAI_DATA(63 downto 56),
|
126 |
|
|
rawdatain_pico_connect6ai_synth_movein_5_in_6_0=>iAI_DATA(55 downto 48),
|
127 |
|
|
rawdatain_pico_connect6ai_synth_movein_6_in_7_0=>iAI_DATA(47 downto 40),
|
128 |
|
|
rawdatain_pico_connect6ai_synth_movein_7_in_8_0=>iAI_DATA(39 downto 32),
|
129 |
|
|
rawdatain_pico_connect6ai_synth_colour_in_9_0=>icolor,
|
130 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_0_in_10_0=> to_stdlogicvector(x"00"),
|
131 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_1_in_11_0=> to_stdlogicvector(x"00"),
|
132 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_2_in_12_0=> to_stdlogicvector(x"00"),
|
133 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_3_in_13_0=> to_stdlogicvector(x"00"),
|
134 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_4_in_14_0=> to_stdlogicvector(x"00"),
|
135 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_5_in_15_0=> to_stdlogicvector(x"00"),
|
136 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_6_in_16_0=> to_stdlogicvector(x"00"),
|
137 |
|
|
--rawdatain_pico_connect6ai_synth_moveout_7_in_17_0=> to_stdlogicvector(x"00"),
|
138 |
|
|
rawdatain_pico_connect6ai_synth_moveout_0_in_10_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
139 |
|
|
rawdatain_pico_connect6ai_synth_moveout_1_in_11_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
140 |
|
|
rawdatain_pico_connect6ai_synth_moveout_2_in_12_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
141 |
|
|
rawdatain_pico_connect6ai_synth_moveout_3_in_13_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
142 |
|
|
rawdatain_pico_connect6ai_synth_moveout_4_in_14_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
143 |
|
|
rawdatain_pico_connect6ai_synth_moveout_5_in_15_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
144 |
|
|
rawdatain_pico_connect6ai_synth_moveout_6_in_16_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
145 |
|
|
rawdatain_pico_connect6ai_synth_moveout_7_in_17_0=> to_stdlogicvector(UNUSED_INPUT_VECTOR),
|
146 |
|
|
rawdataout_pico_ret_connect6ai_synth_0=>open,
|
147 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_0_0=> mAI_DATA(63 downto 56),
|
148 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_1_0=> mAI_DATA(55 downto 48),
|
149 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_2_0=> mAI_DATA(47 downto 40),
|
150 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_3_0=> mAI_DATA(39 downto 32),
|
151 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_4_0=> mAI_DATA(31 downto 24),
|
152 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_5_0=> mAI_DATA(23 downto 16),
|
153 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_6_0=> mAI_DATA(15 downto 8),
|
154 |
|
|
rawdataout_pico_connect6ai_synth_moveout_out_7_0=> mAI_DATA(7 downto 0)
|
155 |
|
|
--instream_queue_di_0=>ils_fifo_queue_dismantle_outdata(47 downto 0),
|
156 |
|
|
--instream_queue_req_0=>tcab_instream_queue_req_0,
|
157 |
|
|
--instream_queue_ready_0=>ils_fifo_queue_dismantle_store_req,
|
158 |
|
|
--outstream_queue_do_1=>tcab_outstream_queue_do_1(47 downto 0),
|
159 |
|
|
--outstream_queue_req_1=>tcab_outstream_queue_req_1,
|
160 |
|
|
--outstream_queue_ready_1=>ils_fifo_queue_dismantle_load_req
|
161 |
|
|
);
|
162 |
|
|
-- ils_fifo_queue_dismantle:bram_based_stream_buffer
|
163 |
|
|
----#(.width(48), .depth(`CONNECT6AI_SYNTH_ILS_FIFO_QUEUE_DISMANTLE_LENGTH))
|
164 |
|
|
-- port map(
|
165 |
|
|
-- clk=>iCLK,
|
166 |
|
|
-- --reset=>not(iRST_n),
|
167 |
|
|
-- reset=>iRST_p,
|
168 |
|
|
-- store_ready=>tcab_instream_queue_req_0,
|
169 |
|
|
-- flush=>'0',
|
170 |
|
|
-- store_req=>ils_fifo_queue_dismantle_store_req,
|
171 |
|
|
-- load_req=>ils_fifo_queue_dismantle_load_req,
|
172 |
|
|
-- load_ready=>tcab_outstream_queue_req_1,
|
173 |
|
|
-- indata=>tcab_outstream_queue_do_1(47 downto 0),
|
174 |
|
|
-- outdata=>ils_fifo_queue_dismantle_outdata(47 downto 0));
|
175 |
|
|
|
176 |
|
|
process(iCLK)
|
177 |
|
|
begin
|
178 |
|
|
if rising_edge(iCLK) then
|
179 |
|
|
if(iAI_start='1') then
|
180 |
|
|
out_enables_reg<="00000000";
|
181 |
|
|
for i in 0 to 7 loop
|
182 |
|
|
AI_DATA( 63-8*i downto 56-8*i)<="00000000";
|
183 |
|
|
end loop;
|
184 |
|
|
else
|
185 |
|
|
for i in 0 to 7 loop
|
186 |
|
|
if(out_enables(i)='1') then
|
187 |
|
|
out_enables_reg(i)<=out_enables(i);
|
188 |
|
|
AI_DATA( 63-8*i downto 56-8*i)<=mAI_DATA(63-8*i downto 56-8*i);
|
189 |
|
|
else
|
190 |
|
|
out_enables_reg(i)<=out_enables_reg(i);
|
191 |
|
|
AI_DATA( 63-8*i downto 56-8*i)<=AI_DATA(63-8*i downto 56-8*i);
|
192 |
|
|
end if;
|
193 |
|
|
end loop;
|
194 |
|
|
end if;
|
195 |
|
|
end if;
|
196 |
|
|
end process;
|
197 |
|
|
oAI_Done<= out_enables_reg(0) and out_enables_reg(1) and out_enables_reg(2) and out_enables_reg(3) and
|
198 |
|
|
out_enables_reg(4) and out_enables_reg(5) and out_enables_reg(6) and out_enables_reg(7);
|
199 |
|
|
|
200 |
|
|
--oAI_Done<= out_enables(0) and out_enables(1) and out_enables(2) and out_enables(3);
|
201 |
|
|
end architecture c_to_g;
|