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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_1_0/] [rtl/] [vhdl/] [pmem_ctrl.vhd] - Diff between revs 129 and 174

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

Rev 129 Rev 174
Line 1... Line 1...
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--
--
-- The Program Memory control unit.
-- The Program Memory control unit.
-- All operations related to the Program Memory are managed here.
-- All operations related to the Program Memory are managed here.
--
--
-- $Id: pmem_ctrl.vhd,v 1.3 2004-07-11 16:51:33 arniml Exp $
-- $Id: pmem_ctrl.vhd,v 1.4 2005-06-08 19:13:53 arniml Exp $
--
--
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
--
--
-- All rights reserved
-- All rights reserved
--
--
Line 88... Line 88...
use work.t48_pack.dmem_addr_width_c;
use work.t48_pack.dmem_addr_width_c;
use work.t48_pack.page_t;
use work.t48_pack.page_t;
 
 
architecture rtl of pmem_ctrl is
architecture rtl of pmem_ctrl is
 
 
 
  -- implemented counter width of Program Counter
 
  -- the upper bit is only altered by JMP, CALL and RET(R)
 
  subtype pc_count_range_t is natural range pmem_addr_width_c-2 downto 0;
 
 
  -- the Program Counter
  -- the Program Counter
  signal program_counter_q : unsigned(pmem_addr_t'range);
  signal program_counter_q : unsigned(pmem_addr_t'range);
 
 
 
 
  -- the Program Memory address
  -- the Program Memory address
  signal pmem_addr_s,
  signal pmem_addr_s,
         pmem_addr_q       : std_logic_vector(pmem_addr_t'range);
         pmem_addr_q       : std_logic_vector(pmem_addr_t'range);
 
 
begin
begin
Line 120... Line 125...
        elsif write_pch_i then
        elsif write_pch_i then
          program_counter_q(pmem_addr_width_c-1 downto data_i'high+1) <=
          program_counter_q(pmem_addr_width_c-1 downto data_i'high+1) <=
            UNSIGNED(data_i(pmem_addr_width_c - dmem_addr_width_c - 1 downto 0));
            UNSIGNED(data_i(pmem_addr_width_c - dmem_addr_width_c - 1 downto 0));
        elsif inc_pc_i then
        elsif inc_pc_i then
          -- increment mode
          -- increment mode
          program_counter_q <= program_counter_q + 1;
          -- the MSB is not modified by linear increments
 
          -- it can only be altered by JMP, CALL or RET(R)
 
          program_counter_q(pc_count_range_t) <=
 
            program_counter_q(pc_count_range_t) + 1;
        end if;
        end if;
 
 
        -- set pmem address
        -- set pmem address
        if write_pmem_addr_i then
        if write_pmem_addr_i then
          pmem_addr_q <= pmem_addr_s;
          pmem_addr_q <= pmem_addr_s;
Line 216... Line 224...
 
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- File History:
-- File History:
--
--
-- $Log: not supported by cvs2svn $
-- $Log: not supported by cvs2svn $
 
-- Revision 1.3  2004/07/11 16:51:33  arniml
 
-- cleanup copyright notice
 
--
-- Revision 1.2  2004/04/24 23:44:25  arniml
-- Revision 1.2  2004/04/24 23:44:25  arniml
-- move from std_logic_arith to numeric_std
-- move from std_logic_arith to numeric_std
--
--
-- Revision 1.1  2004/03/23 21:31:53  arniml
-- Revision 1.1  2004/03/23 21:31:53  arniml
-- initial check-in
-- initial check-in
--
--
--
 
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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