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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [w11a/] [pdp11_ounit.vhd] - Diff between revs 2 and 8

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

Rev 2 Rev 8
Line 1... Line 1...
-- $Id: pdp11_abox.vhd 314 2010-07-09 17:38:41Z mueller $
-- $Id: pdp11_ounit.vhd 330 2010-09-19 17:43:53Z mueller $
--
--
-- Copyright 2006-2007 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2006-2007 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
--
-- This program is free software; you may redistribute and/or modify it under
-- This program is free software; you may redistribute and/or modify it under
-- the terms of the GNU General Public License as published by the Free
-- the terms of the GNU General Public License as published by the Free
Line 10... Line 10...
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-- for complete details.
-- for complete details.
--
--
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Module Name:    pdp11_abox - syn
-- Module Name:    pdp11_ounit - syn
-- Description:    pdp11: arithmetic unit for addresses (abox)
-- Description:    pdp11: arithmetic unit for addresses (ounit)
--
--
-- Dependencies:   -
-- Dependencies:   -
-- Test bench:     tb/tb_pdp11_core (implicit)
-- Test bench:     tb/tb_pdp11_core (implicit)
-- Target Devices: generic
-- Target Devices: generic
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
-- Revision History: 
-- Revision History: 
-- Date         Rev Version  Comment
-- Date         Rev Version  Comment
 
-- 2010-09-18   300   1.1    renamed from abox
-- 2007-06-14    56   1.0.1  Use slvtypes.all
-- 2007-06-14    56   1.0.1  Use slvtypes.all
-- 2007-05-12    26   1.0    Initial version 
-- 2007-05-12    26   1.0    Initial version 
------------------------------------------------------------------------------
------------------------------------------------------------------------------
 
 
library ieee;
library ieee;
Line 32... Line 33...
use work.slvtypes.all;
use work.slvtypes.all;
use work.pdp11.all;
use work.pdp11.all;
 
 
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
 
 
entity pdp11_abox is                    -- arithmetic unit for addresses (abox)
entity pdp11_ounit is                   -- offset adder for addresses (ounit)
  port (
  port (
    DSRC : in slv16;                    -- 'src' data for port A
    DSRC : in slv16;                    -- 'src' data for port A
    DDST : in slv16;                    -- 'dst' data for port A
    DDST : in slv16;                    -- 'dst' data for port A
    DTMP : in slv16;                    -- 'tmp' data for port A
    DTMP : in slv16;                    -- 'tmp' data for port A
    PC : in slv16;                      -- PC data for port A
    PC : in slv16;                      -- PC data for port A
Line 48... Line 49...
    BSEL : in slv2;                     -- selector for port B
    BSEL : in slv2;                     -- selector for port B
    OPSUB : in slbit;                   -- operation: 0 add, 1 sub
    OPSUB : in slbit;                   -- operation: 0 add, 1 sub
    DOUT : out slv16;                   -- data output
    DOUT : out slv16;                   -- data output
    NZOUT : out slv2                    -- NZ condition codes out
    NZOUT : out slv2                    -- NZ condition codes out
  );
  );
end pdp11_abox;
end pdp11_ounit;
 
 
architecture syn of pdp11_abox is
architecture syn of pdp11_ounit is
 
 
-- --------------------------------------
-- --------------------------------------
 
 
begin
begin
 
 
Line 68... Line 69...
 
 
  begin
  begin
 
 
    if AZERO = '0' then
    if AZERO = '0' then
      case ASEL is
      case ASEL is
        when c_abox_asel_dsrc => ma := DSRC;
        when c_ounit_asel_dsrc => ma := DSRC;
        when c_abox_asel_ddst => ma := DDST;
        when c_ounit_asel_ddst => ma := DDST;
        when c_abox_asel_dtmp => ma := DTMP;
        when c_ounit_asel_dtmp => ma := DTMP;
        when c_abox_asel_pc   => ma := PC;
        when c_ounit_asel_pc   => ma := PC;
        when others => null;
        when others => null;
      end case;
      end case;
    else
    else
      ma := (others=>'0');
      ma := (others=>'0');
    end if;
    end if;
 
 
    case BSEL is
    case BSEL is
      when c_abox_bsel_ireg6  => mb := "000000000" & IREG8(5 downto 0) & "0";
      when c_ounit_bsel_ireg6  => mb := "000000000" & IREG8(5 downto 0) & "0";
      when c_abox_bsel_ireg8  => mb := IREG8(7) & IREG8(7) & IREG8(7) &
      when c_ounit_bsel_ireg8  => mb := IREG8(7) & IREG8(7) & IREG8(7) &
                                       IREG8(7) & IREG8(7) & IREG8(7) &
                                       IREG8(7) & IREG8(7) & IREG8(7) &
                                       IREG8(7) & IREG8 & "0";
                                       IREG8(7) & IREG8 & "0";
      when c_abox_bsel_vmdout => mb := VMDOUT;
      when c_ounit_bsel_vmdout => mb := VMDOUT;
      when c_abox_bsel_const  => mb := "0000000" & CONST;
      when c_ounit_bsel_const  => mb := "0000000" & CONST;
      when others => null;
      when others => null;
    end case;
    end case;
 
 
    if OPSUB = '0' then
    if OPSUB = '0' then
      sum := unsigned(ma) + unsigned(mb);
      sum := unsigned(ma) + unsigned(mb);

powered by: WebSVN 2.1.0

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