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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.hwp.accelerator/] [dctqidct/] [1.0/] [hdl/] [common_da/] [Elements_to_column.vhd] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
------------------------------------------------------------------------------
2
-- Author               : Timo Alho
3
-- e-mail               : timo.a.alho@tut.fi
4
-- Date                 : 15.06.2004 18:53:38
5
-- File                 : Elements_to_column.vhd
6
-- Design               : VHDL Entity DCT_RC_DA.Elements_to_column.rtl
7
------------------------------------------------------------------------------
8
-- Description  : Serial to parallel converter.
9
------------------------------------------------------------------------------
10
LIBRARY ieee;
11
USE ieee.std_logic_1164.ALL;
12
USE ieee.std_logic_arith.ALL;
13
 
14
ENTITY Elements_to_column IS
15
   GENERIC(
16
      dataw_g : integer := 18
17
   );
18
   PORT(
19
      clk        : IN     std_logic;
20
      --serial input
21
      d_in       : IN     std_logic_vector (dataw_g-1 DOWNTO 0);
22
      --'1' serial input is loaded into shiftregister
23
      load       : IN     std_logic;
24
      rst_n      : IN     std_logic;
25
      --parallel output
26
      column_out : OUT    std_logic_vector (8*dataw_g-1 DOWNTO 0)
27
   );
28
 
29
-- Declarations
30
 
31
END Elements_to_column ;
32
 
33
--
34
ARCHITECTURE rtl OF Elements_to_column IS
35
  SIGNAL shiftreg_r : std_logic_vector(8*dataw_g-1 DOWNTO 0);
36
BEGIN
37
 
38
  -- purpose: loads and shifts data
39
  -- type   : sequential
40
  -- inputs : clk, rst_n
41
  -- outputs: 
42
  clocked      : PROCESS (clk, rst_n)
43
    VARIABLE i : integer;
44
  BEGIN  -- PROCESS clocked
45
    IF rst_n = '0' THEN                 -- asynchronous reset (active low)
46
      shiftreg_r <= (OTHERS => '0');
47
 
48
    ELSIF clk'event AND clk = '1' THEN  -- rising clock edge
49
      IF (load = '1') THEN
50
        FOR i IN 0 TO 6 LOOP
51
          shiftreg_r((i+1)*dataw_g-1 DOWNTO i*dataw_g) <= shiftreg_r((i+2)*dataw_g-1 DOWNTO (i+1)*dataw_g);
52
        END LOOP;  -- i
53
 
54
        shiftreg_r(8*dataw_g-1 DOWNTO 7*dataw_g) <= d_in;
55
      END IF;
56
    END IF;
57
  END PROCESS clocked;
58
 
59
  column_out <= shiftreg_r;
60
END rtl;
61
 

powered by: WebSVN 2.1.0

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