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

Subversion Repositories wrimm

[/] [wrimm/] [trunk/] [WrimmPackage.vhd] - Blame information for rev 10

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 barryw
--Propery of Tecphos Inc.  See License.txt for license details
2 9 barryw
--Latest version of all project files available at
3
--http://opencores.org/project,wrimm
4 3 barryw
--See WrimmManual.pdf for the Wishbone Datasheet and implementation details.
5
--See wrimm subversion project for version history
6
 
7 9 barryw
------------------------------------------------------------
8
--**********************************************************
9
--!!!!!!!!!!!!!!!!!!    EDIT THIS FILE     !!!!!!!!!!!!!!!!!
10
--Save a copy of this file in a project specific directory.
11
--Each project may have a different WrimmPackage.vhd file.
12
--Hopefully wrimm.vhd will not require modification for each
13
--project.
14
-->>>>>>>>>>>>>>>>>>>>>>>Start of Customization Example>>>>>>>>>>>>>>>>>>>>>>>>>
15
--  Edit or at least verify the data in all the sections of this file
16
--  surrounded by the indicator lines shown above and below this text.
17
--<<<<<<<<<<<<<<<<<<<<<<<End of Customization Ecample<<<<<<<<<<<<<<<<<<<<<<<<<<<
18
--  Hopefully the code ouside those marked sections
19
--  will not require modification.
20
--**********************************************************
21
------------------------------------------------------------
22
 
23 10 barryw
library ieee;
24
use ieee.std_logic_1164.all;
25
 
26
package WrimmPackage is
27 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Wishbone Bus Parameters >>>>>>>>>>>>>>>>>>>>>>
28 10 barryw
  constant WbAddrBits : integer := 4;
29
  constant WbDataBits : integer := 8;
30 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Wishbone Bus Parameters <<<<<<<<<<<<<<<<<<<<<<<<
31 10 barryw
 
32
  subtype WbAddrType is std_logic_vector(0 to WbAddrBits-1);
33
  subtype WbDataType is std_logic_vector(0 to WbDataBits-1);
34
 
35
  type WbMasterOutType is record
36
    Strobe : std_logic;                 --Required
37
    WrEn   : std_logic;                 --Required
38
    Addr   : WbAddrType;                --Required
39
    Data   : WbDataType;
40
    --DataTag       : std_logic_vector(0 to 1);   --Write,Set,Clear,Toggle
41
    Cyc    : std_logic;                 --Required
42
    --CycType       : std_logic_vector(0 to 2);   --For Burst Cycles
43
  end record WbMasterOutType;
44
 
45
  type WbSlaveOutType is record
46
    Ack  : std_logic;                   --Required
47
    Err  : std_logic;
48
    Rty  : std_logic;
49
    Data : WbDataType;
50
  end record WbSlaveOutType;
51
 
52 9 barryw
--==========================================================
53
------------------------------------------------------------
54
--  Master Interfaces: provides interfaces for 1-n Masters
55
------------------------------------------------------------
56 4 barryw
  type WbMasterType is (
57 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Wishbone Master List >>>>>>>>>>>>>>>>>>>>>>>>>
58 4 barryw
    Q,
59
    P);
60 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Wishbone Master List <<<<<<<<<<<<<<<<<<<<<<<<<<<
61 4 barryw
 
62
  type WbMasterOutArray is array (WbMasterType) of WbMasterOutType;
63 10 barryw
  type WbSlaveOutArray is array (WbMasterType) of WbSlaveOutType;
64 4 barryw
 
65 10 barryw
  type WbMasterGrantType is array (WbMasterType'left to WbMasterType'right) of std_logic;
66
--==========================================================
67
------------------------------------------------------------
68
--  Status Registers: Report results from other modules
69
------------------------------------------------------------
70
  type StatusFieldParams is record
71
    BitWidth : integer;
72
    MSBLoc   : integer;
73
    Address  : WbAddrType;
74
  end record StatusFieldParams;
75
 
76
  type StatusFieldType is (
77 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Status Field List >>>>>>>>>>>>>>>>>>>>>>>>>>>>
78 10 barryw
    StatusA,
79
    StatusB,
80
    StatusC);
