-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstddef.h
38 lines (33 loc) · 859 Bytes
/
stddef.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
`ifndef __STDDEF_HEADER__
`define __STDDEF_HEADER__
`define HIGH 1'b1
`define LOW 1'b0
/******* define POSITIVE Logic *******/
`define DISABLE 1'b0
`define ENABLE 1'b1
/******* define NEGATIVE Logic *******/
`define DISABLE_ 1'b0
`define ENABLE_ 1'b1
/******* define MEMORY read/write *******/
`define READ 1'b1
`define WRITE 1'b0
`define LSB 0
/******* define BYTE *******/
`define BYTE_DATA_W 8
`define BYTE_MSB 7
`define ByteDataBus 7:0
/******* define WORD DATA *******/
`define WORD_DATA_W 32
`define WORD_MSB 31
`define WordDataBus 31:0
/******* define WORD ADDR *******/
`define WORD_ADDR_W 30
`define WORD_ADDR_MSB 29
`define WordAddrBus 29:0
/******* define offset addr ******/
`define BYTE_OFFSET_W 2
`define ByteOffsetBus 1:0
`define WordAddrLoc 31:2
`define ByteOffsetLoc 1:0
`define BYTE_OFFSET_WORD 2'b00
`endif