summaryrefslogtreecommitdiffhomepage
path: root/src/cont_params.v
blob: cbdddccf266713b45fc3bb447290c20e50cf645f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 *   cont_params.v
 *
 *	 Copyright (C) 2024-2025 Private Island Networks Inc.
 *   Copyright (C) 2018-2023 Mind Chasers Inc.
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *   
 *   function:	Controller related parameters
 *		
 */
 
 
`ifdef INCLUDED

/* Message Protocol:
 * Type: 8-bit	(rx_cnt==4)
 * Token: 8-bit	(rx_cnt==5)
 * Address: 16-bit (rx_cnt==6,7)
 * Data: 32-bit (rx_cnt==8,9,10,11)
 */
 
localparam MSG_SZ = 8'h8;

//  Message Types (16-bit address)
localparam  MSG_TYPE_NULL = 8'h0;
localparam  MSG_TYPE_WRITE = 8'h1;
localparam 	MSG_TYPE_READ = 8'h2; 
localparam  MSG_TYPE_REPLY_SUCCESS = 8'h3;
localparam  MSG_TYPE_REPLY_ERROR = 8'h4;
localparam  MSG_TYPE_NOTIY = 8'h5;


localparam MSG_CONTROLLER_ADDR = 16'h0000;
localparam MSG_MAC_ADDR = 16'h0100;
localparam MSG_PKT_FILTER_ADDR = 16'h0200;
localparam MSG_SWITCH_ADDR = 16'h0500;
localparam MSG_MDIO_ADDR = 16'h0600;
localparam MSG_MLE_ADDR = 16'h0700;
localparam MSG_INVALID_ADDR = 16'h0800;


localparam HF_TX_WR_PTR_ADDR = 16'd0;
localparam HF_TX_RD_PTR_ADDR = 16'd1;		// read only
localparam HF_TX_BYTE_CNT_ADDR = 16'd1;	// write only
localparam HF_RX_WR_PTR_LTCH_ADDR = 16'd2;
localparam HF_NULL = 16'd3;
localparam HF_RESET_PTRS = 16'd4;


`endif

Highly Recommended Verilog Books