1 |
145 |
lanttu |
-------------------------------------------------------------------------------
|
2 |
|
|
-- Title : HIBI package, command constants
|
3 |
|
|
-- Project : HIBI
|
4 |
|
|
-------------------------------------------------------------------------------
|
5 |
|
|
-- File : hibiv3_pkg.vhd
|
6 |
|
|
-- Authors : Lasse Lehtonen
|
7 |
|
|
-- Company : Tampere University of Technology
|
8 |
|
|
-- Created :
|
9 |
|
|
-- Last update: 2012-02-06
|
10 |
|
|
-- Platform :
|
11 |
|
|
-- Standard : VHDL'93
|
12 |
|
|
-------------------------------------------------------------------------------
|
13 |
|
|
-- Description: Command constants for HIBI. Use these and not magic numbers.
|
14 |
|
|
--
|
15 |
|
|
-------------------------------------------------------------------------------
|
16 |
|
|
-- Copyright (c) 2010 Tampere University of Technology
|
17 |
|
|
--
|
18 |
|
|
--
|
19 |
|
|
-------------------------------------------------------------------------------
|
20 |
|
|
-- Revisions :
|
21 |
|
|
-- Date Version Author Description
|
22 |
|
|
-- 2010-10-13 1.0 ase Created
|
23 |
|
|
-------------------------------------------------------------------------------
|
24 |
|
|
-- Funbase IP library Copyright (C) 2011 TUT Department of Computer Systems
|
25 |
|
|
--
|
26 |
|
|
-- This file is part of HIBI
|
27 |
|
|
--
|
28 |
|
|
-- This source file may be used and distributed without
|
29 |
|
|
-- restriction provided that this copyright statement is not
|
30 |
|
|
-- removed from the file and that any derivative work contains
|
31 |
|
|
-- the original copyright notice and the associated disclaimer.
|
32 |
|
|
--
|
33 |
|
|
-- This source file is free software; you can redistribute it
|
34 |
|
|
-- and/or modify it under the terms of the GNU Lesser General
|
35 |
|
|
-- Public License as published by the Free Software Foundation;
|
36 |
|
|
-- either version 2.1 of the License, or (at your option) any
|
37 |
|
|
-- later version.
|
38 |
|
|
--
|
39 |
|
|
-- This source is distributed in the hope that it will be
|
40 |
|
|
-- useful, but WITHOUT ANY WARRANTY; without even the implied
|
41 |
|
|
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
42 |
|
|
-- PURPOSE. See the GNU Lesser General Public License for more
|
43 |
|
|
-- details.
|
44 |
|
|
--
|
45 |
|
|
-- You should have received a copy of the GNU Lesser General
|
46 |
|
|
-- Public License along with this source; if not, download it
|
47 |
|
|
-- from http://www.opencores.org/lgpl.shtml
|
48 |
|
|
-------------------------------------------------------------------------------
|
49 |
|
|
|
50 |
|
|
library ieee;
|
51 |
|
|
use ieee.std_logic_1164.all;
|
52 |
|
|
use ieee.numeric_std.all;
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
package hibiv3_pkg is
|
56 |
|
|
-----------------------------------------------------------------------------
|
57 |
|
|
-- DO NOT EDIT !
|
58 |
|
|
-----------------------------------------------------------------------------
|
59 |
|
|
|
60 |
|
|
-- IDLE : No operation
|
61 |
|
|
-- WR : Write, posted, (same as old write)
|
62 |
|
|
-- RD : Read
|
63 |
|
|
-- RDL : Read linked, IP takes care
|
64 |
|
|
-- WRNP : Write, nonposted, IP responsible for answering
|
65 |
|
|
-- WRC : Write, conditional, IP responsible for this
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
constant comm_width_c : integer := 5; -- width of the command bus
|
70 |
|
|
constant priority_bit : integer := 0; -- which bit is priority
|
71 |
|
|
|
72 |
|
|
constant IDLE_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
73 |
|
|
std_logic_vector(to_unsigned(0, comm_width_c));
|
74 |
|
|
constant NOT_USED_1_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
75 |
|
|
std_logic_vector(to_unsigned(1, comm_width_c));
|
76 |
|
|
|
77 |
|
|
constant DATA_WR_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
78 |
|
|
std_logic_vector(to_unsigned(2, comm_width_c));
|
79 |
|
|
constant MSG_WR_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
80 |
|
|
std_logic_vector(to_unsigned(3, comm_width_c));
|
81 |
|
|
|
82 |
|
|
constant DATA_RD_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
83 |
|
|
std_logic_vector(to_unsigned(4, comm_width_c));
|
84 |
|
|
constant MSG_RD_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
85 |
|
|
std_logic_vector(to_unsigned(5, comm_width_c));
|
86 |
|
|
|
87 |
|
|
constant DATA_RDL_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
88 |
|
|
std_logic_vector(to_unsigned(6, comm_width_c));
|
89 |
|
|
constant MSG_RDL_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
90 |
|
|
std_logic_vector(to_unsigned(7, comm_width_c));
|
91 |
|
|
|
92 |
|
|
constant DATA_WRNP_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
93 |
|
|
std_logic_vector(to_unsigned(8, comm_width_c));
|
94 |
|
|
constant MSG_WRNP_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
95 |
|
|
std_logic_vector(to_unsigned(9, comm_width_c));
|
96 |
|
|
|
97 |
|
|
constant DATA_WRC_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
98 |
|
|
std_logic_vector(to_unsigned(10, comm_width_c));
|
99 |
|
|
constant MSG_WRC_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
100 |
|
|
std_logic_vector(to_unsigned(11, comm_width_c));
|
101 |
|
|
|
102 |
|
|
constant NOT_USED_2_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
103 |
|
|
std_logic_vector(to_unsigned(12, comm_width_c));
|
104 |
|
|
constant EXCL_LOCK_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
105 |
|
|
std_logic_vector(to_unsigned(13, comm_width_c));
|
106 |
|
|
|
107 |
|
|
constant NOT_USED_3_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
108 |
|
|
std_logic_vector(to_unsigned(14, comm_width_c));
|
109 |
|
|
constant EXCL_WR_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
110 |
|
|
std_logic_vector(to_unsigned(15, comm_width_c));
|
111 |
|
|
|
112 |
|
|
constant NOT_USED_4_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
113 |
|
|
std_logic_vector(to_unsigned(16, comm_width_c));
|
114 |
|
|
constant EXCL_RD_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
115 |
|
|
std_logic_vector(to_unsigned(17, comm_width_c));
|
116 |
|
|
|
117 |
|
|
constant NOT_USED_5_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
118 |
|
|
std_logic_vector(to_unsigned(18, comm_width_c));
|
119 |
|
|
constant EXCL_RELEASE_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
120 |
|
|
std_logic_vector(to_unsigned(19, comm_width_c));
|
121 |
|
|
|
122 |
|
|
constant NOT_USED_6_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
123 |
|
|
std_logic_vector(to_unsigned(20, comm_width_c));
|
124 |
|
|
constant CFG_WR_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
125 |
|
|
std_logic_vector(to_unsigned(21, comm_width_c));
|
126 |
|
|
|
127 |
|
|
constant NOT_USED_7_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
128 |
|
|
std_logic_vector(to_unsigned(22, comm_width_c));
|
129 |
|
|
constant CFG_RD_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
130 |
|
|
std_logic_vector(to_unsigned(23, comm_width_c));
|
131 |
|
|
|
132 |
|
|
constant NOT_USED_8_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
133 |
|
|
std_logic_vector(to_unsigned(24, comm_width_c));
|
134 |
|
|
constant NOT_USED_9_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
135 |
|
|
std_logic_vector(to_unsigned(25, comm_width_c));
|
136 |
|
|
|
137 |
|
|
constant NOT_USED_10_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
138 |
|
|
std_logic_vector(to_unsigned(26, comm_width_c));
|
139 |
|
|
constant NOT_USED_11_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
140 |
|
|
std_logic_vector(to_unsigned(27, comm_width_c));
|
141 |
|
|
|
142 |
|
|
constant NOT_USED_12_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
143 |
|
|
std_logic_vector(to_unsigned(28, comm_width_c));
|
144 |
|
|
constant NOT_USED_13_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
145 |
|
|
std_logic_vector(to_unsigned(29, comm_width_c));
|
146 |
|
|
|
147 |
|
|
constant NOT_USED_14_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
148 |
|
|
std_logic_vector(to_unsigned(30, comm_width_c));
|
149 |
|
|
constant NOT_USED_15_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
150 |
|
|
std_logic_vector(to_unsigned(31, comm_width_c));
|
151 |
|
|
|
152 |
|
|
-----------------------------------------------------------------------------
|
153 |
|
|
-- OLD COMMAND CONSTANTS FOR COMPATIBILITY (DON'T USE IN FUTURE)
|
154 |
|
|
-----------------------------------------------------------------------------
|
155 |
|
|
|
156 |
|
|
constant w_cfg_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
157 |
|
|
CFG_WR_c;
|
158 |
|
|
constant w_data_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
159 |
|
|
DATA_WRNP_c;
|
160 |
|
|
constant w_msg_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
161 |
|
|
MSG_WRNP_c;
|
162 |
|
|
|
163 |
|
|
constant r_data_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
164 |
|
|
DATA_RD_c;
|
165 |
|
|
constant r_cfg_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
166 |
|
|
CFG_RD_c;
|
167 |
|
|
|
168 |
|
|
-- These are not supported anymore
|
169 |
|
|
--
|
170 |
|
|
--constant multicast_data_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
171 |
|
|
-- DATA_BCST_c;
|
172 |
|
|
--constant multicast_msg_c : std_logic_vector (comm_width_c-1 downto 0) :=
|
173 |
|
|
-- MSG_BCST_c;
|
174 |
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
end hibiv3_pkg;
|
179 |
|
|
|
180 |
|
|
|
181 |
|
|
|