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

Subversion Repositories wrimm

[/] [wrimm/] [trunk/] [Example/] [WrimmExample_Top.vhd] - Blame information for rev 6

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

Line No. Rev Author Line
1 6 barryw
--Latest version of all project files available at http://opencores.org/project,wrimm
2
--See License.txt for license details
3
--See WrimmManual.pdf for the Wishbone Datasheet and implementation details.
4
--See wrimm subversion project for version history
5
 
6
library ieee;
7
  use ieee.std_logic_1164.all;
8
  use ieee.numeric_std.all;
9
 
10
  use work.WrimmPackage.all;
11
 
12
entity Wrimm_Top is
13
  port (
14
    WishboneClock       : in  std_logic;
15
    WishboneReset       : out std_logic;
16
 
17
    MasterPStrobe       : in  std_logic;
18
    MasterPWrEn         : in  std_logic;
19
    MasterPCyc          : in  std_logic;
20
    MasterPAddr         : in  WbAddrType;
21
    MasterPDataToSlave  : in  WbDataType;
22
    MasterPAck          : out std_logic;
23
    MasterPErr          : out std_logic;
24
    MasterPRty          : out std_logic;
25
    MasterPDataFrSlave  : out WbDataType;
26
 
27
    MasterQStrobe       : in  std_logic;
28
    MasterQWrEn         : in  std_logic;
29
    MasterQCyc          : in  std_logic;
30
    MasterQAddr         : in  WbAddrType;
31
    MasterQDataToSlave  : in  WbDataType;
32
    MasterQAck          : out std_logic;
33
    MasterQErr          : out std_logic;
34
    MasterQRty          : out std_logic;
35
    MasterQDataFrSlave  : out WbDataType;
36
 
37
    StatusRegA          : in  std_logic_vector(0 to 7);
38
    StatusRegB          : in  std_logic_vector(0 to 7);
39
    StatusRegC          : in  std_logic_vector(0 to 7);
40
 
41
    SettingRegX         : out std_logic_vector(0 to 7);
42
    SettingRstX         : in  std_logic;
43
    SettingRegY         : out std_logic_vector(0 to 7);
44
    SettingRstY         : in  std_logic;
45
    SettingRegZ         : out std_logic_vector(0 to 7);
46
    SettingRstZ         : in  std_logic;
47
 
48
    TriggerRegR         : out std_logic;
49
    TriggerClrR         : in  std_logic;
50
    TriggerRegS         : out std_logic;
51
    TriggerClrS         : in  std_logic;
52
    TriggerRegT         : out std_logic;
53
    TriggerClrT         : in  std_logic;
54
 
55
    rstZ                : in  std_logic);  --Global asyncronous reset for initialization
56
end entity Wrimm_Top;
57
 
58
architecture structure of Wrimm_Top is
59
 
60
  component Wrimm is
61
    --generic (
62
    --  MasterParams      : WbMasterDefType;
63
    --  SlaveParams       : WbSlaveDefType;
64
    --  StatusParams      : StatusFieldDefType;
65
    --  SettingParams     : SettingFieldDefType;
66
    --  TriggerParams     : TriggerFieldDefType);
67
    port (
68
      WbClk             : in  std_logic;
69
      WbRst             : out std_logic;
70
      WbMasterIn        : in  WbMasterOutArray; --Signals from Masters
71
      WbMasterOut       : out WbSlaveOutArray;  --Signals to Masters
72
    --  WbSlaveIn         : out WbMasterOutArray;
73
    --  WbSlaveOut        : in  WbSlaveOutArray;
74
      StatusRegs        : in  StatusArrayType;
75
      SettingRegs       : out SettingArrayType;
76
      SettingRsts       : in  SettingArrayBitType;
77
      Triggers          : out TriggerArrayType;
78
      TriggerClr        : in  TriggerArrayType;
79
      rstZ              : in  std_logic);                         --Asynchronous reset
80
  end component Wrimm;
81
 
82
  signal masterQOut           : WbSlaveOutType;
83
  signal masterQIn            : WbMasterOutType;
84
 
85
begin
86
    MasterQAck          <= masterQOut.ack;
87
    MasterQErr          <= masterQOut.err;
88
    MasterQRty          <= masterQOut.rty;
89
    MasterQDataFrSlave  <= masterQOut.data;
90
 
91
    masterQIn.strobe    <= MasterQStrobe;
92
    masterQIn.wren      <= MasterQWrEn;
93
    masterQIn.cyc       <= MasterQCyc;
94
    masterQIn.addr      <= MasterQAddr;
95
    masterQIn.data      <= MasterQDataToSlave;
96
 
97
  instWrimm: Wrimm
98
    --generic map(
99
    --  MasterParams      => ,
100
    --  SlaveParams       => ,
101
    --  StatusParams      => StatusParams,
102
    --  SettingParams     => SettingParams,
103
    --  TriggerParams     => TriggerParams)
104
    port map(
105
      WbClk                 => WishboneClock,
106
      WbRst                 => WishboneReset,
107
      WbMasterIn(P).strobe  => MasterPStrobe,
108
      WbMasterIn(P).wren    => MasterPWrEn,
109
      WbMasterIn(P).cyc     => MasterPCyc,
110
      WbMasterIn(P).addr    => MasterPAddr,
111
      WbMasterIn(P).data    => MasterPDataToSlave,
112
      WbMasterIn(Q)         => masterQIn,
113
      WbMasterOut(P).ack    => MasterPAck,
114
      WbMasterOut(P).err    => MasterPErr,
115
      WbMasterOut(P).rty    => MasterPRty,
116
      WbMasterOut(P).data   => MasterPDataFrSlave,
117
      WbMasterOut(Q)        => masterQOut,
118
      --WbSlaveIn         => ,
119
      --WbSlaveOut        => ,
120
      StatusRegs(StatusA)   => StatusRegA,
121
      StatusRegs(StatusB)   => StatusRegB,
122
      StatusRegs(StatusC)   => StatusRegC,
123
      SettingRegs(SettingX) => SettingRegX,
124
      SettingRegs(SettingY) => SettingRegY,
125
      SettingRegs(SettingZ) => SettingRegZ,
126
      SettingRsts(SettingX) => SettingRstX,
127
      SettingRsts(SettingY) => SettingRstY,
128
      SettingRsts(SettingZ) => SettingRstZ,
129
      Triggers(TriggerR)    => TriggerRegR,
130
      Triggers(TriggerS)    => TriggerRegS,
131
      Triggers(TriggerT)    => TriggerRegT,
132
      TriggerClr(TriggerR)  => TriggerClrR,
133
      TriggerClr(TriggerS)  => TriggerClrS,
134
      TriggerClr(TriggerT)  => TriggerClrT,
135
      rstZ                  => rstZ);             --Asynchronous reset
136
 
137
end architecture structure;

powered by: WebSVN 2.1.0

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