diff options
Diffstat (limited to 'hdl')
| -rw-r--r-- | hdl/defs.svh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hdl/defs.svh b/hdl/defs.svh index ea8dbc1..f8b1032 100644 --- a/hdl/defs.svh +++ b/hdl/defs.svh | |||
| @@ -5,9 +5,11 @@ | |||
| 5 | 5 | ||
| 6 | `define PDP_ADDRESS_BITS 15 | 6 | `define PDP_ADDRESS_BITS 15 |
| 7 | 7 | ||
| 8 | `define NUM_PDPS 1 | ||
| 9 | |||
| 8 | `define UART_BYTE_BITS 8 | 10 | `define UART_BYTE_BITS 8 |
| 9 | 11 | ||
| 10 | `define TAG_BITS 1 | 12 | `define TAG_BITS $clog2(`NUM_PDPS+1) |
| 11 | 13 | ||
| 12 | typedef bit [`RAM_ADDRESS_BITS-1:0] ram_word_address_t; | 14 | typedef bit [`RAM_ADDRESS_BITS-1:0] ram_word_address_t; |
| 13 | typedef bit [`RAM_ADDRESS_BITS-1:$clog2(`RAM_LINE_WORDS)] ram_line_address_t; | 15 | typedef bit [`RAM_ADDRESS_BITS-1:$clog2(`RAM_LINE_WORDS)] ram_line_address_t; |
| @@ -29,7 +31,7 @@ typedef bit [`TAG_BITS-1:0] tag_t; | |||
| 29 | 31 | ||
| 30 | typedef bit [`UART_BYTE_BITS-1:0] uart_byte_t; | 32 | typedef bit [`UART_BYTE_BITS-1:0] uart_byte_t; |
| 31 | 33 | ||
| 32 | typedef struct { | 34 | typedef struct packed { |
| 33 | ram_line_address_t address; | 35 | ram_line_address_t address; |
| 34 | bit write; | 36 | bit write; |
| 35 | ram_line_t data; | 37 | ram_line_t data; |
| @@ -37,22 +39,20 @@ typedef struct { | |||
| 37 | tag_t tag; | 39 | tag_t tag; |
| 38 | } ram_command_t; | 40 | } ram_command_t; |
| 39 | 41 | ||
| 40 | typedef struct { | 42 | typedef struct packed { |
| 41 | ram_line_address_t address; | 43 | ram_line_address_t address; |
| 42 | ram_line_t data; | 44 | ram_line_t data; |
| 43 | tag_t tag; | 45 | tag_t tag; |
| 44 | } ram_read_response_t; | 46 | } ram_read_response_t; |
| 45 | 47 | ||
| 46 | typedef struct { | 48 | typedef struct packed { |
| 47 | pdp_line_address_t address; | 49 | pdp_line_address_t address; |
| 48 | bit write; | 50 | bit write; |
| 49 | ram_line_t data; | 51 | ram_line_t data; |
| 50 | ram_line_mask_t mask; | 52 | ram_line_mask_t mask; |
| 51 | tag_t tag; | ||
| 52 | } pdp_command_t; | 53 | } pdp_command_t; |
| 53 | 54 | ||
| 54 | typedef struct { | 55 | typedef struct packed { |
| 55 | pdp_line_address_t address; | 56 | pdp_line_address_t address; |
| 56 | ram_line_t data; | 57 | ram_line_t data; |
| 57 | tag_t tag; | ||
| 58 | } pdp_read_response_t; | 58 | } pdp_read_response_t; |
