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

Subversion Repositories cpu6502_true_cycle

[/] [cpu6502_true_cycle/] [branches/] [avendor/] [rtl/] [vhdl/] [regbank_axy.vhd] - Blame information for rev 18

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 8 fpga_is_fu
--          by - eda.UNKNOWN (ENTWICKL4-XP-PR)
5
--          at - 22:42:53 04.01.2009
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 8 fpga_is_fu
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_n_i  : in     std_logic;
19
      sel_rb_in_i  : in     std_logic_vector (1 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 2 fpga_is_fu
   );
27
 
28
-- Declarations
29
 
30 8 fpga_is_fu
end RegBank_AXY ;
31 2 fpga_is_fu
 
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 6 fpga_is_fu
-- $Log: not supported by cvs2svn $                                                                                                                         
47
--   <<-- more -->>                                                                                                                            
48 2 fpga_is_fu
-- Title:  Register Bank for register A, X and Y  
49
-- Path:  R6502_TC/RegBank_AXY/struct  
50 6 fpga_is_fu
-- Edited:  by eda on 02 Jan 2009  
51 2 fpga_is_fu
--
52
-- VHDL Architecture R6502_TC.RegBank_AXY.struct
53
--
54
-- Created:
55 8 fpga_is_fu
--          by - eda.UNKNOWN (ENTWICKL4-XP-PR)
56
--          at - 22:42:53 04.01.2009
57 2 fpga_is_fu
--
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 8 fpga_is_fu
architecture struct of RegBank_AXY is
66 2 fpga_is_fu
 
67
   -- Architecture declarations
68
 
69
   -- Internal signal declarations
70 8 fpga_is_fu
   signal ld        : std_logic_vector(2 downto 0);
71
   signal load1_o_i : std_logic;
72
   signal load2_o_i : std_logic;
73
   signal load_o_i  : std_logic;
74
   signal q_mux_o_i : std_logic_vector(7 downto 0);
75
   signal val_zero  : std_logic_vector(7 downto 0);
76 2 fpga_is_fu
 
77
   -- Implicit buffer signal declarations
78 8 fpga_is_fu
   signal q_a_o_internal : std_logic_vector (7 downto 0);
79
   signal q_x_o_internal : std_logic_vector (7 downto 0);
80
   signal q_y_o_internal : std_logic_vector (7 downto 0);
81 2 fpga_is_fu
 
82
 
83
   -- ModuleWare signal declarations(v1.9) for instance 'U_0' of 'adff'
84 8 fpga_is_fu
   signal mw_U_0reg_cval : std_logic_vector(7 downto 0);
85 2 fpga_is_fu
 
86
   -- ModuleWare signal declarations(v1.9) for instance 'U_4' of 'adff'
87 8 fpga_is_fu
   signal mw_U_4reg_cval : std_logic_vector(7 downto 0);
88 2 fpga_is_fu
 
89
   -- ModuleWare signal declarations(v1.9) for instance 'U_5' of 'adff'
90 8 fpga_is_fu
   signal mw_U_5reg_cval : std_logic_vector(7 downto 0);
91 2 fpga_is_fu
 
92
 
93 8 fpga_is_fu
begin
94 2 fpga_is_fu
 
95
   -- ModuleWare code(v1.9) for instance 'U_0' of 'adff'
96
   q_a_o_internal <= mw_U_0reg_cval;
97 8 fpga_is_fu
   u_0seq_proc: process (clk_clk_i, rst_rst_n_i)
98
   begin
99
      if (rst_rst_n_i = '0') then
100 2 fpga_is_fu
         mw_U_0reg_cval <= "00000000";
