OpenCores
URL https://opencores.org/ocsvn/parallel_search_for_maximum_weight/parallel_search_for_maximum_weight/trunk

Subversion Repositories parallel_search_for_maximum_weight

[/] [parallel_search_for_maximum_weight/] [trunk/] [src/] [mux_sel.vhd] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 atalla
library ieee;
2
use ieee.std_logic_1164.all;
3
use work.basic_size.all;
4
use work.basic_component.all;
5
entity mux_sel is
6
GENERIC (level:INTEGER:=1; Cell_count:INTEGER:=width);
7
port(
8
        left_op:        in std_logic_vector(Cell_count-1 downto 0 );
9
        right_op:       in std_logic_vector(Cell_count-1  downto 0 );
10
        o:      out std_logic_vector(Cell_count-1 downto 0 )
11
);
12
end mux_sel;
13
architecture behav of mux_sel  is
14
 
15
 
16
SIGNAL choose_res :  STD_LOGIC_VECTOR(Cell_count-1 downto 0);
17
SIGNAL choose_cur :  STD_LOGIC_VECTOR(Cell_count-1 downto 0);
18
SIGNAL found_cur :  STD_LOGIC_VECTOR(Cell_count-1 downto 0);
19
SIGNAL choose_prev :  STD_LOGIC_VECTOR(Cell_count-1 downto 0);
20
SIGNAL found_prev : STD_LOGIC_VECTOR(Cell_count-1 downto 0);
21
begin
22
 
23
----------------------------------
24
ripple_part_inst: Ripple
25
GENERIC MAP(cells  => Cell_count)
26
PORT MAP(left_op   =>left_op (Cell_count-1 downto 0 ),
27
                 right_op  =>right_op(Cell_count-1 downto 0 ),
28
                 choose_cur=>choose_prev(Cell_count-1),
29
                 found_cur=>found_prev(Cell_count-1),
30
                 choose_sel=>choose_res(Cell_count-1 downto 0 )
31
                );
32
ripple_part_Res_inst : Result
33
GENERIC MAP(Cell_count => Cell_count)
34
PORT MAP(i1  =>                 left_op   (Cell_count-1 downto 0 ),
35
                 i2  =>                 right_op  (Cell_count-1 downto 0 ),
36
                 choose_sel =>  choose_res(Cell_count-1 downto 0 ),
37
                 o=>o(Cell_count-1 downto 0)
38
                );
39
----------------------------------
40
end behav;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.