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 5

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 5 fpga_is_fu
--          at - 19:48:45 17.04.2008
6 2 fpga_is_fu
--
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 5 fpga_is_fu
-- $Log: not supported by cvs2svn $                                                                                                                                      
47 2 fpga_is_fu
-- Title:  Register Bank for register A, X and Y  
48
-- Path:  R6502_TC/RegBank_AXY/struct  
49 5 fpga_is_fu
-- Edited:  by eda on 17 Apr 2008  
50 2 fpga_is_fu
--
51
-- VHDL Architecture R6502_TC.RegBank_AXY.struct
52
--
53
-- Created:
54
--          by - eda.UNKNOWN (ENTWICKL4-XP-PR)
55 5 fpga_is_fu
--          at - 19:48:45 17.04.2008
56 2 fpga_is_fu
--
57
-- Generated by Mentor Graphics' HDL Designer(TM) 2007.1a (Build 13)
58
--
59
LIBRARY ieee;
60
USE ieee.std_logic_1164.all;
61
USE ieee.std_logic_arith.all;
62
 
63
 
64
architecture struct of RegBank_AXY is
65
 
66
   -- Architecture declarations
67
 
68
   -- Internal signal declarations
69
   signal dout     : std_logic_vector(7 downto 0);
70
   signal dout1    : std_logic_vector(7 downto 0);
71
   signal ld       : std_logic_vector(3 downto 0);
72
   signal load     : std_logic;
73
   signal load1    : std_logic;
74
   signal load2    : std_logic;
75
   signal load3    : std_logic;
76
   signal q_zw     : std_logic_vector(7 downto 0);
77
   signal val_zero : std_logic_vector(7 downto 0);
78
 
79
   -- Implicit buffer signal declarations
80
   signal q_a_o_internal : std_logic_vector (7 downto 0);
81
   signal q_x_o_internal : std_logic_vector (7 downto 0);
82
   signal q_y_o_internal : std_logic_vector (7 downto 0);
83
 
84
 
85
   -- ModuleWare signal declarations(v1.9) for instance 'U_0' of 'adff'
86
   signal mw_U_0reg_cval : std_logic_vector(7 downto 0);
87
 
88
   -- ModuleWare signal declarations(v1.9) for instance 'U_4' of 'adff'
89
   signal mw_U_4reg_cval : std_logic_vector(7 downto 0);
90
 
91
   -- ModuleWare signal declarations(v1.9) for instance 'U_5' of 'adff'
92
   signal mw_U_5reg_cval : std_logic_vector(7 downto 0);
93
 
94
   -- ModuleWare signal declarations(v1.9) for instance 'U_10' of 'adff'
95
   signal mw_U_10reg_cval : std_logic_vector(7 downto 0);
96
 
97
 
98
begin
99
   -- Architecture concurrent statements
100
   -- HDL Embedded Text Block 1 eb1
101
   -- eb1 1
102
   val_zero (7 downto 0) <= X"00";
103
 
104
 
105
   -- ModuleWare code(v1.9) for instance 'U_0' of 'adff'
106
   q_a_o_internal <= mw_U_0reg_cval;
107
   u_0seq_proc: process (clk_clk_i, rst_rst_i)
108
   begin
109
      if (rst_rst_i = '1') then
110
         mw_U_0reg_cval <= "00000000";
