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

Subversion Repositories tiny64

[/] [tiny64/] [trunk/] [TinyXconfig.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 riedelx
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.STD_LOGIC_ARITH.ALL;
4
use IEEE.STD_LOGIC_UNSIGNED.ALL;
5
 
6
package TinyXconfig is
7
  constant XLEN : integer := 32;
8
  subtype  cpuWord is std_logic_vector(XLEN -1 downto 0);
9
  constant ccModeLeft    : integer := XLEN - 1;
10
  constant ccModeRight   : integer := XLEN - 4;
11
  constant aluModeLeft   : integer := XLEN - 5;
12
  constant aluModeRight  : integer := XLEN - 8;
13
  constant memmuxBit     : integer := XLEN - 9;
14
  constant dstClkLeft    : integer := XLEN - 10;
15
  constant dstClkRight   : integer := XLEN - 12;
16
  constant writeCycleBit : integer := XLEN - 13;
17
  constant opamuxLeft    : integer := XLEN - 14;
18
  constant opamuxRight   : integer := XLEN - 16;
19
  constant valmuxBit     : integer := XLEN - 17;
20
  constant opbmuxLeft    : integer := XLEN - 18;
21
  constant opbmuxRight   : integer := XLEN - 20;
22
  constant flagUpdateBit : integer := XLEN - 21;
23
  constant carryUseBit   : integer := XLEN - 22;
24
  -- two bits unused
25
  constant immediateLeft : integer := XLEN - 25;
26
 
27
  function getStdLogicVectorZeroes(int : in integer) return std_logic_vector;
28
end TinyXconfig;
29
 
30
package body TinyXconfig is
31
  function getStdLogicVectorZeroes(int : in integer) return std_logic_vector is
32
    variable result : std_logic_vector(int -1 downto 0);
33
  begin
34
    for index in result'range loop
35
      result(index) := '0';
36
    end loop;
37
    return result;
38
  end getStdLogicVectorZeroes;
39
end TinyXconfig;

powered by: WebSVN 2.1.0

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