File tree 7 files changed +305
-0
lines changed
7 files changed +305
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,70 @@ begin
217
217
Y_o => rs_not
218
218
);
219
219
220
+ -- Rotace vpravo
221
+ RS_RR_COM : entity work .rotate_right
222
+ port map (
223
+ -- vstup
224
+ A_i => number_a_i,
225
+ C_i => carry_i,
226
+ -- vystup
227
+ Y_o => rs_rr,
228
+ C_o => rs_rr_c
229
+ );
230
+
231
+ -- Rotace vlevo
232
+ RS_RL_COM : entity work .rotate_left
233
+ port map (
234
+ -- vstup
235
+ A_i => number_a_i,
236
+ C_i => carry_i,
237
+ -- vystup
238
+ Y_o => rs_rl,
239
+ C_o => rs_rl_c
240
+ );
241
+
242
+ -- Rotace vpravo s prenosem
243
+ RS_RRC_COM : entity work .rotate_right_with_carry
244
+ port map (
245
+ -- vstup
246
+ A_i => number_a_i,
247
+ C_i => carry_i,
248
+ -- vystup
249
+ Y_o => rs_rrc,
250
+ C_o => rs_rrc_c
251
+ );
252
+
253
+ -- Rotace vlevo s prenosem
254
+ RS_RLC_COM : entity work .rotate_left_with_carry
255
+ port map (
256
+ -- vstup
257
+ A_i => number_a_i,
258
+ C_i => carry_i,
259
+ -- vystup
260
+ Y_o => rs_rlc,
261
+ C_o => rs_rlc_c
262
+ );
263
+
264
+ -- Prehozeni bitu
265
+ RS_SWAP_COM : entity work .bitswap
266
+ port map (
267
+ -- vstup
268
+ A_i => number_a_i,
269
+ -- vystup
270
+ Y_o => rs_swap
271
+ );
272
+
273
+ -- Nasobeni
274
+ RS_MUL_COM : entity work .multiply
275
+ port map (
276
+ -- vstup
277
+ A_i => number_a_i,
278
+ B_i => number_b_i,
279
+ -- vystup
280
+ Y_o => rs_mul,
281
+ C_o => rs_mul_c
282
+ );
283
+
220
284
-- Mux , vyber z vysledku z operace
221
285
with control_sig_i select
222
286
alu_result <= rs_plus when x"0" ,
Original file line number Diff line number Diff line change
1
+ -- ------------------------------------------------------------------------------
2
+ -- Brno University of Technology, Department of Radio Electronics
3
+ -- ------------------------------------------------------------------------------
4
+ -- Author: Tomas Dubina
5
+ -- Date: 2019-02-14 07:44
6
+ -- Design: bitswap
7
+ -- Description: bitswap
8
+ -- ------------------------------------------------------------------------------
9
+ -- TODO:
10
+ -- ------------------------------------------------------------------------------
11
+
12
+ library ieee;
13
+ use ieee.std_logic_1164.all ;
14
+
15
+ -- ------------------------------------------------------------------------------
16
+ -- Entity declaration for bitswap
17
+ -- ------------------------------------------------------------------------------
18
+ entity bitswap is
19
+ port (
20
+ -- Entity input signals
21
+ A_i : in std_logic_vector (3 downto 0 ); -- input
22
+
23
+ -- Entity output signals
24
+ Y_o : out std_logic_vector (3 downto 0 ) -- output
25
+ );
26
+ end bitswap ;
27
+
28
+ -- ------------------------------------------------------------------------------
29
+ -- Architecture declaration for bitswap
30
+ -- ------------------------------------------------------------------------------
31
+ architecture Behavioral of bitswap is
32
+
33
+ begin
34
+
35
+ Y_o(3 downto 2 ) <= A_i(1 downto 0 );
36
+ Y_o(1 downto 0 ) <= A_i(3 downto 2 );
37
+
38
+ end Behavioral ;
Original file line number Diff line number Diff line change
1
+ -- ------------------------------------------------------------------------------
2
+ -- Brno University of Technology, Department of Radio Electronics
3
+ -- ------------------------------------------------------------------------------
4
+ -- Author: Tomáš Dubina
5
+ -- Date: 2019-02-14 07:44
6
+ -- Design: multiply
7
+ -- Description: MUL operation, Y = A * B
8
+ -- ------------------------------------------------------------------------------
9
+ -- TODO: all
10
+ -- ------------------------------------------------------------------------------
11
+
12
+ library ieee;
13
+ use ieee.std_logic_1164.all ;
14
+
15
+ -- ------------------------------------------------------------------------------
16
+ -- Entity declaration for multiply
17
+ -- ------------------------------------------------------------------------------
18
+ entity multiply is
19
+ port (
20
+ -- Entity input signals
21
+ A_i : in std_logic_vector (3 downto 0 );
22
+ B_i : in std_logic_vector (3 downto 0 );
23
+ -- Entity output signals
24
+ Y_o : out std_logic_vector (3 downto 0 );
25
+ C_o : out std_logic
26
+ );
27
+ end multiply ;
28
+
29
+ -- ------------------------------------------------------------------------------
30
+ -- Architecture declaration for multiply
31
+ -- ------------------------------------------------------------------------------
32
+ architecture Behavioral of multiply is
33
+
34
+ begin
35
+
36
+
37
+
38
+ end Behavioral ;
39
+
Original file line number Diff line number Diff line change
1
+ -- ------------------------------------------------------------------------------
2
+ -- Brno University of Technology, Department of Radio Electronics
3
+ -- ------------------------------------------------------------------------------
4
+ -- Author: Milan hornik
5
+ -- Design: rotate_left
6
+ -- Description: Implementation of <<
7
+ -- ------------------------------------------------------------------------------
8
+ -- ------------------------------------------------------------------------------
9
+
10
+ library ieee;
11
+ use ieee.std_logic_1164.all ;
12
+
13
+ -- ------------------------------------------------------------------------------
14
+ -- Entity declaration for rotate_left
15
+ -- ------------------------------------------------------------------------------
16
+ entity rotate_left is
17
+ port (
18
+ -- Global input signals at CPLD expansion board
19
+
20
+ A_i : in std_logic_vector (4 - 1 downto 0 );
21
+ C_i : in std_logic ;
22
+
23
+
24
+ -- Global output signals at Coolrunner-II board
25
+
26
+ Y_o : out std_logic_vector (4 - 1 downto 0 ) ;
27
+ C_o : out std_logic
28
+ );
29
+ end rotate_left ;
30
+
31
+ -- ------------------------------------------------------------------------------
32
+ -- Architecture declaration for rotate_right
33
+ -- ------------------------------------------------------------------------------
34
+ architecture Behavioral of rotate_left is
35
+
36
+ begin
37
+
38
+
39
+
40
+
41
+ end Behavioral ;
Original file line number Diff line number Diff line change
1
+ -- ------------------------------------------------------------------------------
2
+ -- Brno University of Technology, Department of Radio Electronics
3
+ -- ------------------------------------------------------------------------------
4
+ -- Author: Milan hornik
5
+ -- Design: rotate_left_with_carry
6
+ -- Description: Implementation of <<
7
+ -- ------------------------------------------------------------------------------
8
+ -- ------------------------------------------------------------------------------
9
+
10
+ library ieee;
11
+ use ieee.std_logic_1164.all ;
12
+
13
+ -- ------------------------------------------------------------------------------
14
+ -- Entity declaration for rotate_left_with_carry
15
+ -- ------------------------------------------------------------------------------
16
+ entity rotate_left_with_carry is
17
+ port (
18
+ -- Global input signals at CPLD expansion board
19
+
20
+ A_i : in std_logic_vector (4 - 1 downto 0 );
21
+ C_i : in std_logic ;
22
+
23
+
24
+ -- Global output signals at Coolrunner-II board
25
+
26
+ Y_o : out std_logic_vector (4 - 1 downto 0 ) ;
27
+ C_o : out std_logic
28
+ );
29
+ end rotate_left_with_carry ;
30
+
31
+ -- ------------------------------------------------------------------------------
32
+ -- Architecture declaration for rotate_left_with_carry
33
+ -- ------------------------------------------------------------------------------
34
+ architecture Behavioral of rotate_left_with_carry is
35
+
36
+ begin
37
+
38
+
39
+
40
+
41
+ end Behavioral ;
Original file line number Diff line number Diff line change
1
+ -- ------------------------------------------------------------------------------
2
+ -- Brno University of Technology, Department of Radio Electronics
3
+ -- ------------------------------------------------------------------------------
4
+ -- Author: Milan hornik
5
+ -- Design: rotate_right
6
+ -- Description: Implementation of >>
7
+ -- ------------------------------------------------------------------------------
8
+ -- ------------------------------------------------------------------------------
9
+
10
+ library ieee;
11
+ use ieee.std_logic_1164.all ;
12
+
13
+ -- ------------------------------------------------------------------------------
14
+ -- Entity declaration for rotate_right
15
+ -- ------------------------------------------------------------------------------
16
+ entity rotate_right is
17
+ port (
18
+ -- Global input signals at CPLD expansion board
19
+
20
+ A_i : in std_logic_vector (4 - 1 downto 0 );
21
+ C_i : in std_logic ;
22
+
23
+
24
+ -- Global output signals at Coolrunner-II board
25
+
26
+ Y_o : out std_logic_vector (4 - 1 downto 0 ) ;
27
+ C_o : out std_logic
28
+ );
29
+ end rotate_right ;
30
+
31
+ -- ------------------------------------------------------------------------------
32
+ -- Architecture declaration for rotate_right
33
+ -- ------------------------------------------------------------------------------
34
+ architecture Behavioral of rotate_right is
35
+
36
+ begin
37
+
38
+
39
+
40
+
41
+ end Behavioral ;
Original file line number Diff line number Diff line change
1
+ -- ------------------------------------------------------------------------------
2
+ -- Brno University of Technology, Department of Radio Electronics
3
+ -- ------------------------------------------------------------------------------
4
+ -- Author: Milan hornik
5
+ -- Design: rotate_right_with_carry
6
+ -- Description: Implementation of >>
7
+ -- ------------------------------------------------------------------------------
8
+ -- ------------------------------------------------------------------------------
9
+
10
+ library ieee;
11
+ use ieee.std_logic_1164.all ;
12
+
13
+ -- ------------------------------------------------------------------------------
14
+ -- Entity declaration for rotate_right_with_carry
15
+ -- ------------------------------------------------------------------------------
16
+ entity rotate_right_with_carry is
17
+ port (
18
+ -- Global input signals at CPLD expansion board
19
+
20
+ A_i : in std_logic_vector (4 - 1 downto 0 );
21
+ C_i : in std_logic ;
22
+
23
+
24
+ -- Global output signals at Coolrunner-II board
25
+
26
+ Y_o : out std_logic_vector (4 - 1 downto 0 ) ;
27
+ C_o : out std_logic
28
+ );
29
+ end rotate_right_with_carry ;
30
+
31
+ -- ------------------------------------------------------------------------------
32
+ -- Architecture declaration for rotate_right_with_carry
33
+ -- ------------------------------------------------------------------------------
34
+ architecture Behavioral of rotate_right_with_carry is
35
+
36
+ begin
37
+
38
+
39
+
40
+
41
+ end Behavioral ;
You can’t perform that action at this time.
0 commit comments