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

Subversion Repositories cpu6502_true_cycle

[/] [cpu6502_true_cycle/] [trunk/] [rtl/] [vhdl/] [reg_sp.vhd] - Diff between revs 18 and 24

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 18 Rev 24
Line 1... Line 1...
-- VHDL Entity R6502_TC.Reg_SP.symbol
-- VHDL Entity R6502_TC.Reg_SP.symbol
--
--
-- Created:
-- Created:
--          by - eda.UNKNOWN (TEST)
--          by - eda.UNKNOWN (ENTW1)
--          at - 19:25:32 10.02.2009
--          at - 14:13:51 08.03.2010
--
--
-- Generated by Mentor Graphics' HDL Designer(TM) 2007.1a (Build 13)
-- Generated by Mentor Graphics' HDL Designer(TM) 2009.1 (Build 12)
--
--
LIBRARY ieee;
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_arith.all;
 
 
Line 26... Line 26...
 
 
END Reg_SP ;
END Reg_SP ;
 
 
-- Jens-D. Gutschmidt     Project:  R6502_TC  
-- Jens-D. Gutschmidt     Project:  R6502_TC  
-- scantara2003@yahoo.de                      
-- scantara2003@yahoo.de                      
-- COPYRIGHT (C) 2008-2009 by Jens Gutschmidt and OPENCORES.ORG                                                                                
-- COPYRIGHT (C) 2008-2010 by Jens Gutschmidt and OPENCORES.ORG                                                                                
--                                                                                                                                             
--                                                                                                                                             
-- 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   
-- 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   
-- the Free Software Foundation, either version 3 of the License, or any later version.                                                        
-- the Free Software Foundation, either version 3 of the License, or any later version.                                                        
--                                                                                                                                             
--                                                                                                                                             
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of              
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of              
Line 38... Line 38...
--                                                                                                                                             
--                                                                                                                                             
-- You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.     
-- You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.     
--                                                                                                                                             
--                                                                                                                                             
-- CVS Revisins History                                                                                                                        
-- CVS Revisins History                                                                                                                        
--                                                                                                                                             
--                                                                                                                                             
-- $Log: not supported by cvs2svn $                                                                                                                         
-- $Log: struct.bd,v $                                                                                                                         
--   <<-- more -->>                                                                                                                            
--   <<-- more -->>                                                                                                                            
-- Title:  Stack Pointer Logic  
-- Title:  Stack Pointer Logic  
-- Path:  R6502_TC/Reg_SP/struct  
-- Path:  R6502_TC/Reg_SP/struct  
-- Edited:  by eda on 10 Feb 2009  
-- Edited:  by eda on 21 Feb 2010  
--
--
-- VHDL Architecture R6502_TC.Reg_SP.struct
-- VHDL Architecture R6502_TC.Reg_SP.struct
--
--
-- Created:
-- Created:
--          by - eda.UNKNOWN (TEST)
--          by - eda.UNKNOWN (ENTW1)
--          at - 19:25:32 10.02.2009
--          at - 14:13:52 08.03.2010
--
--
-- Generated by Mentor Graphics' HDL Designer(TM) 2007.1a (Build 13)
-- Generated by Mentor Graphics' HDL Designer(TM) 2009.1 (Build 12)
--
--
LIBRARY ieee;
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_arith.all;
 
 
Line 89... Line 89...
   VARIABLE temp_carry : std_logic;
   VARIABLE temp_carry : std_logic;
   BEGIN
   BEGIN
      temp_din0 := '0' & adr_sp_low_o_i;
      temp_din0 := '0' & adr_sp_low_o_i;
      temp_din1 := '0' & val_one;
      temp_din1 := '0' & val_one;
      temp_carry := '0';
      temp_carry := '0';
      IF (sp_as_n_o_i = '1' OR sp_as_n_o_i = 'H') THEN
      IF (sp_as_n_o_i = '1') THEN
         temp_sum := unsigned(temp_din0) + unsigned(temp_din1) + temp_carry;
         temp_sum := unsigned(temp_din0) + unsigned(temp_din1) + temp_carry;
      ELSE
      ELSE
         temp_sum := unsigned(temp_din0) - unsigned(temp_din1) - temp_carry;
         temp_sum := unsigned(temp_din0) - unsigned(temp_din1) - temp_carry;
      END IF;
      END IF;
      result_low_o_i <= conv_std_logic_vector(temp_sum(7 DOWNTO 0),8);
      result_low_o_i <= conv_std_logic_vector(temp_sum(7 DOWNTO 0),8);
Line 101... Line 101...
 
 
   -- ModuleWare code(v1.9) for instance 'U_0' of 'adff'
   -- ModuleWare code(v1.9) for instance 'U_0' of 'adff'
   adr_sp_o_internal(7 DOWNTO 0) <= mw_U_0reg_cval;
   adr_sp_o_internal(7 DOWNTO 0) <= mw_U_0reg_cval;
   u_0seq_proc: PROCESS (clk_clk_i, rst_rst_n_i)
   u_0seq_proc: PROCESS (clk_clk_i, rst_rst_n_i)
   BEGIN
   BEGIN
      IF (rst_rst_n_i = '0' OR rst_rst_n_i = 'L') THEN
      IF (rst_rst_n_i = '0') THEN
         mw_U_0reg_cval <= "00000000";
         mw_U_0reg_cval <= "00000000";
      ELSIF (clk_clk_i'EVENT AND clk_clk_i='1') THEN
      ELSIF (clk_clk_i'EVENT AND clk_clk_i='1') THEN
         IF (load_o_i = '1' OR load_o_i = 'H') THEN
         IF (load_o_i = '1') THEN
            mw_U_0reg_cval <= result_low1_o_i;
            mw_U_0reg_cval <= result_low1_o_i;
         END IF;
         END IF;
      END IF;
      END IF;
   END PROCESS u_0seq_proc;
   END PROCESS u_0seq_proc;
 
 
Line 126... Line 126...
 
 
   -- ModuleWare code(v1.9) for instance 'U_8' of 'mux'
   -- ModuleWare code(v1.9) for instance 'U_8' of 'mux'
   u_8combo_proc: PROCESS(result_low_o_i, adr_low_i, sel_sp_in_i)
   u_8combo_proc: PROCESS(result_low_o_i, adr_low_i, sel_sp_in_i)
   BEGIN
   BEGIN
      CASE sel_sp_in_i IS
      CASE sel_sp_in_i IS
      WHEN '0'|'L' => result_low1_o_i <= result_low_o_i;
      WHEN '0' => result_low1_o_i <= result_low_o_i;
      WHEN '1'|'H' => result_low1_o_i <= adr_low_i;
      WHEN '1' => result_low1_o_i <= adr_low_i;
      WHEN OTHERS => result_low1_o_i <= (OTHERS => 'X');
      WHEN OTHERS => result_low1_o_i <= (OTHERS => 'X');
      END CASE;
      END CASE;
   END PROCESS u_8combo_proc;
   END PROCESS u_8combo_proc;
 
 
   -- ModuleWare code(v1.9) for instance 'U_10' of 'tap'
   -- ModuleWare code(v1.9) for instance 'U_10' of 'tap'

powered by: WebSVN 2.1.0

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