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

Subversion Repositories idea

[/] [idea/] [trunk/] [behavioral/] [idea_machine/] [leftshifter.vbe] - Rev 9

Compare with Previous | Blame | View Log

-- File Name    :  leftshifter.vbe                               --
-- Description  :  The 0-16 Lerft Shifter                        --
-- Date         :  Aug 21, 2001                                  --
-- Version      :  1.1                                           --
-- Author       :  Martadinata A.                                --
-- Adress       :  VLSI RG, Dept. Electrical of Engineering ITB, --
--                 Bandung, Indonesia                            --
-- E-mail       :  marta@ic.vlsi.itb.ac.id                       --

ENTITY leftshifter IS
PORT(
  p     : IN BIT_VECTOR(16 DOWNTO 0);
  q     : IN BIT_VECTOR(15 DOWNTO 0);
  r0    : OUT BIT_VECTOR(31 DOWNTO 0);
  r1    : OUT BIT_VECTOR(31 DOWNTO 0);
  r2    : OUT BIT_VECTOR(31 DOWNTO 0);
  r3    : OUT BIT_VECTOR(31 DOWNTO 0);
  r4    : OUT BIT_VECTOR(31 DOWNTO 0);
  r5    : OUT BIT_VECTOR(31 DOWNTO 0);
  r6    : OUT BIT_VECTOR(31 DOWNTO 0);
  r7    : OUT BIT_VECTOR(31 DOWNTO 0);
  r8    : OUT BIT_VECTOR(31 DOWNTO 0);
  r9    : OUT BIT_VECTOR(31 DOWNTO 0);
  r10   : OUT BIT_VECTOR(31 DOWNTO 0);
  r11   : OUT BIT_VECTOR(31 DOWNTO 0);
  r12   : OUT BIT_VECTOR(31 DOWNTO 0);
  r13   : OUT BIT_VECTOR(31 DOWNTO 0);
  r14   : OUT BIT_VECTOR(31 DOWNTO 0);
  r15   : OUT BIT_VECTOR(31 DOWNTO 0);
  r16   : OUT BIT_VECTOR(31 DOWNTO 0);
  vdd   : IN  BIT;
  vss   : IN  BIT
);
END leftshifter;

ARCHITECTURE VBE OF leftshifter IS

BEGIN
  ASSERT ((vdd and not (vss)) = '1')
  REPORT "power supply is missing on leftshifter"
  SEVERITY WARNING;

  r0 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & p) WHEN (q(0) = "1")
        ELSE "00000000000000000000000000000000";
  
  r1 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & p & '0') WHEN (q(1) = "1")
        ELSE "00000000000000000000000000000000";
      
  r2 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & p & '0' & '0') WHEN (q(2) = "1")
        ELSE "00000000000000000000000000000000";
   
  r3 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & p & '0' & '0' & '0') WHEN (q(3) = "1")
        ELSE "00000000000000000000000000000000";

  r4 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & p & '0' & '0' & '0' & '0') WHEN (q(4) = "1")
        ELSE "00000000000000000000000000000000";
  
  r5 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & p & '0' & '0' & '0' & '0' & '0') WHEN (q(5) = "1")
        ELSE "00000000000000000000000000000000";
      
  r6 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & p & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(6) = "1")
        ELSE "00000000000000000000000000000000";
   
  r7 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & p & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(7) = "1")
        ELSE "00000000000000000000000000000000";

  r8 <= ('0' & '0' & '0' & '0' & '0' & '0' & '0'
        & p & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(8) = "1")
        ELSE "00000000000000000000000000000000";
  
  r9 <= ('0' & '0' & '0' & '0' & '0' & '0' & p
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(9) = "1")
        ELSE "00000000000000000000000000000000";
      
  r10 <= ('0' & '0' & '0' & '0' & '0' & p & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(10) = "1")
        ELSE "00000000000000000000000000000000";
   
  r11 <= ('0' & '0' & '0' & '0' & p & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(11) = "1")
        ELSE "00000000000000000000000000000000";

  r12 <= ('0' & '0' & '0' & p & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(12) = "1")
        ELSE "00000000000000000000000000000000";
  
  r13 <= ('0' & '0' & p & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(13) = "1")
        ELSE "00000000000000000000000000000000";
      
  r14 <= ('0' & p & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(14) = "1")
        ELSE "00000000000000000000000000000000";
   
  r15 <= (p & '0' & '0' & '0' & '0' & '0' & '0'
        & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0' & '0') WHEN (q(15) = "1")
        ELSE "00000000000000000000000000000000";

  r16 <= "00000000000000000000000000000000";
              
 END VBE;

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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