OpenCores
URL https://opencores.org/ocsvn/fast-crc/fast-crc/trunk

Subversion Repositories fast-crc

[/] [fast-crc/] [trunk/] [vhdl/] [input_registers.vhd] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trueno
library IEEE;
2
use IEEE.std_logic_1164.all;
3
use ieee.std_logic_arith.all;
4
use ieee.std_logic_unsigned.all;
5
 
6
-------------------------------------------------------------------------------
7
-- We first describe the entities of the two types of registers used in the
8
-- pipelining.
9
 
10
entity input_phi1_register is
11
 
12
  port (
13
    reset  : in  std_logic;
14
    phi1   : in  std_logic;
15
    input  : in  std_logic_vector(15 downto 0);
16
    output : out std_logic_vector(15 downto 0));
17
 
18
end input_phi1_register;
19
 
20
architecture behavior of input_phi1_register is
21
 
22
begin  -- behavior
23
 
24
  -- purpose: Pipelining register activated by phi1
25
  -- type   : sequential
26
  -- inputs : phi1, reset, input (16 bits)
27
  -- outputs: output (16 bits)
28
  p_input_phi1_register : process (phi1, reset)
29
  begin  -- process
30
    if reset = '0' then                 -- asynchronous reset (active low)
31
      output <= (others => '0');
32
    elsif phi1'event and phi1 = '1' then  -- rising clock edge
33
      output <= input;
34
    end if;
35
  end process;
36
 
37
end behavior;
38
 
39
-------------------------------------------------------------------------------
40
 
41
library IEEE;
42
use IEEE.std_logic_1164.all;
43
 
44
 
45
entity input_phi2_register is
46
 
47
  port (
48
    reset  : in  std_logic;
49
    phi2   : in  std_logic;
50
    input  : in  std_logic_vector(15 downto 0);
51
    output : out std_logic_vector(15 downto 0));
52
 
53
end input_phi2_register;
54
 
55
architecture behavior of input_phi2_register is
56
 
57
begin  -- behavior
58
 
59
  -- purpose: Pipelining register activated by phi2
60
  -- type   : sequential
61
  -- inputs : phi2, reset, input (16 bits)
62
  -- outputs: output (16 bits)
63
  p_input_phi2_register: process (phi2, reset)
64
  begin  -- process p_input_phi2_register
65
    if reset = '0' then                 -- asynchronous reset (active low)
66
      output <= (others => '0');
67
    elsif phi2'event and phi2 = '1' then  -- rising clock edge
68
      output <= input;
69
    end if;
70
  end process p_input_phi2_register;
71
 
72
end behavior;
73
 
74
 
75
 
76
 
77
 
78
 

powered by: WebSVN 2.1.0

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