1 |
2 |
trueno |
-------------------------------------------------------------------------------
|
2 |
|
|
-- This file contains the code for the "wait states" of the input. It is also
|
3 |
|
|
-- one of the three main blocks of the generator.
|
4 |
|
|
-------------------------------------------------------------------------------
|
5 |
|
|
|
6 |
|
|
library IEEE;
|
7 |
|
|
use IEEE.std_logic_1164.all;
|
8 |
|
|
|
9 |
|
|
entity input_wait is port (
|
10 |
|
|
phi1 : in std_logic; -- Two phase discipline
|
11 |
|
|
phi2 : in std_logic;
|
12 |
|
|
reset : in std_logic; -- #RESET
|
13 |
|
|
input : in std_logic_vector(15 downto 0);
|
14 |
|
|
-- The serial/parallel conversion has
|
15 |
|
|
-- been made somewhere else
|
16 |
|
|
output : out std_logic_vector(15 downto 0));
|
17 |
|
|
|
18 |
|
|
end input_wait;
|
19 |
|
|
|
20 |
|
|
architecture structural of input_wait is
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
component input_phi1_register
|
24 |
|
|
port (
|
25 |
|
|
reset : in std_logic; -- #RESET
|
26 |
|
|
phi1 : in std_logic; -- Clock
|
27 |
|
|
input : in std_logic_vector(15 downto 0);
|
28 |
|
|
output : out std_logic_vector(15 downto 0));
|
29 |
|
|
end component;
|
30 |
|
|
|
31 |
|
|
component input_phi2_register
|
32 |
|
|
port (
|
33 |
|
|
reset : in std_logic; -- #RESET
|
34 |
|
|
phi2 : in std_logic; -- Clock
|
35 |
|
|
input : in std_logic_vector(15 downto 0);
|
36 |
|
|
output : out std_logic_vector(15 downto 0));
|
37 |
|
|
end component;
|
38 |
|
|
|
39 |
|
|
signal btw1and2 : std_logic_vector(15 downto 0);
|
40 |
|
|
signal btw2and3 : std_logic_vector(15 downto 0);
|
41 |
|
|
signal btw3and4 : std_logic_vector(15 downto 0);
|
42 |
|
|
signal btw4and5 : std_logic_vector(15 downto 0);
|
43 |
|
|
signal btw5and6 : std_logic_vector(15 downto 0);
|
44 |
|
|
signal btw6and7 : std_logic_vector(15 downto 0);
|
45 |
|
|
signal btw7and8 : std_logic_vector(15 downto 0);
|
46 |
|
|
signal btw8and9 : std_logic_vector(15 downto 0);
|
47 |
|
|
signal btw9and10 : std_logic_vector(15 downto 0);
|
48 |
|
|
-- signal btw10and11 : std_logic_vector(15 downto 0);
|
49 |
|
|
-- signal btw11and12 : std_logic_vector(15 downto 0);
|
50 |
|
|
|
51 |
|
|
begin -- structural
|
52 |
|
|
|
53 |
|
|
Input1: input_phi2_register port map (reset => reset, phi2 => phi2,
|
54 |
|
|
input => input, output => btw1and2);
|
55 |
|
|
|
56 |
|
|
Input2: input_phi1_register port map (reset => reset, phi1 => phi1,
|
57 |
|
|
input => btw1and2, output => btw2and3);
|
58 |
|
|
|
59 |
|
|
Input3: input_phi2_register port map (reset => reset, phi2 => phi2,
|
60 |
|
|
input => btw2and3, output => btw3and4);
|
61 |
|
|
|
62 |
|
|
Input4: input_phi1_register port map (reset => reset, phi1 => phi1,
|
63 |
|
|
input => btw3and4, output => btw4and5);
|
64 |
|
|
|
65 |
|
|
Input5: input_phi2_register port map (reset => reset, phi2 => phi2,
|
66 |
|
|
input => btw4and5, output => btw5and6);
|
67 |
|
|
|
68 |
|
|
Input6: input_phi1_register port map (reset => reset, phi1 => phi1,
|
69 |
|
|
input => btw5and6, output => btw6and7);
|
70 |
|
|
|
71 |
|
|
Input7: input_phi2_register port map (reset => reset, phi2 => phi2,
|
72 |
|
|
input => btw6and7, output => btw7and8);
|
73 |
|
|
|
74 |
|
|
Input8: input_phi1_register port map (reset => reset, phi1 => phi1,
|
75 |
|
|
input => btw7and8, output => btw8and9);
|
76 |
|
|
|
77 |
|
|
Input9: input_phi2_register port map (reset => reset, phi2 => phi2,
|
78 |
|
|
input => btw8and9, output => btw9and10);
|
79 |
|
|
|
80 |
|
|
Input10: input_phi1_register port map (reset => reset, phi1 => phi1,
|
81 |
|
|
input => btw9and10, output => output);
|
82 |
|
|
|
83 |
|
|
-- Input11: input_phi2_register port map (reset => reset, phi2 => phi2,
|
84 |
|
|
-- input => btw10and11, output => btw11and12);
|
85 |
|
|
|
86 |
|
|
-- Input12: input_phi1_register port map (reset => reset, phi1 => phi1,
|
87 |
|
|
-- input => btw11and12, output => output);
|
88 |
|
|
|
89 |
|
|
end structural;
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
configuration cfg_input_wait_structural of input_wait is
|
93 |
|
|
|
94 |
|
|
for structural
|
95 |
|
|
for Input1 : input_phi2_register
|
96 |
|
|
use entity work.input_phi2_register(behavior);
|
97 |
|
|
end for;
|
98 |
|
|
|
99 |
|
|
for Input2 : input_phi1_register
|
100 |
|
|
use entity work.input_phi1_register(behavior);
|
101 |
|
|
end for;
|
102 |
|
|
|
103 |
|
|
for Input3 : input_phi2_register
|
104 |
|
|
use entity work.input_phi2_register(behavior);
|
105 |
|
|
end for;
|
106 |
|
|
|
107 |
|
|
for Input4 : input_phi1_register
|
108 |
|
|
use entity work.input_phi1_register(behavior);
|
109 |
|
|
end for;
|
110 |
|
|
|
111 |
|
|
for Input5 : input_phi2_register
|
112 |
|
|
use entity work.input_phi2_register(behavior);
|
113 |
|
|
end for;
|
114 |
|
|
|
115 |
|
|
for Input6 : input_phi1_register
|
116 |
|
|
use entity work.input_phi1_register(behavior);
|
117 |
|
|
end for;
|
118 |
|
|
|
119 |
|
|
for Input7 : input_phi2_register
|
120 |
|
|
use entity work.input_phi2_register(behavior);
|
121 |
|
|
end for;
|
122 |
|
|
|
123 |
|
|
for Input8 : input_phi1_register
|
124 |
|
|
use entity work.input_phi1_register(behavior);
|
125 |
|
|
end for;
|
126 |
|
|
|
127 |
|
|
for Input9 : input_phi2_register
|
128 |
|
|
use entity work.input_phi2_register(behavior);
|
129 |
|
|
end for;
|
130 |
|
|
|
131 |
|
|
for Input10 : input_phi1_register
|
132 |
|
|
use entity work.input_phi1_register(behavior);
|
133 |
|
|
end for;
|
134 |
|
|
|
135 |
|
|
-- for Input11 : input_phi2_register
|
136 |
|
|
-- use entity work.input_phi2_register(behavior);
|
137 |
|
|
-- end for;
|
138 |
|
|
|
139 |
|
|
-- for Input12 : input_phi1_register
|
140 |
|
|
-- use entity work.input_phi1_register(behavior);
|
141 |
|
|
-- end for;
|
142 |
|
|
|
143 |
|
|
end for;
|
144 |
|
|
|
145 |
|
|
end cfg_input_wait_structural;
|