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 11

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 11 fpga_is_fu
--          at - 22:53:06 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
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 11 fpga_is_fu
      rst_rst_n_i  : in     std_logic;
19
      sel_rb_in_i  : in     std_logic_vector (1 downto 0);
20 2 fpga_is_fu
      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 11 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 11 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
--          by - eda.UNKNOWN (ENTWICKL4-XP-PR)
56 11 fpga_is_fu
--          at - 22:53:07 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
architecture struct of RegBank_AXY is
66
 
67
   -- Architecture declarations
68
 
69
   -- Internal signal declarations
70 11 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
   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
 
82
 
83
   -- ModuleWare signal declarations(v1.9) for instance 'U_0' of 'adff'
84
   signal mw_U_0reg_cval : std_logic_vector(7 downto 0);
85
 
86
   -- ModuleWare signal declarations(v1.9) for instance 'U_4' of 'adff'
87
   signal mw_U_4reg_cval : std_logic_vector(7 downto 0);
88
 
89
   -- ModuleWare signal declarations(v1.9) for instance 'U_5' of 'adff'
90
   signal mw_U_5reg_cval : std_logic_vector(7 downto 0);
91
 
92
 
93
begin
94
 
95
   -- ModuleWare code(v1.9) for instance 'U_0' of 'adff'
96
   q_a_o_internal <= mw_U_0reg_cval;
97 11 fpga_is_fu
   u_0seq_proc: process (clk_clk_i, rst_rst_n_i)
98 2 fpga_is_fu
   begin
99 11 fpga_is_fu
      if (rst_rst_n_i = '0') then
100 2 fpga_is_fu
         mw_U_0reg_cval <= "00000000";
101
      elsif (clk_clk_i'event and clk_clk_i='1') then
102 11 fpga_is_fu
         if (load_o_i = '1') then
103
            mw_U_0reg_cval <= q_mux_o_i;
104 2 fpga_is_fu
         end if;
105
      end if;
106
   end process u_0seq_proc;
107
 
108
   -- ModuleWare code(v1.9) for instance 'U_4' of 'adff'
109
   q_x_o_internal <= mw_U_4reg_cval;
110 11 fpga_is_fu
   u_4seq_proc: process (clk_clk_i, rst_rst_n_i)
111 2 fpga_is_fu
   begin
112 11 fpga_is_fu
      if (rst_rst_n_i = '0') then
113 2 fpga_is_fu
         mw_U_4reg_cval <= "00000000";
114
      elsif (clk_clk_i'event and clk_clk_i='1') then
115 11 fpga_is_fu
         if (load1_o_i = '1') then
116
            mw_U_4reg_cval <= q_mux_o_i;
117 2 fpga_is_fu
         end if;
118
      end if;
119
   end process u_4seq_proc;
120
 
121
   -- ModuleWare code(v1.9) for instance 'U_5' of 'adff'
122
   q_y_o_internal <= mw_U_5reg_cval;
123 11 fpga_is_fu
   u_5seq_proc: process (clk_clk_i, rst_rst_n_i)
124 2 fpga_is_fu
   begin
125 11 fpga_is_fu
      if (rst_rst_n_i = '0') then
126 2 fpga_is_fu
         mw_U_5reg_cval <= "00000000";
127
      elsif (clk_clk_i'event and clk_clk_i='1') then
128 11 fpga_is_fu
         if (load2_o_i = '1') then
129
            mw_U_5reg_cval <= q_mux_o_i;
130 2 fpga_is_fu
         end if;
131
      end if;
132
   end process u_5seq_proc;
133
 
134
   -- ModuleWare code(v1.9) for instance 'U_6' of 'and'
135 11 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 11 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 11 fpga_is_fu
   load2_o_i <= load_regs_i and ld(2);
142 2 fpga_is_fu
 
143 11 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
   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
 
158
   -- ModuleWare code(v1.9) for instance 'U_2' of 'mux'
159
   u_2combo_proc: process(q_a_o_internal, q_x_o_internal, q_y_o_internal,
160 11 fpga_is_fu
                          val_zero, sel_rb_out_i)
161 2 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 11 fpga_is_fu
      when "11" => d_regs_out_o <= val_zero;
167 2 fpga_is_fu
      when others => d_regs_out_o <= (others => 'X');
168
      end case;
169
   end process u_2combo_proc;
170
 
171
   -- ModuleWare code(v1.9) for instance 'U_3' of 'mux'
172
   u_3combo_proc: process(q_a_o_internal, q_y_o_internal, q_x_o_internal,
173 11 fpga_is_fu
                          d_regs_in_i, sel_rb_in_i)
174 2 fpga_is_fu
   begin
175 11 fpga_is_fu
      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 2 fpga_is_fu
      end case;
182
   end process u_3combo_proc;
183
 
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
end struct;

powered by: WebSVN 2.1.0

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