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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [techmap/] [maps/] [cpu_disas_net.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Package:     cpu_disas_net
20
-- File:        cpu_disas_net.vhd
21
-- Author:      Jiri Gaisler, Gaisler Research
22
-- Description: SPARC disassembler according to SPARC V8 manual 
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
-- pragma translate_off
28
library grlib;
29
use grlib.stdlib.all;
30
use grlib.sparc.all;
31
use grlib.sparc_disas.all;
32
-- pragma translate_on
33
 
34
entity cpu_disas_net is
35
port (
36
  clk   : in std_ulogic;
37
  rstn  : in std_ulogic;
38
  dummy : out std_ulogic;
39
  inst  : in std_logic_vector(31 downto 0);
40
  pc    : in std_logic_vector(31 downto 2);
41
  result: in std_logic_vector(31 downto 0);
42
  index : in std_logic_vector(3 downto 0);
43
  wreg  : in std_ulogic;
44
  annul : in std_ulogic;
45
  holdn : in std_ulogic;
46
  pv    : in std_ulogic;
47
  trap  : in std_ulogic;
48
  disas : in std_ulogic);
49
end;
50
 
51
architecture behav of cpu_disas_net is
52
begin
53
 
54
  dummy <= '1';
55
 
56
-- pragma translate_off
57
  trc : process(clk)
58
    variable valid : boolean;
59
    variable op : std_logic_vector(1 downto 0);
60
    variable op3 : std_logic_vector(5 downto 0);
61
    variable fpins, fpld : boolean;
62
    variable iindex : integer;
63
  begin
64
      iindex := conv_integer(index);
65
      op := inst(31 downto 30); op3 := inst(24 downto 19);
66
      fpins := (op = FMT3) and ((op3 = FPOP1) or (op3 = FPOP2));
67
      fpld := (op = LDST) and ((op3 = LDF) or (op3 = LDDF) or (op3 = LDFSR));
68
      valid := (((not annul) and pv) = '1') and (not ((fpins or fpld) and (trap = '0')));
69
      valid := valid and (holdn = '1');
70
    if rising_edge(clk) and (rstn = '1') and (disas = '1') then
71
      print_insn (iindex, pc(31 downto 2) & "00", inst,
72
                  result, valid, trap = '1', wreg = '1', false);
73
    end if;
74
  end process;
75
-- pragma translate_on
76
 
77
end;
78
 
79
library ieee;
80
use ieee.std_logic_1164.all;
81
-- pragma translate_off
82
library grlib;
83
use grlib.stdlib.all;
84
use grlib.sparc.all;
85
use grlib.sparc_disas.all;
86
-- pragma translate_on
87
 
88
entity fpu_disas_net is
89
port (
90
  clk   : in std_ulogic;
91
  rstn  : in std_ulogic;
92
  dummy : out std_ulogic;
93
  wr2inst  : in std_logic_vector(31 downto 0);
94
  wr2pc    : in std_logic_vector(31 downto 2);
95
  divinst  : in std_logic_vector(31 downto 0);
96
  divpc    : in std_logic_vector(31 downto 2);
97
  dbg_wrdata: in std_logic_vector(63 downto 0);
98
  index : in std_logic_vector(3 downto 0);
99
  dbg_wren : in std_logic_vector(1 downto 0);
100
  resv  : in std_ulogic;
101
  ld    : in std_ulogic;
102
  rdwr  : in std_ulogic;
103
  ccwr  : in std_ulogic;
104
  rdd   : in std_ulogic;
105
  div_valid  : in std_ulogic;
106
  holdn : in std_ulogic;
107
  disas : in std_ulogic);
108
end;
109
 
110
architecture behav of fpu_disas_net is
111
begin
112
 
113
  dummy <= '1';
114
 
115
-- pragma translate_off
116
 
117
  trc : process(clk)
118
    variable valid : boolean;
119
    variable op : std_logic_vector(1 downto 0);
120
    variable op3 : std_logic_vector(5 downto 0);
121
    variable fpins, fpld : boolean;
122
    variable iindex : integer;
123
  begin
124
    iindex := conv_integer(index);
125
 
126
    if rising_edge(clk) and (rstn = '1') and (disas /= '0') then
127
         valid := ((((rdwr and not ld) or ccwr or (ld and resv)) and holdn) = '1');
128
         print_fpinsn(0, wr2pc(31 downto 2) & "00", wr2inst, dbg_wrdata,
129
                      (rdd = '1'), valid, false, (dbg_wren /= "00"));
130
         print_fpinsn(0, divpc(31 downto 2) & "00", divinst, dbg_wrdata,
131
                      (rdd = '1'), (div_valid and holdn) = '1', false, (dbg_wren /= "00"));
132
    end if;
133
  end process;
134
 
135
-- pragma translate_on
136
 
137
end;
138
 
139
 

powered by: WebSVN 2.1.0

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