1 |
2 |
atalla |
--this is place were configuration to the port MAC and IP AND subnet mask is written to all the load Balancer
|
2 |
|
|
LIBRARY IEEE;
|
3 |
|
|
USE IEEE.STD_LOGIC_1164.ALL;
|
4 |
|
|
|
5 |
|
|
package config is
|
6 |
|
|
|
7 |
|
|
TYPE mac_type IS ARRAY (0 TO 3) OF STD_LOGIC_VECTOR(47 DOWNTO 0);
|
8 |
|
|
CONSTANT mac_array : mac_type:=(X"AAAAAAAAAAAA", X"BBBBBBBBBBBB", X"CCCCCCCCCCCC", X"DDDDDDDDDDDD");
|
9 |
|
|
TYPE ip_type IS ARRAY (0 TO 3) OF STD_LOGIC_VECTOR(31 DOWNTO 0);
|
10 |
|
|
CONSTANT ip_array : ip_type:=(X"C0A80101", X"C0A80201",X"C0A80301",X"C0A80401");
|
11 |
|
|
TYPE subnet_type IS ARRAY (0 TO 3) OF STD_LOGIC_VECTOR(31 DOWNTO 0);
|
12 |
|
|
CONSTANT subnet_array : subnet_type:=(X"FFFFFF00", X"FFFFFF00",X"FFFFFF00",X"FFFFFF00");
|
13 |
|
|
TYPE vlan_type IS ARRAY (0 TO 3) OF STD_LOGIC_VECTOR(11 DOWNTO 0);
|
14 |
|
|
CONSTANT vlan_array : vlan_type:=(X"002", X"003",X"004",X"005");
|
15 |
|
|
TYPE status_type IS ARRAY (0 TO 3) OF STD_LOGIC;
|
16 |
|
|
CONSTANT status_array : status_type:=('1','1','0','0');
|
17 |
|
|
-- DIST message configuration--------------
|
18 |
|
|
-- DIST_MULTICAST_ALL
|
19 |
|
|
-- DIST_MULTICAST_LB
|
20 |
|
|
-- DIST_PORT
|
21 |
|
|
-- |0 7|8 15|16 32|
|
22 |
|
|
-- +---------+---------+-------------------+
|
23 |
|
|
-- | VERSION | MSGType | NodeId |
|
24 |
|
|
-- +---------+---------+-------------------+
|
25 |
|
|
-- | Flags | NodeType |
|
26 |
|
|
-- +---------+---------+-------------------+
|
27 |
|
|
-- | MSGSeqnum | MSGLength |
|
28 |
|
|
-- +-------------------+-------------------+
|
29 |
|
|
CONSTANT VC_MAC : STD_LOGIC_VECTOR(47 DOWNTO 0) :=X"010101010101";--255.255.255.255
|
30 |
|
|
CONSTANT DIST_MULTICAST_ALL : STD_LOGIC_VECTOR(31 DOWNTO 0) :=X"FFFFFFFF";--255.255.255.255
|
31 |
|
|
CONSTANT DIST_MULTICAST_LB : STD_LOGIC_VECTOR(31 DOWNTO 0) :=X"EFFFFFFF";--239.255.255.255
|
32 |
|
|
CONSTANT DIST_UNICAST_LB : STD_LOGIC_VECTOR(31 DOWNTO 0) :=X"C0A80501";--192.168.5.1
|
33 |
|
|
CONSTANT DIST_PORT : STD_LOGIC_VECTOR(15 DOWNTO 0) :=X"8989";
|
34 |
|
|
CONSTANT DIST_VER : STD_LOGIC_VECTOR(7 DOWNTO 0) :=X"01";
|
35 |
|
|
CONSTANT DIST_MSGTYPE : STD_LOGIC_VECTOR(7 DOWNTO 0) :=X"01";--Hello Mesages
|
36 |
|
|
CONSTANT NODE_ID : STD_LOGIC_VECTOR(15 DOWNTO 0) :=X"4545";
|
37 |
|
|
CONSTANT NODE_TYPE : STD_LOGIC_VECTOR(23 DOWNTO 0) :=X"000003";--LoadBalancer
|
38 |
|
|
CONSTANT AGING_TIMEOUT : INTEGER :=125000;--LoadBalancer
|
39 |
|
|
CONSTANT TIMER_PERIOD : INTEGER :=5250000;
|
40 |
|
|
CONSTANT DEFAULT_INT_PORT : STD_LOGIC_VECTOR(15 DOWNTO 0) :=X"0001";
|
41 |
|
|
|
42 |
|
|
end config;
|
43 |
|
|
|