111
      elsif (clk_clk_i'event and clk_clk_i='1') then
112
         if (load = '1') then
113
            mw_U_0reg_cval <= dout;
114
         end if;
115
      end if;
116
   end process u_0seq_proc;
117
 
118
   -- ModuleWare code(v1.9) for instance 'U_4' of 'adff'
119
   q_x_o_internal <= mw_U_4reg_cval;
120
   u_4seq_proc: process (clk_clk_i, rst_rst_i)
121
   begin
122
      if (rst_rst_i = '1') then
123
         mw_U_4reg_cval <= "00000000";
124
      elsif (clk_clk_i'event and clk_clk_i='1') then
125
         if (load1 = '1') then
126
            mw_U_4reg_cval <= dout;
127
         end if;
128
      end if;
129
   end process u_4seq_proc;
130
 
131
   -- ModuleWare code(v1.9) for instance 'U_5' of 'adff'
132
   q_y_o_internal <= mw_U_5reg_cval;
133
   u_5seq_proc: process (clk_clk_i, rst_rst_i)
134
   begin
135
      if (rst_rst_i = '1') then
136
         mw_U_5reg_cval <= "00000000";
137
      elsif (clk_clk_i'event and clk_clk_i='1') then
138
         if (load2 = '1') then
139
            mw_U_5reg_cval <= dout;
140
         end if;
141
      end if;
142
   end process u_5seq_proc;
143
 
144
   -- ModuleWare code(v1.9) for instance 'U_10' of 'adff'
145
   q_zw <= mw_U_10reg_cval;
146
   u_10seq_proc: process (clk_clk_i, rst_rst_i)
147
   begin
148
      if (rst_rst_i = '1') then
149
         mw_U_10reg_cval <= "00000000";
150
      elsif (clk_clk_i'event and clk_clk_i='1') then
151
         if (load3 = '1') then
152
            mw_U_10reg_cval <= dout;
153
         end if;
154
      end if;
155
   end process u_10seq_proc;
156
 
157
   -- ModuleWare code(v1.9) for instance 'U_6' of 'and'
158
   load <= load_regs_i and ld(0);
159
 
160
   -- ModuleWare code(v1.9) for instance 'U_7' of 'and'
161
   load1 <= load_regs_i and ld(1);
162
 
163
   -- ModuleWare code(v1.9) for instance 'U_8' of 'and'
164
   load2 <= load_regs_i and ld(2);
165
 
166
   -- ModuleWare code(v1.9) for instance 'U_9' of 'and'
167
   load3 <= load_regs_i and ld(3);
168
 
169
   -- ModuleWare code(v1.9) for instance 'U_1' of 'decoder1'
170
   u_1combo_proc: process (sel_reg_i)
171
   begin
172
      ld <= (others => '0');
173
      case sel_reg_i is
174
         when "00" => ld(0) <= '1';
175
         when "01" => ld(1) <= '1';
176
         when "10" => ld(2) <= '1';
177
         when "11" => ld(3) <= '1';
178
         when others => ld <= (others => '0');
179
      end case;
180
   end process u_1combo_proc;
181
 
182
   -- ModuleWare code(v1.9) for instance 'U_2' of 'mux'
183
   u_2combo_proc: process(q_a_o_internal, q_x_o_internal, q_y_o_internal,
184
                          q_zw, sel_rb_out_i)
185
   begin
186
      case sel_rb_out_i is
187
      when "00" => d_regs_out_o <= q_a_o_internal;
188
      when "01" => d_regs_out_o <= q_x_o_internal;
189
      when "10" => d_regs_out_o <= q_y_o_internal;
190
      when "11" => d_regs_out_o <= q_zw;
191
      when others => d_regs_out_o <= (others => 'X');
192
      end case;
193
   end process u_2combo_proc;
194
 
195
   -- ModuleWare code(v1.9) for instance 'U_3' of 'mux'
196
   u_3combo_proc: process(q_a_o_internal, q_y_o_internal, q_x_o_internal,
197
                          d_regs_in_i, sel_rb_in_i(1 DOWNTO 0))
198
   begin
199
      case sel_rb_in_i(1 DOWNTO 0) is
200
      when "00" => dout1 <= q_a_o_internal;
201
      when "01" => dout1 <= q_y_o_internal;
202
      when "10" => dout1 <= q_x_o_internal;
203
      when "11" => dout1 <= d_regs_in_i;
204
      when others => dout1 <= (others => 'X');
205
      end case;
206
   end process u_3combo_proc;
207
 
208
   -- ModuleWare code(v1.9) for instance 'U_11' of 'mux'
209
   u_11combo_proc: process(dout1, q_zw, sel_rb_in_i(2))
210
   begin
211
      case sel_rb_in_i(2) is
212
      when '0' => dout <= dout1;
213
      when '1' => dout <= q_zw;
214
      when others => dout <= (others => 'X');
215
      end case;
216
   end process u_11combo_proc;
217
 
218
   -- Instance port mappings.
219
 
220
   -- Implicit buffered output assignments
221
   q_a_o <= q_a_o_internal;
222
   q_x_o <= q_x_o_internal;
223
   q_y_o <= q_y_o_internal;
224
 
225
end struct;

powered by: WebSVN 2.1.0

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