@@ -142,8 +142,6 resetn_pad : inpad generic map (tech => | |||||
142 | port map (lclk, lclk, clkm, open, open, sdclkl, open, cgi, cgo,open,open); |
|
142 | port map (lclk, lclk, clkm, open, open, sdclkl, open, cgi, cgo,open,open); | |
143 |
|
143 | |||
144 |
|
144 | |||
145 |
|
||||
146 |
|
||||
147 | DAC0 : entity work.beagleSigGen |
|
145 | DAC0 : entity work.beagleSigGen | |
148 | generic map( |
|
146 | generic map( | |
149 | memtech, |
|
147 | memtech, | |
@@ -159,15 +157,16 DAC0 : entity work.beagleSigGen | |||||
159 | address => GPMC_SLAVE_ADDRESS(3 downto 1), |
|
157 | address => GPMC_SLAVE_ADDRESS(3 downto 1), | |
160 | DATA => GPMC_SLAVE_DATA, |
|
158 | DATA => GPMC_SLAVE_DATA, | |
161 | WEN => GPMC_SLAVE_WEN, |
|
159 | WEN => GPMC_SLAVE_WEN, | |
162 |
REN_debug => |
|
160 | REN_debug => open, | |
163 | FIFO_FULL => GPMC_SLAVE_STATUS(7 downto 0), |
|
161 | FIFO_FULL => GPMC_SLAVE_STATUS(7 downto 0), | |
164 | FIFO_EMPTY => GPMC_SLAVE_STATUS(15 downto 8) |
|
162 | FIFO_EMPTY => GPMC_SLAVE_STATUS(15 downto 8) | |
165 | ); |
|
163 | ); | |
166 |
|
164 | |||
167 |
|
165 | |||
168 |
|
166 | |||
169 |
LED(0) <= GPMC_SLAVE_ |
|
167 | --LED(0) <= GPMC_SLAVE_ADDRESS(1); | |
170 |
|
|
168 | --LED(1) <= GPMC_SLAVE_ADDRESS(2); | |
|
169 | LED(2) <= GPMC_SLAVE_WEN; | |||
171 |
|
170 | |||
172 | gpmc_clk_pad : clkpad GENERIC MAP (tech => padtech) PORT MAP (GPMC_CLK_MUX0, gpmc_clk); |
|
171 | gpmc_clk_pad : clkpad GENERIC MAP (tech => padtech) PORT MAP (GPMC_CLK_MUX0, gpmc_clk); | |
173 | GPMCS0: entity work.GPMC_SLAVE |
|
172 | GPMCS0: entity work.GPMC_SLAVE | |
@@ -179,6 +178,8 GPMCS0: entity work.GPMC_SLAVE | |||||
179 | DATA => GPMC_SLAVE_DATA, |
|
178 | DATA => GPMC_SLAVE_DATA, | |
180 | ADDRESS => GPMC_SLAVE_ADDRESS, |
|
179 | ADDRESS => GPMC_SLAVE_ADDRESS, | |
181 | WEN => GPMC_SLAVE_WEN, |
|
180 | WEN => GPMC_SLAVE_WEN, | |
|
181 | SMP_CKL => LED(0), | |||
|
182 | SMP_WEN => LED(1), | |||
182 | GPMC_AD => GPMC_AD, |
|
183 | GPMC_AD => GPMC_AD, | |
183 | GPMC_A => GPMC_A, |
|
184 | GPMC_A => GPMC_A, | |
184 | GPMC_CLK => gpmc_clk, |
|
185 | GPMC_CLK => gpmc_clk, |
@@ -39,6 +39,8 entity GPMC_SLAVE is | |||||
39 | DATA : out STD_LOGIC_VECTOR(15 downto 0); |
|
39 | DATA : out STD_LOGIC_VECTOR(15 downto 0); | |
40 | ADDRESS : out std_logic_vector(19 downto 0); |
|
40 | ADDRESS : out std_logic_vector(19 downto 0); | |
41 | WEN : out STD_LOGIC; |
|
41 | WEN : out STD_LOGIC; | |
|
42 | SMP_CKL : out STD_LOGIC; | |||
|
43 | SMP_WEN : out STD_LOGIC; | |||
42 | GPMC_AD : inout std_logic_vector(15 downto 0); |
|
44 | GPMC_AD : inout std_logic_vector(15 downto 0); | |
43 | GPMC_A : in std_logic_vector(19 downto 0); |
|
45 | GPMC_A : in std_logic_vector(19 downto 0); | |
44 | GPMC_CLK : in std_logic; |
|
46 | GPMC_CLK : in std_logic; | |
@@ -55,12 +57,20 end GPMC_SLAVE; | |||||
55 |
|
57 | |||
56 | architecture Behavioral of GPMC_SLAVE is |
|
58 | architecture Behavioral of GPMC_SLAVE is | |
57 |
|
59 | |||
58 | signal data_out : std_logic_vector(15 downto 0) := (others => '0'); |
|
60 | signal data_out : std_logic_vector(15 downto 0) := (others => '0'); | |
59 | signal data_in : std_logic_vector(15 downto 0) := (others => '0'); |
|
61 | signal data_in : std_logic_vector(15 downto 0) := (others => '0'); | |
|
62 | signal data_in_reg0 : std_logic_vector(15 downto 0) := (others => '0'); | |||
|
63 | signal data_in_reg1 : std_logic_vector(15 downto 0) := (others => '0'); | |||
|
64 | signal data_in_reg2 : std_logic_vector(15 downto 0) := (others => '0'); | |||
|
65 | signal address_reg0 : std_logic_vector(19 downto 0) := (others => '0'); | |||
|
66 | signal address_reg1 : std_logic_vector(19 downto 0) := (others => '0'); | |||
|
67 | signal address_reg2 : std_logic_vector(19 downto 0) := (others => '0'); | |||
|
68 | signal ADVN_ALE_reg : std_logic_vector(3 downto 0) := (others => '0'); | |||
|
69 | ||||
60 |
|
70 | |||
61 | signal GPMC_CLK_reg : std_logic_vector(3 downto 0) := (others => '0'); |
|
71 | signal GPMC_CLK_reg : std_logic_vector(3 downto 0) := (others => '0'); | |
62 | signal data_r : std_logic_vector(15 downto 0) := (others => '0'); |
|
72 | signal data_r : std_logic_vector(15 downto 0) := (others => '0'); | |
63 |
|
73 | signal GPMC_WEN_reg : std_logic_vector(3 downto 0) := (others => '0'); | ||
64 |
|
74 | |||
65 | signal outen : std_logic := '0'; |
|
75 | signal outen : std_logic := '0'; | |
66 |
|
76 | |||
@@ -79,29 +89,59 port map ( | |||||
79 | ); |
|
89 | ); | |
80 |
|
90 | |||
81 | GPMC_WAIT0 <= '1'; |
|
91 | GPMC_WAIT0 <= '1'; | |
|
92 | SMP_CKL <= GPMC_CLK_reg(0); | |||
|
93 | SMP_WEN <= GPMC_WEN_reg(2); | |||
82 |
|
94 | |||
|
95 | process(reset,clk) | |||
|
96 | begin | |||
|
97 | if reset = '0' then | |||
|
98 | GPMC_CLK_reg <= "0000"; | |||
|
99 | ADDRESS <= (others => '0'); | |||
|
100 | ADVN_ALE_reg <= (others => '0'); | |||
|
101 | address_reg0 <= (others => '0'); | |||
|
102 | address_reg1 <= (others => '0'); | |||
|
103 | address_reg2 <= (others => '0'); | |||
|
104 | elsif clk'event and clk = '1' then | |||
|
105 | GPMC_CLK_reg(0) <= GPMC_CLK; | |||
|
106 | GPMC_CLK_reg(1) <= GPMC_CLK_reg(0); | |||
|
107 | GPMC_CLK_reg(2) <= GPMC_CLK_reg(1); | |||
|
108 | ADVN_ALE_reg(0) <= GPMC_ADVN_ALE; | |||
|
109 | ADVN_ALE_reg(1) <= ADVN_ALE_reg(0); | |||
|
110 | ADVN_ALE_reg(2) <= ADVN_ALE_reg(1); | |||
|
111 | address_reg0 <= GPMC_A; | |||
|
112 | address_reg1 <= address_reg0; | |||
|
113 | address_reg2 <= address_reg1; | |||
|
114 | if GPMC_CLK_reg(1) = '1' and GPMC_CLK_reg(2) = '0' then | |||
|
115 | if ADVN_ALE_reg(2) = '0' then | |||
|
116 | ADDRESS <= address_reg2; | |||
|
117 | end if; | |||
|
118 | end if; | |||
|
119 | ||||
|
120 | end if; | |||
|
121 | end process; | |||
83 |
|
122 | |||
84 |
|
123 | |||
85 | process(reset,clk) |
|
124 | process(reset,clk) | |
86 | begin |
|
125 | begin | |
87 | if reset = '0' then |
|
126 | if reset = '0' then | |
88 | WEN <= '1'; |
|
127 | WEN <= '1'; | |
89 |
GPMC_ |
|
128 | GPMC_WEN_reg <= "0000"; | |
90 |
|
|
129 | data_in_reg0 <= (others => '0'); | |
|
130 | data_in_reg1 <= (others => '0'); | |||
|
131 | data_in_reg2 <= (others => '0'); | |||
91 | elsif clk'event and clk = '1' then |
|
132 | elsif clk'event and clk = '1' then | |
92 |
GPMC_ |
|
133 | GPMC_WEN_reg(0) <= GPMC_WEN; | |
93 | if GPMC_CLK = '0' and GPMC_CLK_reg(0) = '1' then |
|
134 | GPMC_WEN_reg(1) <= GPMC_WEN_reg(0); | |
94 | if GPMC_WEN = '0' then |
|
135 | GPMC_WEN_reg(2) <= GPMC_WEN_reg(1); | |
95 | WEN <= '0'; |
|
136 | data_in_reg0 <= data_in; | |
96 | DATA <= data_in; |
|
137 | data_in_reg1 <= data_in_reg0; | |
97 | end if; |
|
138 | data_in_reg2 <= data_in_reg1; | |
98 | if GPMC_ADVN_ALE = '0' then |
|
139 | if GPMC_WEN_reg(2) = '1' and GPMC_WEN_reg(1) = '0' then | |
99 | ADDRESS <= GPMC_A; |
|
140 | WEN <= '0'; | |
100 | end if; |
|
141 | DATA <= data_in_reg2; | |
101 | else |
|
142 | else | |
102 |
|
|
143 | WEN <= '1'; | |
103 | end if; |
|
144 | end if; | |
104 |
|
||||
105 | end if; |
|
145 | end if; | |
106 | end process; |
|
146 | end process; | |
107 |
|
147 |
@@ -75,174 +75,174 begin | |||||
75 | FIFO_FULL <= FIFO_FULL_net; |
|
75 | FIFO_FULL <= FIFO_FULL_net; | |
76 | FIFO_EMPTY <= FIFO_EMPTY_net; |
|
76 | FIFO_EMPTY <= FIFO_EMPTY_net; | |
77 |
|
77 | |||
78 |
|
|
78 | fron_fifo1: lpp_fifo | |
79 |
|
|
79 | generic map( | |
80 |
|
|
80 | tech => memtech, | |
81 |
|
|
81 | Mem_use => 1, --use RAM not CELS | |
82 |
|
|
82 | DataSz => 16, | |
83 |
|
|
83 | AddrSz => 8 | |
84 |
|
|
84 | ) | |
85 |
|
|
85 | port map( | |
86 |
|
|
86 | rstn => rstn, | |
87 |
|
|
87 | ReUse => '0', | |
88 |
|
|
88 | rclk => clk, | |
89 |
|
|
89 | ren => FIFO_REN, | |
90 |
|
|
90 | rdata => FIFO_out(0), | |
91 |
|
|
91 | empty => FIFO_EMPTY_net(0), | |
92 |
|
|
92 | raddr => open, | |
93 |
|
|
93 | wclk => clk, | |
94 |
|
|
94 | wen => FIFO_WEN(0), | |
95 |
|
|
95 | wdata => DATA_reg, | |
96 |
|
|
96 | full => FIFO_FULL_net(0), | |
97 |
|
|
97 | waddr => open | |
98 |
|
|
98 | ); | |
99 |
|
|
99 | fron_fifo2: lpp_fifo | |
100 |
|
|
100 | generic map( | |
101 |
|
|
101 | tech => memtech, | |
102 |
|
|
102 | Mem_use => 1, --use RAM not CELS | |
103 |
|
|
103 | DataSz => 16, | |
104 |
|
|
104 | AddrSz => 8 | |
105 |
|
|
105 | ) | |
106 |
|
|
106 | port map( | |
107 |
|
|
107 | rstn => rstn, | |
108 |
|
|
108 | ReUse => '0', | |
109 |
|
|
109 | rclk => clk, | |
110 |
|
|
110 | ren => FIFO_REN, | |
111 |
|
|
111 | rdata => FIFO_out(1), | |
112 |
|
|
112 | empty => FIFO_EMPTY_net(1), | |
113 |
|
|
113 | raddr => open, | |
114 |
|
|
114 | wclk => clk, | |
115 |
|
|
115 | wen => FIFO_WEN(1), | |
116 |
|
|
116 | wdata => DATA_reg, | |
117 |
|
|
117 | full => FIFO_FULL_net(1), | |
118 |
|
|
118 | waddr => open | |
119 |
|
|
119 | ); | |
120 |
|
|
120 | fron_fifo3: lpp_fifo | |
121 |
|
|
121 | generic map( | |
122 |
|
|
122 | tech => memtech, | |
123 |
|
|
123 | Mem_use => 1, --use RAM not CELS | |
124 |
|
|
124 | DataSz => 16, | |
125 |
|
|
125 | AddrSz => 8 | |
126 |
|
|
126 | ) | |
127 |
|
|
127 | port map( | |
128 |
|
|
128 | rstn => rstn, | |
129 |
|
|
129 | ReUse => '0', | |
130 |
|
|
130 | rclk => clk, | |
131 |
|
|
131 | ren => FIFO_REN, | |
132 |
|
|
132 | rdata => FIFO_out(2), | |
133 |
|
|
133 | empty => FIFO_EMPTY_net(2), | |
134 |
|
|
134 | raddr => open, | |
135 |
|
|
135 | wclk => clk, | |
136 |
|
|
136 | wen => FIFO_WEN(2), | |
137 |
|
|
137 | wdata => DATA_reg, | |
138 |
|
|
138 | full => FIFO_FULL_net(2), | |
139 |
|
|
139 | waddr => open | |
140 |
|
|
140 | ); | |
141 |
|
|
141 | fron_fifo4: lpp_fifo | |
142 |
|
|
142 | generic map( | |
143 |
|
|
143 | tech => memtech, | |
144 |
|
|
144 | Mem_use => 1, --use RAM not CELS | |
145 |
|
|
145 | DataSz => 16, | |
146 |
|
|
146 | AddrSz => 8 | |
147 |
|
|
147 | ) | |
148 |
|
|
148 | port map( | |
149 |
|
|
149 | rstn => rstn, | |
150 |
|
|
150 | ReUse => '0', | |
151 |
|
|
151 | rclk => clk, | |
152 |
|
|
152 | ren => FIFO_REN, | |
153 |
|
|
153 | rdata => FIFO_out(3), | |
154 |
|
|
154 | empty => FIFO_EMPTY_net(3), | |
155 |
|
|
155 | raddr => open, | |
156 |
|
|
156 | wclk => clk, | |
157 |
|
|
157 | wen => FIFO_WEN(3), | |
158 |
|
|
158 | wdata => DATA_reg, | |
159 |
|
|
159 | full => FIFO_FULL_net(3), | |
160 |
|
|
160 | waddr => open | |
161 |
|
|
161 | ); | |
162 |
|
|
162 | fron_fifo5: lpp_fifo | |
163 |
|
|
163 | generic map( | |
164 |
|
|
164 | tech => memtech, | |
165 |
|
|
165 | Mem_use => 1, --use RAM not CELS | |
166 |
|
|
166 | DataSz => 16, | |
167 |
|
|
167 | AddrSz => 8 | |
168 |
|
|
168 | ) | |
169 |
|
|
169 | port map( | |
170 |
|
|
170 | rstn => rstn, | |
171 |
|
|
171 | ReUse => '0', | |
172 |
|
|
172 | rclk => clk, | |
173 |
|
|
173 | ren => FIFO_REN, | |
174 |
|
|
174 | rdata => FIFO_out(4), | |
175 |
|
|
175 | empty => FIFO_EMPTY_net(4), | |
176 |
|
|
176 | raddr => open, | |
177 |
|
|
177 | wclk => clk, | |
178 |
|
|
178 | wen => FIFO_WEN(4), | |
179 |
|
|
179 | wdata => DATA_reg, | |
180 |
|
|
180 | full => FIFO_FULL_net(4), | |
181 |
|
|
181 | waddr => open | |
182 |
|
|
182 | ); | |
183 |
|
|
183 | fron_fifo6: lpp_fifo | |
184 |
|
|
184 | generic map( | |
185 |
|
|
185 | tech => memtech, | |
186 |
|
|
186 | Mem_use => 1, --use RAM not CELS | |
187 |
|
|
187 | DataSz => 16, | |
188 |
|
|
188 | AddrSz => 8 | |
189 |
|
|
189 | ) | |
190 |
|
|
190 | port map( | |
191 |
|
|
191 | rstn => rstn, | |
192 |
|
|
192 | ReUse => '0', | |
193 |
|
|
193 | rclk => clk, | |
194 |
|
|
194 | ren => FIFO_REN, | |
195 |
|
|
195 | rdata => FIFO_out(5), | |
196 |
|
|
196 | empty => FIFO_EMPTY_net(5), | |
197 |
|
|
197 | raddr => open, | |
198 |
|
|
198 | wclk => clk, | |
199 |
|
|
199 | wen => FIFO_WEN(5), | |
200 |
|
|
200 | wdata => DATA_reg, | |
201 |
|
|
201 | full => FIFO_FULL_net(5), | |
202 |
|
|
202 | waddr => open | |
203 |
|
|
203 | ); | |
204 |
|
|
204 | fron_fifo7: lpp_fifo | |
205 |
|
|
205 | generic map( | |
206 |
|
|
206 | tech => memtech, | |
207 |
|
|
207 | Mem_use => 1, --use RAM not CELS | |
208 |
|
|
208 | DataSz => 16, | |
209 |
|
|
209 | AddrSz => 8 | |
210 |
|
|
210 | ) | |
211 |
|
|
211 | port map( | |
212 |
|
|
212 | rstn => rstn, | |
213 |
|
|
213 | ReUse => '0', | |
214 |
|
|
214 | rclk => clk, | |
215 |
|
|
215 | ren => FIFO_REN, | |
216 |
|
|
216 | rdata => FIFO_out(6), | |
217 |
|
|
217 | empty => FIFO_EMPTY_net(6), | |
218 |
|
|
218 | raddr => open, | |
219 |
|
|
219 | wclk => clk, | |
220 |
|
|
220 | wen => FIFO_WEN(6), | |
221 |
|
|
221 | wdata => DATA_reg, | |
222 |
|
|
222 | full => FIFO_FULL_net(6), | |
223 |
|
|
223 | waddr => open | |
224 |
|
|
224 | ); | |
225 |
|
|
225 | fron_fifo8: lpp_fifo | |
226 |
|
|
226 | generic map( | |
227 |
|
|
227 | tech => memtech, | |
228 |
|
|
228 | Mem_use => 1, --use RAM not CELS | |
229 |
|
|
229 | DataSz => 16, | |
230 |
|
|
230 | AddrSz => 8 | |
231 |
|
|
231 | ) | |
232 |
|
|
232 | port map( | |
233 |
|
|
233 | rstn => rstn, | |
234 |
|
|
234 | ReUse => '0', | |
235 |
|
|
235 | rclk => clk, | |
236 |
|
|
236 | ren => FIFO_REN, | |
237 |
|
|
237 | rdata => FIFO_out(7), | |
238 |
|
|
238 | empty => FIFO_EMPTY_net(7), | |
239 |
|
|
239 | raddr => open, | |
240 |
|
|
240 | wclk => clk, | |
241 |
|
|
241 | wen => FIFO_WEN(7), | |
242 |
|
|
242 | wdata => DATA_reg, | |
243 |
|
|
243 | full => FIFO_FULL_net(7), | |
244 |
|
|
244 | waddr => open | |
245 |
|
|
245 | ); | |
246 |
|
246 | |||
247 | REN_debug <= FIFO_REN; |
|
247 | REN_debug <= FIFO_REN; | |
248 |
|
248 | |||
@@ -257,28 +257,20 begin | |||||
257 | case address is |
|
257 | case address is | |
258 | when "000"=> |
|
258 | when "000"=> | |
259 | FIFO_WEN <= "11111110"; |
|
259 | FIFO_WEN <= "11111110"; | |
260 | FIFO_out(0) <= DATA; |
|
|||
261 | when "001"=> |
|
260 | when "001"=> | |
262 | FIFO_WEN <= "11111101"; |
|
261 | FIFO_WEN <= "11111101"; | |
263 | FIFO_out(1) <= DATA; |
|
|||
264 | when "010"=> |
|
262 | when "010"=> | |
265 | FIFO_WEN <= "11111011"; |
|
263 | FIFO_WEN <= "11111011"; | |
266 | FIFO_out(2) <= DATA; |
|
|||
267 | when "011"=> |
|
264 | when "011"=> | |
268 | FIFO_WEN <= "11110111"; |
|
265 | FIFO_WEN <= "11110111"; | |
269 | FIFO_out(3) <= DATA; |
|
|||
270 | when "100"=> |
|
266 | when "100"=> | |
271 | FIFO_WEN <= "11101111"; |
|
267 | FIFO_WEN <= "11101111"; | |
272 | FIFO_out(4) <= DATA; |
|
|||
273 | when "101"=> |
|
268 | when "101"=> | |
274 | FIFO_WEN <= "11011111"; |
|
269 | FIFO_WEN <= "11011111"; | |
275 | FIFO_out(5) <= DATA; |
|
|||
276 | when "110"=> |
|
270 | when "110"=> | |
277 | FIFO_WEN <= "10111111"; |
|
271 | FIFO_WEN <= "10111111"; | |
278 | FIFO_out(6) <= DATA; |
|
|||
279 | when "111"=> |
|
272 | when "111"=> | |
280 | FIFO_WEN <= "01111111"; |
|
273 | FIFO_WEN <= "01111111"; | |
281 | FIFO_out(7) <= DATA; |
|
|||
282 | when others => |
|
274 | when others => | |
283 | FIFO_WEN <= "11111111"; |
|
275 | FIFO_WEN <= "11111111"; | |
284 | end case; |
|
276 | end case; | |
@@ -326,7 +318,7 DAC0 : DAC8581 | |||||
326 |
|
318 | |||
327 | smpclk0: Clk_divider |
|
319 | smpclk0: Clk_divider | |
328 | GENERIC map(OSC_freqHz => 150000000, |
|
320 | GENERIC map(OSC_freqHz => 150000000, | |
329 |
TargetFreq_Hz => |
|
321 | TargetFreq_Hz => 256000) | |
330 | PORT map( |
|
322 | PORT map( | |
331 | clk => clk, |
|
323 | clk => clk, | |
332 | reset => rstn, |
|
324 | reset => rstn, |
General Comments 0
You need to be logged in to leave comments.
Login now