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

Subversion Repositories minimips_superscalar

[/] [minimips_superscalar/] [tags/] [P1/] [sources/] [pps_ei_2.vhd] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 mcafruni
------------------------------------------------------------------------------------
2
--                                                                                --
3
--    Copyright (c) 2004, Hangouet Samuel                                         --
4
--                  , Jan Sebastien                                               --
5
--                  , Mouton Louis-Marie                                          --
6
--                  , Schneider Olivier     all rights reserved                   --
7
--                                                                                --
8
--    This file is part of miniMIPS.                                              --
9
--                                                                                --
10
--    miniMIPS is free software; you can redistribute it and/or modify            --
11
--    it under the terms of the GNU General Public License as published by        --
12
--    the Free Software Foundation; either version 2 of the License, or           --
13
--    (at your option) any later version.                                         --
14
--                                                                                --
15
--    miniMIPS is distributed in the hope that it will be useful,                 --
16
--    but WITHOUT ANY WARRANTY; without even the implied warranty of              --
17
--    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               --
18
--    GNU General Public License for more details.                                --
19
--                                                                                --
20
--    You should have received a copy of the GNU General Public License           --
21
--    along with miniMIPS; if not, write to the Free Software                     --
22
--    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   --
23
--                                                                                --
24
------------------------------------------------------------------------------------
25
 
26
 
27
-- If you encountered any problem, please contact :
28
--
29
--   lmouton@enserg.fr
30
--   oschneid@enserg.fr
31
--   shangoue@enserg.fr
32
--
33
 
34
 
35
 
36
--------------------------------------------------------------------------
37
--                                                                      --
38
--                                                                      --
39
--        miniMIPS Processor : Instruction extraction stage             --
40
--                                                                      --
41
--                                                                      --
42
--                                                                      --
43
-- Authors : Hangouet  Samuel                                           --
44
--           Jan       Sébastien                                        --
45
--           Mouton    Louis-Marie                                      --
46
--           Schneider Olivier                                          --
47
--                                                                      --
48
--                                                          june 2003   --
49
--------------------------------------------------------------------------
50
 
51
library IEEE;
52
use IEEE.std_logic_1164.all;
53
use IEEE.numeric_std.all;
54
 
55
library work;
56
use work.pack_mips.all;
57
 
58
entity pps_ei_2 is
59
port (
60
  clock : in std_logic;
61
  reset : in std_logic;
62
  clear : in std_logic;    -- Clear the pipeline stage
63
  stop_all2 : in std_logic; -- Evolution locking signal
64
 
65
  -- Asynchronous inputs
66
  stop_ei : in std_logic;  -- Lock the EI_adr and Ei_instr registers
67
  genop : in std_logic;    -- Send nops
68
 
69
  -- Bus controler interface
70
  CTE_instr : in bus32;    -- Instruction from the memory
71
  ETC_adr : out bus32;     -- Address to read in memory
72
 
73
  -- Synchronous inputs from PF stage
74
  PF_pc : in bus32;        -- Current value of the pc (desnecessario no EI2)
75
 
76
  -- Synchronous outputs to DI stage
77
  EI_instr : out bus32;    -- Read interface
78
  EI_adr : out bus32;      -- Address from the read instruction
79
  EI_it_ok : out std_logic -- Allow hardware interruptions
80
);
81
end pps_ei_2;
82
 
83
architecture rtl of pps_ei_2 is
84
begin
85
 
86
  ETC_adr <= PF_pc; -- Connexion of the PC to the memory address bus
87
 
88
  -- Set the results
89
  process (clock)
90
  begin
91
    if rising_edge(clock) then
92
      if reset='1' then
93
        EI_instr <= INS_NOP;
94
        EI_adr <= (others => '0');
95
        EI_it_ok <= '0';
96
      elsif stop_all2='0' then
97
        if clear='1' then
98
          -- Clear the stage
99
          EI_instr <= INS_NOP;
100
          EI_it_ok <= '0';
101
        elsif genop='1' and stop_ei='0' then
102
          -- Send a nop
103
          EI_instr <= INS_NOP;
104
          EI_it_ok <= '1';
105
        elsif stop_ei='0' then
106
          -- Normal evolution
107
          EI_adr <= PF_pc;
108
          EI_instr <= CTE_instr;
109
          EI_it_ok <= '1';
110
        end if;
111
      end if;
112
    end if;
113
  end process;
114
end rtl;

powered by: WebSVN 2.1.0

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