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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [assembling_unit.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 eejlny
--This library is free software; you can redistribute it and/or
2
--modify it under the terms of the GNU Lesser General Public
3
--License as published by the Free Software Foundation; either
4
--version 2.1 of the License, or (at your option) any later version.
5
 
6
--This library is distributed in the hope that it will be useful,
7
--but WITHOUT ANY WARRANTY; without even the implied warranty of
8
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9
--Lesser General Public License for more details.
10
 
11
--You should have received a copy of the GNU Lesser General Public
12
--License along with this library; if not, write to the Free Software
13
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
14
 
15
-- e_mail : j.l.nunez-yanez@byacom.co.uk
16
 
17
---------------------------------------------
18
--  ENTITY       = ASSEMBLING_UNIT            --
19
--  version      = 1.0                     --
20
--  last update  = 30/05/01                --
21
--  author       = Jose Nunez              --
22
---------------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- The assembling unit assembles the output uncompressed data in words of 32 bits
27
 
28
--  PIN LIST
29
 
30
--  ENABLE = asssembling unit active
31
--  DATA_IN_32  = data to be assemble from the decompression engine
32
--  MASK = 4 bit indicating how many bytes of the 32 are valid
33
--  DATA_OUT_32  = output data to the output buffer
34
--  WRITE    =  data ready to be written in the output buffer
35
--  CLEAR    = asynchronous clear
36
--  CLK      = master clock
37
 
38
 
39
library ieee;
40
use ieee.std_logic_1164.all;
41
 
42
entity ASSEMBLING_UNIT is
43
port
44
(
45
        ENABLE: in bit;
46
        DATA_IN_32 : in bit_vector(31 downto 0);
47
        CLEAR : in bit ;
48
        RESET : in bit;
49
        CLK : in bit ;
50
        MASK : in bit_vector(3 downto 0);
51
        WRITE : out bit;
52
        DATA_OUT_32: out bit_vector(31 downto 0)
53
);
54
 
55
end ASSEMBLING_UNIT;
56
 
57
 
58
architecture STRUCTURAL of ASSEMBLING_UNIT is
59
 
60
 
61
component ASSEMBLER_REGISTER
62
port (
63
          WRITE_IN : in bit;
64
          DATA_IN : in bit_vector(55 downto 0);
65
          LENGTH_IN : in bit_vector(2 downto 0);
66
          CLK : in bit;
67
          CLEAR : in bit;
68
          RESET : in bit;
69
          ENABLE : in bit;
70
          WRITE_OUT : out bit;
71
          DATA_OUT : out bit_vector(55 downto 0);
72
          LENGTH_OUT: out bit_vector(2 downto 0)
73
         );
74
end component;
75
 
76
 
77
component ASSEMBLER
78
port (
79
          ENABLE : in bit;
80
          DATA_IN : in bit_vector(31 downto 0);
81
          MASK_IN : in bit_vector(3 downto 0);
82
          DATA_OLD : in bit_vector(55 downto 0);
83
          LENGTH_OLD : in bit_vector(2 downto 0);
84
          DATA_NEW : out bit_vector(55 downto 0);
85
          LENGTH_NEW : out bit_vector(2 downto 0);
86
          WRITE : out bit
87
         );
88
end component;
89
 
90
signal DATA_NEW, DATA_OLD : bit_vector(55 downto 0);
91
signal LENGTH_NEW, LENGTH_OLD : bit_vector(2 downto 0);
92
signal WRITE_AUX : bit;
93
signal WRITE_INT: bit;
94
 
95
begin
96
 
97
 
98
 
99
ASSEMBLER_REGISTER_1 : ASSEMBLER_REGISTER
100
port map (
101
          WRITE_IN => WRITE_AUX,
102
          DATA_IN => DATA_NEW,
103
          LENGTH_IN => LENGTH_NEW,
104
          CLK => CLK,
105
          CLEAR => CLEAR,
106
          RESET => RESET,
107
          ENABLE => ENABLE,
108
          WRITE_OUT => WRITE_INT,
109
          DATA_OUT => DATA_OLD,
110
          LENGTH_OUT => LENGTH_OLD
111
         );
112
 
113
ASSEMBLER_1 : ASSEMBLER
114
port map(
115
          ENABLE => ENABLE,
116
          DATA_IN => DATA_IN_32,
117
          MASK_IN => MASK,
118
          DATA_OLD => DATA_OLD,
119
          LENGTH_OLD => LENGTH_OLD,
120
          DATA_NEW => DATA_NEW,
121
          LENGTH_NEW => LENGTH_NEW,
122
          WRITE => WRITE_AUX
123
         );
124
 
125
DATA_OUT_32 <= DATA_OLD(55 downto 24);
126
WRITE <= WRITE_INT;
127
 
128
end STRUCTURAL;

powered by: WebSVN 2.1.0

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