-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuart.h
More file actions
27 lines (26 loc) · 690 Bytes
/
uart.h
File metadata and controls
27 lines (26 loc) · 690 Bytes
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
`ifndef __UART_HEADER__
`define __UART_HEADER__
`define UART_DIV_RATE 260
`define UART_DIV_CNT_W 9
`define UartDivCntBus 8:0
`define UartAddrBus 0:0
`define UART_ADDR_W 1
`define UartAddrLoc 0:0
`define UART_ADDR_STATUS 1'h0
`define UART_ADDR_DATA 1'h1
`define UartCtrlIrqRx 0
`define UartCtrlIrqTx 1
`define UartCtrlBusyRx 2
`define UartCtrlBusyTx 3
`define UartStateBus 0:0
`define UART_STATE_IDLE 1'b0
`define UART_STATE_TX 1'b1
`define UART_STATE_RX 1'b1
`define UartBitCntBus 3:0
`define UART_BIT_CNT_W 4
`define UART_BIT_CNT_START 4'h0
`define UART_BIT_CNT_MSB 4'h8
`define UART_BIT_CNT_STOP 4'h9
`define UART_START_BIT 1'b0
`define UART_STOP_BIT 1'b1
`endif