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

Subversion Repositories mips_fault_tolerant

[/] [mips_fault_tolerant/] [trunk/] [source/] [mult_lfsr.vhd] - Blame information for rev 45

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 33 jimi39
library IEEE;
2
USE ieee.std_logic_1164.ALL;
3
--USE IEEE.std_logic_arith.all;
4
--use IEEE.NUMERIC_STD.ALL;
5
--use IEEE.STD_LOGIC_UNSIGNED.ALL;
6
entity mult_lfsr is
7
    port (clock_top : in std_logic;
8
          reset_top : in std_logic;
9
          sel_top   : in std_logic;
10
          X_top     : in std_logic_vector(31 DOWNTO 0);
11
     Y_top     : in std_logic_vector(31 DOWNTO 0);
12
     Hi_to_out : out STD_LOGIC_VECTOR (31 downto 0);
13
     Lo_to_out : out STD_LOGIC_VECTOR (31 downto 0);
14
          pass      : out std_logic
15
        );
16
end mult_lfsr;
17
 
18
 
19
architecture Stractural of mult_lfsr is
20
 
21
component mult_32x32
22
  PORT
23
    (
24
     X :IN STD_LOGIC_VECTOR(31 DOWNTO 0);
25
     Y :IN STD_LOGIC_VECTOR(31 DOWNTO 0);
26
     P :OUT STD_LOGIC_VECTOR(63 DOWNTO 0)
27
     );
28
END component;
29
 
30
 
31
component LFSR
32
  port  ( clock: in std_logic;
33
          reset: in std_logic;
34
          sel_top   : in std_logic;
35
          data_out: out std_logic_vector(63 downto 0)
36
        );
37
end component;
38
 
39
 
40
component mux32
41
    Port ( A : in std_logic_vector(31 downto 0);
42
           B : in std_logic_vector(31 downto 0);
43
           SEL : in std_logic;
44
           MUX_OUT : out std_logic_vector(31 downto 0));
45
end component;
46
 
47
component misr is
48
port (
49
  clock    : in std_logic;
50
  reset    : in std_logic;
51
  sel_top   : in std_logic;
52
  data_in   : in std_logic_vector(63 downto 0);
53
  pass      : out std_logic
54
);
55
end component;
56
Signal data_out_signal,P_temp,seed_top : std_logic_vector(63 downto 0);
57
Signal X_signal : std_logic_vector(31 downto 0);
58
Signal Y_signal : std_logic_vector(31 downto 0);
59
 
60
 
61
begin
62
 
63
u1: lfsr port map (clock=>clock_top,reset=>reset_top,sel_top=>sel_top,data_out=>data_out_signal);
64
u2: mux32 port map (A=>X_top,B=>data_out_signal(63 downto 32),SEL=>sel_top,MUX_OUT=>X_signal);
65
u3: mux32 port map (A=>Y_top,B=>data_out_signal(31 downto 0),SEL=>sel_top,MUX_OUT=>Y_signal);
66
u4: mult_32x32 port map (X=>X_signal,Y=>Y_signal,P=>P_temp);
67
u5: misr port map (clock=>clock_top,reset=>reset_top,sel_top=>sel_top,data_in=>P_temp,pass=>pass);
68
 
69
Hi_to_out <= P_temp(63 downto 32);
70
Lo_to_out <= P_temp(31 downto 0);
71
 
72
 
73
end Stractural;
74
 

powered by: WebSVN 2.1.0

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