forked from aws/aws-fpga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fpga_hal_mbox_regs.h
62 lines (49 loc) · 1.57 KB
/
fpga_hal_mbox_regs.h
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
/*
* Copyright 2015-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. A copy of the
* License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file 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.
*/
/** @file
* FPGA HAL mailbox register definitions.
*/
#pragma once
#define BIT(bit) (1 << (bit))
#define FMB_BASE 0x0
#define FMB_REG(offset) (FMB_BASE + (offset))
#define FMB_REG_SH_VERSION FMB_REG(0x0)
#define FMB_REG_VIRT_DIP_LED FMB_REG(0x4)
/** Virtual DIP/LED register bit definitions */
enum {
FMB_VIRT_DIP_MASK = (1 << 16) - 1,
FMB_VIRT_LED_SHIFT = 16,
};
#define FMB_REG_STATUS FMB_REG(0xc)
/** Interrupt Status register bit definitions */
enum {
FMB_RX_EVT = BIT(0),
FMB_TX_EVT = BIT(1),
FMB_FLR_EVT = BIT(2),
};
#define FMB_REG_WR_INDEX FMB_REG(0x20)
#define FMB_REG_WR_DATA FMB_REG(0x24)
#define FMB_REG_WR_LEN FMB_REG(0x28)
#define FMB_REG_DEPTH FMB_REG(0x2c)
/** WR Depth register bit definitions */
enum {
/** Read only */
FMB_WR_DEPTH_MASK = BIT(16) - 1,
/** Trigger RAM init, cleared by HW when done */
FMB_WR_RAM_INIT_EN = BIT(31),
};
#define FMB_REG_RD_INDEX FMB_REG(0x30)
#define FMB_REG_RD_DATA FMB_REG(0x34)
#define FMB_REG_RD_LEN FMB_REG(0x38)