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/] [gaisler/] [spacewire/] [grspwm.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
-- Entity:      grspwm
20
-- File:        grspwm.vhd
21
-- Author:      Nils-Johan Wessman - Gaisler Research
22
-- Description: Module to select between grspw and grspw2
23
------------------------------------------------------------------------------
24
library ieee;
25
use ieee.std_logic_1164.all;
26
library grlib;
27
use grlib.amba.all;
28
library techmap;
29
use techmap.gencomp.all;
30
library gaisler;
31
use gaisler.spacewire.all;
32
 
33
entity grspwm is
34
  generic(
35
    tech         : integer range 0 to NTECH := DEFFABTECH;
36
    hindex       : integer range 0 to NAHBMST-1 := 0;
37
    pindex       : integer range 0 to NAPBSLV-1 := 0;
38
    paddr        : integer range 0 to 16#FFF#   := 0;
39
    pmask        : integer range 0 to 16#FFF#   := 16#FFF#;
40
    pirq         : integer range 0 to NAHBIRQ-1 := 0;
41
    sysfreq      : integer := 10000;                          -- spw1
42
    usegen       : integer range 0 to 1  := 1;                -- spw1
43
    nsync        : integer range 1 to 2  := 1;
44
    rmap         : integer range 0 to 1  := 0;
45
    rmapcrc      : integer range 0 to 1  := 0;
46
    fifosize1    : integer range 4 to 32 := 32;
47
    fifosize2    : integer range 16 to 64 := 64;
48
    rxclkbuftype : integer range 0 to 2 := 0;
49
    rxunaligned  : integer range 0 to 1 := 0;
50
    rmapbufs     : integer range 2 to 8 := 4;
51
    ft           : integer range 0 to 2 := 0;
52
    scantest     : integer range 0 to 1 := 0;
53
    techfifo     : integer range 0 to 1 := 1;
54
    netlist      : integer range 0 to 1 := 0;                 -- spw1
55
    ports        : integer range 1 to 2 := 1;
56
    dmachan      : integer range 1 to 4 := 1;                 -- spw2
57
    memtech      : integer range 0 to NTECH := DEFMEMTECH;
58
    spwcore      : integer range 1 to 2 := 2                  -- select spw core spw1/spw2
59
  );
60
  port(
61
    rst        : in  std_ulogic;
62
    clk        : in  std_ulogic;
63
    txclk      : in  std_ulogic;
64
    ahbmi      : in  ahb_mst_in_type;
65
    ahbmo      : out ahb_mst_out_type;
66
    apbi       : in  apb_slv_in_type;
67
    apbo       : out apb_slv_out_type;
68
    swni       : in  grspw_in_type;
69
    swno       : out grspw_out_type
70
  );
71
end entity;
72
 
73
architecture rtl of grspwm is
74
begin
75
 
76
  spw1 : if spwcore = 1 generate
77
    u0 : grspw
78
    generic map(tech, hindex, pindex, paddr, pmask, pirq,
79
          sysfreq, usegen, nsync, rmap, rmapcrc, fifosize1, fifosize2,
80
          rxclkbuftype, rxunaligned, rmapbufs, ft, scantest, techfifo,
81
          netlist, ports, memtech)
82
    port map(rst, clk, txclk, ahbmi, ahbmo, apbi, apbo, swni, swno);
83
  end generate;
84
 
85
  spw2 : if spwcore = 2 generate
86
    u0 : grspw2
87
  generic map(tech, hindex, pindex, paddr, pmask, pirq,
88
          nsync, rmap, rmapcrc, fifosize1, fifosize2, rxclkbuftype,
89
          rxunaligned, rmapbufs, ft, scantest, techfifo, ports,
90
          dmachan, memtech)
91
  port map(rst, clk, txclk, ahbmi, ahbmo, apbi, apbo, swni, swno);
92
  end generate;
93
 
94
end architecture;
95
 
96
 

powered by: WebSVN 2.1.0

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