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

Subversion Repositories the_wizardry_project

[/] [the_wizardry_project/] [trunk/] [Wizardry/] [VHDL/] [Wizardry Top Level/] [Address Generation/] [NIDS Components/] [EmPAC/] [new_assembler.vhd] - Blame information for rev 19

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 mcwaccent
----------------------------------------------------------------------------------
2
--
3
--  This file is a part of Technica Corporation Wizardry Project
4
--
5
--  Copyright (C) 2004-2009, Technica Corporation  
6
--
7
--  This program is free software: you can redistribute it and/or modify
8
--  it under the terms of the GNU General Public License as published by
9
--  the Free Software Foundation, either version 3 of the License, or
10
--  (at your option) any later version.
11
--
12
--  This program is distributed in the hope that it will be useful,
13
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
--  GNU General Public License for more details.
16
--
17
--  You should have received a copy of the GNU General Public License
18
--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
--
20
----------------------------------------------------------------------------------
21
----------------------------------------------------------------------------------
22
-- Module Name: new_assembler - Behavioral 
23
-- Project Name: Wizardry
24
-- Target Devices: Virtex 4 ML401
25
-- Description: The assembler combines 8-bit phy data to 32-bit phy data for other 
26
-- components to further process.
27
-- Revision: 1.0
28
-- Additional Comments: 
29
--
30
----------------------------------------------------------------------------------
31
library IEEE;
32
use IEEE.STD_LOGIC_1164.ALL;
33
use IEEE.STD_LOGIC_ARITH.ALL;
34
use IEEE.STD_LOGIC_UNSIGNED.ALL;
35
 
36
entity new_assembler is
37
    Port ( clock : in  STD_LOGIC;
38
--           reset : in  STD_LOGIC;
39
           phy_data : in  STD_LOGIC_VECTOR (7 downto 0);
40
           phy_data_valid : in  STD_LOGIC;
41
           field_data_early : out  STD_LOGIC_VECTOR (31 downto 0);
42
                          valid : out std_logic
43
                          );
44
end new_assembler;
45
 
46
architecture Behavioral of new_assembler is
47
 
48
signal q3 : std_logic_vector(7 downto 0) := X"00";
49
signal q2 : std_logic_vector(7 downto 0) := X"00";
50
signal q1 : std_logic_vector(7 downto 0) := X"00";
51
signal q0 : std_logic_vector(7 downto 0) := X"00";
52
--signal q4 : std_logic_vector(7 downto 0);
53
signal valid3 : std_logic := '0';
54
signal valid2 : std_logic := '0';
55
signal valid1 : std_logic := '0';
56
signal valid0 : std_logic := '0';
57
--signal valid4 : std_logic;
58
signal field_data_early_s : STD_LOGIC_VECTOR (31 downto 0) := X"00000000";
59
 
60
begin
61
field_data_early <= field_data_early_s;
62
process(clock)
63
begin
64
        if rising_Edge(clock) then
65
                field_data_early_s <= field_data_early_s(23 downto 0) & q0;
66
        end if;
67
end process;
68
 
69
process(clock)
70
begin
71
        if rising_Edge(clock) then
72
                valid <= valid0;
73
        end if;
74
end process;
75
 
76
 
77
process(clock)
78
begin
79
        if rising_edge(clock) then
80
                q3 <= phy_data;
81
        end if;
82
end process;
83
 
84
process(clock)
85
begin
86
        if rising_edge(clock) then
87
                valid3 <= phy_data_valid;
88
        end if;
89
end process;
90
 
91
process(clock)
92
begin
93
        if rising_edge(clock) then
94
                q2 <= q3;
95
        end if;
96
end process;
97
 
98
process(clock)
99
begin
100
        if rising_Edge(clock) then
101
                valid2 <= valid3;
102
        end if;
103
end process;
104
 
105
process(clock)
106
begin
107
        if rising_edge(clock) then
108
                q1 <= q2;
109
        end if;
110
end process;
111
 
112
process(clock)
113
begin
114
        if rising_Edge(clock) then
115
                valid1 <= valid2;
116
        end if;
117
end process;
118
 
119
process(clock)
120
begin
121
        if rising_edge(clock) then
122
                q0 <= q1;
123
        end if;
124
end process;
125
 
126
process(clock)
127
begin
128
        if rising_Edge(clock) then
129
                valid0 <= valid1;
130
        end if;
131
end process;
132
 
133
end Behavioral;
134
 

powered by: WebSVN 2.1.0

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