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

Subversion Repositories cpu6502_true_cycle

[/] [cpu6502_true_cycle/] [trunk/] [rtl/] [vhdl/] [regbank_axy.vhd] - Blame information for rev 3

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

Line No. Rev Author Line
1 2 fpga_is_fu
-- VHDL Entity R6502_TC.RegBank_AXY.symbol
2
--
3
-- Created:
4
--          by - eda.UNKNOWN (ENTWICKL4-XP-PR)
5
--          at - 19:06:53 08.04.2008
6
--
7
-- Generated by Mentor Graphics' HDL Designer(TM) 2007.1a (Build 13)
8
--
9
LIBRARY ieee;
10
USE ieee.std_logic_1164.all;
11
USE ieee.std_logic_arith.all;
12
 
13
entity RegBank_AXY is
14
   port(
15
      clk_clk_i    : in     std_logic;
16
      d_regs_in_i  : in     std_logic_vector (7 downto 0);
17
      load_regs_i  : in     std_logic;
18
      rst_rst_i    : in     std_logic;
19
      sel_rb_in_i  : in     std_logic_vector (2 downto 0);
20
      sel_rb_out_i : in     std_logic_vector (1 downto 0);
21
      sel_reg_i    : in     std_logic_vector (1 downto 0);
22
      d_regs_out_o : out    std_logic_vector (7 downto 0);
23
      q_a_o        : out    std_logic_vector (7 downto 0);
24
      q_x_o        : out    std_logic_vector (7 downto 0);
25
      q_y_o        : out    std_logic_vector (7 downto 0)
26
   );
27
 
28
-- Declarations
29
 
30
end RegBank_AXY ;
31
 
32
-- Jens-D. Gutschmidt     Project:  R6502_TC  
33
-- scantara2003@yahoo.de                      
34
-- COPYRIGHT (C) 2008 by Jens Gutschmidt and OPENCORES.ORG                                                                                     
35
--                                                                                                                                             
36
-- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by   
37
-- the Free Software Foundation, either version 3 of the License, or any later version.                                                        
38
--                                                                                                                                             
39
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of              
40
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.                                  
41
--                                                                                                                                             
42
-- You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.     
43
--                                                                                                                                             
44
-- CVS Revisins History                                                                                                                        
45
--                                                                                                                                             
46
-- $Log: not supported by cvs2svn $                                                                                                                                       
47
--                                                                                                                                             
48
-- Title:  Register Bank for register A, X and Y  
49
-- Path:  R6502_TC/RegBank_AXY/struct  
50
-- Edited:  by eda on 08 Apr 2008  
51
--
52
-- VHDL Architecture R6502_TC.RegBank_AXY.struct
53
--
54
-- Created:
55
--          by - eda.UNKNOWN (ENTWICKL4-XP-PR)
56
--          at - 19:06:54 08.04.2008
57
--
58
-- Generated by Mentor Graphics' HDL Designer(TM) 2007.1a (Build 13)
59
--
60
LIBRARY ieee;
61
USE ieee.std_logic_1164.all;
62
USE ieee.std_logic_arith.all;
63
 
64
 
65
architecture struct of RegBank_AXY is
66
 
67
   -- Architecture declarations
68
 
69
   -- Internal signal declarations
70
   signal dout     : std_logic_vector(7 downto 0);
71
   signal dout1    : std_logic_vector(7 downto 0);
72
   signal ld       : std_logic_vector(3 downto 0);
73
   signal load     : std_logic;
74
   signal load1    : std_logic;
75
   signal load2    : std_logic;
76
   signal load3    : std_logic;
77
   signal q_zw     : std_logic_vector(7 downto 0);
78
   signal val_zero : std_logic_vector(7 downto 0);
79
 
80
   -- Implicit buffer signal declarations
81
   signal q_a_o_internal : std_logic_vector (7 downto 0);
82
   signal q_x_o_internal : std_logic_vector (7 downto 0);
83
   signal q_y_o_internal : std_logic_vector (7 downto 0);
84
 
85
 
86
   -- ModuleWare signal declarations(v1.9) for instance 'U_0' of 'adff'
87
   signal mw_U_0reg_cval : std_logic_vector(7 downto 0);
88
 
89
   -- ModuleWare signal declarations(v1.9) for instance 'U_4' of 'adff'
90
   signal mw_U_4reg_cval : std_logic_vector(7 downto 0);
91
 
92
   -- ModuleWare signal declarations(v1.9) for instance 'U_5' of 'adff'
93
   signal mw_U_5reg_cval : std_logic_vector(7 downto 0);
94
 
95
   -- ModuleWare signal declarations(v1.9) for instance 'U_10' of 'adff'
96
   signal mw_U_10reg_cval : std_logic_vector(7 downto 0);
97
 
98
 
99
begin
100
   -- Architecture concurrent statements
101
   -- HDL Embedded Text Block 1 eb1
102
   -- eb1 1
103
   val_zero (7 downto 0) <= X"00";
104
 
105
 
106
   -- ModuleWare code(v1.9) for instance 'U_0' of 'adff'
107
   q_a_o_internal <= mw_U_0reg_cval;
108
   u_0seq_proc: process (clk_clk_i, rst_rst_i)
109
   begin
110
      if (rst_rst_i = '1') then