101 8 fpga_is_fu
      elsif (clk_clk_i'event and clk_clk_i='1') then
102
         if (load_o_i = '1') then
103 6 fpga_is_fu
            mw_U_0reg_cval <= q_mux_o_i;
104 8 fpga_is_fu
         end if;
105
      end if;
106
   end process u_0seq_proc;
107 2 fpga_is_fu
 
108
   -- ModuleWare code(v1.9) for instance 'U_4' of 'adff'
109
   q_x_o_internal <= mw_U_4reg_cval;
110 8 fpga_is_fu
   u_4seq_proc: process (clk_clk_i, rst_rst_n_i)
111
   begin
112
      if (rst_rst_n_i = '0') then
113 2 fpga_is_fu
         mw_U_4reg_cval <= "00000000";
114 8 fpga_is_fu
      elsif (clk_clk_i'event and clk_clk_i='1') then
115
         if (load1_o_i = '1') then
116 6 fpga_is_fu
            mw_U_4reg_cval <= q_mux_o_i;
117 8 fpga_is_fu
         end if;
118
      end if;
119
   end process u_4seq_proc;
120 2 fpga_is_fu
 
121
   -- ModuleWare code(v1.9) for instance 'U_5' of 'adff'
122
   q_y_o_internal <= mw_U_5reg_cval;
123 8 fpga_is_fu
   u_5seq_proc: process (clk_clk_i, rst_rst_n_i)
124
   begin
125
      if (rst_rst_n_i = '0') then
126 2 fpga_is_fu
         mw_U_5reg_cval <= "00000000";
127 8 fpga_is_fu
      elsif (clk_clk_i'event and clk_clk_i='1') then
128
         if (load2_o_i = '1') then
129 6 fpga_is_fu
            mw_U_5reg_cval <= q_mux_o_i;
130 8 fpga_is_fu
         end if;
131
      end if;
132
   end process u_5seq_proc;
133 2 fpga_is_fu
 
134
   -- ModuleWare code(v1.9) for instance 'U_6' of 'and'
135 8 fpga_is_fu
   load_o_i <= load_regs_i and ld(0);
136 2 fpga_is_fu
 
137
   -- ModuleWare code(v1.9) for instance 'U_7' of 'and'
138 8 fpga_is_fu
   load1_o_i <= load_regs_i and ld(1);
139 2 fpga_is_fu
 
140
   -- ModuleWare code(v1.9) for instance 'U_8' of 'and'
141 8 fpga_is_fu
   load2_o_i <= load_regs_i and ld(2);
142 2 fpga_is_fu
 
143 6 fpga_is_fu
   -- ModuleWare code(v1.9) for instance 'U_11' of 'constval'
144
   val_zero <= "00000000";
145 2 fpga_is_fu
 
146
   -- ModuleWare code(v1.9) for instance 'U_1' of 'decoder1'
147 8 fpga_is_fu
   u_1combo_proc: process (sel_reg_i)
148
   begin
149
      ld <= (others => '0');
150
      case sel_reg_i is
151
         when "00" => ld(0) <= '1';
152
         when "01" => ld(1) <= '1';
153
         when "10" => ld(2) <= '1';
154
         when others => ld <= (others => '0');
155
      end case;
156
   end process u_1combo_proc;
157 2 fpga_is_fu
 
158
   -- ModuleWare code(v1.9) for instance 'U_2' of 'mux'
159 8 fpga_is_fu
   u_2combo_proc: process(q_a_o_internal, q_x_o_internal, q_y_o_internal,
160 6 fpga_is_fu
                          val_zero, sel_rb_out_i)
161 8 fpga_is_fu
   begin
162
      case sel_rb_out_i is
163
      when "00" => d_regs_out_o <= q_a_o_internal;
164
      when "01" => d_regs_out_o <= q_x_o_internal;
165
      when "10" => d_regs_out_o <= q_y_o_internal;
166
      when "11" => d_regs_out_o <= val_zero;
167
      when others => d_regs_out_o <= (others => 'X');
168
      end case;
169
   end process u_2combo_proc;
170 2 fpga_is_fu
 
171
   -- ModuleWare code(v1.9) for instance 'U_3' of 'mux'
172 8 fpga_is_fu
   u_3combo_proc: process(q_a_o_internal, q_y_o_internal, q_x_o_internal,
173 6 fpga_is_fu
                          d_regs_in_i, sel_rb_in_i)
174 8 fpga_is_fu
   begin
175
      case sel_rb_in_i is
176
      when "00" => q_mux_o_i <= q_a_o_internal;
177
      when "01" => q_mux_o_i <= q_y_o_internal;
178
      when "10" => q_mux_o_i <= q_x_o_internal;
179
      when "11" => q_mux_o_i <= d_regs_in_i;
180
      when others => q_mux_o_i <= (others => 'X');
181
      end case;
182
   end process u_3combo_proc;
183 2 fpga_is_fu
 
184
   -- Instance port mappings.
185
 
186
   -- Implicit buffered output assignments
187
   q_a_o <= q_a_o_internal;
188
   q_x_o <= q_x_o_internal;
189
   q_y_o <= q_y_o_internal;
190
 
191 8 fpga_is_fu
end struct;

powered by: WebSVN 2.1.0

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