81 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Status Field List <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
82 10 barryw
 
83
  type StatusArrayType is array (StatusFieldType'left to StatusFieldType'right) of WbDataType;
84
  type StatusArrayBitType is array (StatusFieldType'left to StatusFieldType'right) of std_logic;
85
  type StatusFieldDefType is array (StatusFieldType'left to StatusFieldType'right) of StatusFieldParams;
86
 
87
  constant StatusParams : StatusFieldDefType := (
88 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Status Field Parameters >>>>>>>>>>>>>>>>>>>>>>
89 10 barryw
    StatusA => (BitWidth => 8, MSBLoc => 0, Address => x"0"),
90
    StatusB => (BitWidth => 8, MSBLoc => 0, Address => x"1"),
91
    StatusC => (BitWidth => 8, MSBLoc => 0, Address => x"2"));
92 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Status Field Parameters <<<<<<<<<<<<<<<<<<<<<<<<
93
--==========================================================
94 10 barryw
------------------------------------------------------------
95
--  Setting Registers: Provide config bits to other modules
96
------------------------------------------------------------
97
  type SettingFieldParams is record
98
    BitWidth : integer;
99
    MSBLoc   : integer;
100
    Address  : WbAddrType;
101
    Default  : WbDataType;
102
  end record SettingFieldParams;
103
 
104
  type SettingFieldType is (
105 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Setting Field List >>>>>>>>>>>>>>>>>>>>>>>>>>>
106 10 barryw
    SettingX,
107
    SettingY,
108
    SettingZ);
109 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Setting Field List <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
110 10 barryw
 
111
  type SettingArrayType is array (SettingFieldType'left to SettingFieldType'right) of WbDataType;
112
  type SettingArrayBitType is array (SettingFieldType'left to SettingFieldType'right) of std_logic;
113
  type SettingFieldDefType is array (SettingFieldType'left to SettingFieldType'right) of SettingFieldParams;
114
 
115
  constant SettingParams : SettingFieldDefType := (
116 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Setting Field Parameters >>>>>>>>>>>>>>>>>>>>>
117 10 barryw
    SettingX => (BitWidth => 8, MSBLoc => 0, Address => x"6", Default => x"05"),
118
    SettingY => (BitWidth => 8, MSBLoc => 0, Address => x"7", Default => x"3C"),
119
    SettingZ => (BitWidth => 8, MSBLoc => 0, Address => x"8", Default => x"AA"));
120 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Setting Field Parameters<<<<<<<<<<<<<<<<<<<<<<<<
121 10 barryw
--==========================================================
122
------------------------------------------------------------
123
--  Trigger Registers, Launch other processes, cleared by those processes
124
------------------------------------------------------------
125
  type TriggerFieldParams is record
126
    BitLoc  : integer;
127
    Address : WbAddrType;
128
  end record TriggerFieldParams;
129
 
130
  type TriggerFieldType is (
131 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Trigger List >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
132 10 barryw
    TriggerR,
133
    TriggerS,
134
    TriggerT);
135 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Trigger List <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
136 10 barryw
 
137
  type TriggerArrayType is array (TriggerFieldType'left to TriggerFieldType'right) of std_logic;
138
  type TriggerFieldDefType is array (TriggerFieldType'left to TriggerFieldType'right) of TriggerFieldParams;
139
 
140
  constant TriggerParams : TriggerFieldDefType := (
141 9 barryw
-->>>>>>>>>>>>>>>>>>>>>>>Start of Trigger Parameters >>>>>>>>>>>>>>>>>>>>>>>>>>>
142 10 barryw
    TriggerR => (BitLoc => 7, Address => x"A"),
143
    TriggerS => (BitLoc => 7, Address => x"B"),
144
    TriggerT => (BitLoc => 7, Address => x"C"));
145 9 barryw
--<<<<<<<<<<<<<<<<<<<<<<<End of Trigger Parameters <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
146 10 barryw
 
147
end package WrimmPackage;
148
 
149
--package body WishBonePackage is
150
--
151
-- No package functions (yet)
152
--
153
--end package body WishBonePackage;

powered by: WebSVN 2.1.0

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