111
         mw_U_0reg_cval <= "00000000";
112
      elsif (clk_clk_i'event and clk_clk_i='1') then
113
         if (load = '1') then
114
            mw_U_0reg_cval <= dout;
115
         end if;
116
      end if;
117
   end process u_0seq_proc;
118
 
119
   -- ModuleWare code(v1.9) for instance 'U_4' of 'adff'
120
   q_x_o_internal <= mw_U_4reg_cval;
121
   u_4seq_proc: process (clk_clk_i, rst_rst_i)
122
   begin
123
      if (rst_rst_i = '1') then
124
         mw_U_4reg_cval <= "00000000";
125
      elsif (clk_clk_i'event and clk_clk_i='1') then
126
         if (load1 = '1') then
127
            mw_U_4reg_cval <= dout;
128
         end if;
129
      end if;
130
   end process u_4seq_proc;
131
 
132
   -- ModuleWare code(v1.9) for instance 'U_5' of 'adff'
133
   q_y_o_internal <= mw_U_5reg_cval;
134
   u_5seq_proc: process (clk_clk_i, rst_rst_i)
135
   begin
136
      if (rst_rst_i = '1') then
137
         mw_U_5reg_cval <= "00000000";
138
      elsif (clk_clk_i'event and clk_clk_i='1') then
139
         if (load2 = '1') then
140
            mw_U_5reg_cval <= dout;
141
         end if;
142
      end if;
143
   end process u_5seq_proc;
144
 
145
   -- ModuleWare code(v1.9) for instance 'U_10' of 'adff'
146
   q_zw <= mw_U_10reg_cval;
147
   u_10seq_proc: process (clk_clk_i, rst_rst_i)
148
   begin
149
      if (rst_rst_i = '1') then
150
         mw_U_10reg_cval <= "00000000";
151
      elsif (clk_clk_i'event and clk_clk_i='1') then
152
         if (load3 = '1') then
153
            mw_U_10reg_cval <= dout;
154
         end if;
155
      end if;
156
   end process u_10seq_proc;
157
 
158
   -- ModuleWare code(v1.9) for instance 'U_6' of 'and'
159
   load <= load_regs_i and ld(0);
160
 
161
   -- ModuleWare code(v1.9) for instance 'U_7' of 'and'
162
   load1 <= load_regs_i and ld(1);
163
 
164
   -- ModuleWare code(v1.9) for instance 'U_8' of 'and'
165
   load2 <= load_regs_i and ld(2);
166
 
167
   -- ModuleWare code(v1.9) for instance 'U_9' of 'and'
168
   load3 <= load_regs_i and ld(3);
169
 
170
   -- ModuleWare code(v1.9) for instance 'U_1' of 'decoder1'
171
   u_1combo_proc: process (sel_reg_i)
172
   begin
173
      ld <= (others => '0');
174
      case sel_reg_i is
175
         when "00" => ld(0) <= '1';
176
         when "01" => ld(1) <= '1';
177
         when "10" => ld(2) <= '1';
178
         when "11" => ld(3) <= '1';
179
         when others => ld <= (others => '0');
180
      end case;
181
   end process u_1combo_proc;
182
 
183
   -- ModuleWare code(v1.9) for instance 'U_2' of 'mux'
184
   u_2combo_proc: process(q_a_o_internal, q_x_o_internal, q_y_o_internal,
185
                          q_zw, sel_rb_out_i)
186
   begin
187
      case sel_rb_out_i is
188
      when "00" => d_regs_out_o <= q_a_o_internal;
189
      when "01" => d_regs_out_o <= q_x_o_internal;
190
      when "10" => d_regs_out_o <= q_y_o_internal;
191
      when "11" => d_regs_out_o <= q_zw;
192
      when others => d_regs_out_o <= (others => 'X');
193
      end case;
194
   end process u_2combo_proc;
195
 
196
   -- ModuleWare code(v1.9) for instance 'U_3' of 'mux'
197
   u_3combo_proc: process(q_a_o_internal, q_y_o_internal, q_x_o_internal,
198
                          d_regs_in_i, sel_rb_in_i(1 DOWNTO 0))
199
   begin
200
      case sel_rb_in_i(1 DOWNTO 0) is
201
      when "00" => dout1 <= q_a_o_internal;
202
      when "01" => dout1 <= q_y_o_internal;
203
      when "10" => dout1 <= q_x_o_internal;
204
      when "11" => dout1 <= d_regs_in_i;
205
      when others => dout1 <= (others => 'X');
206
      end case;
207
   end process u_3combo_proc;
208
 
209
   -- ModuleWare code(v1.9) for instance 'U_11' of 'mux'
210
   u_11combo_proc: process(dout1, q_zw, sel_rb_in_i(2))
211
   begin
212
      case sel_rb_in_i(2) is
213
      when '0' => dout <= dout1;
214
      when '1' => dout <= q_zw;
215
      when others => dout <= (others => 'X');
216
      end case;
217
   end process u_11combo_proc;
218
 
219
   -- Instance port mappings.
220
 
221
   -- Implicit buffered output assignments
222
   q_a_o <= q_a_o_internal;
223
   q_x_o <= q_x_o_internal;
224
   q_y_o <= q_y_o_internal;
225
 
226
end struct;

powered by: WebSVN 2.1.0

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