diff options
| author | Julian Blake Kongslie | 2022-03-27 12:06:55 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-03-27 12:06:55 -0700 |
| commit | c2ead363d48ec32d6e3a1d1271a4de895a8753e5 (patch) | |
| tree | a39903358c58339dac32eb8235f91378162e52fb /hdl/fifo.sv | |
| parent | First pass at RS232 tx/rx modules. (diff) | |
| download | multipdp8-c2ead363d48ec32d6e3a1d1271a4de895a8753e5.tar.xz | |
Don't use SystemVerilog parametric types because Altera doesn't support them.
Diffstat (limited to '')
| -rw-r--r-- | hdl/fifo.sv | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/hdl/fifo.sv b/hdl/fifo.sv index 4158067..a067914 100644 --- a/hdl/fifo.sv +++ b/hdl/fifo.sv | |||
| @@ -1,23 +1,23 @@ | |||
| 1 | module fifo | 1 | module fifo |
| 2 | #( type data_t = bit | 2 | #( WIDTH_BITS = 1 |
| 3 | 3 | , DEPTH_BITS = 10 | |
| 4 | , DEPTH_BITS = 10 | ||
| 5 | ) | 4 | ) |
| 6 | ( input bit clock_in | 5 | ( input bit clock_in |
| 7 | , input bit clock_out | 6 | , input bit clock_out |
| 8 | , input bit reset | 7 | , input bit reset |
| 9 | 8 | ||
| 10 | , output bit in_ready | 9 | , output bit in_ready |
| 11 | , input bit in_valid | 10 | , input bit in_valid |
| 12 | , input data_t in_data | 11 | , input bit [WIDTH_BITS-1:0] in_data |
| 13 | 12 | ||
| 14 | , input bit out_ready | 13 | , input bit out_ready |
| 15 | , output bit out_valid | 14 | , output bit out_valid |
| 16 | , output data_t out_data | 15 | , output bit [WIDTH_BITS-1:0] out_data |
| 17 | ); | 16 | ); |
| 18 | 17 | ||
| 19 | localparam DEPTH = 1<<DEPTH_BITS; | 18 | localparam DEPTH = 1<<DEPTH_BITS; |
| 20 | 19 | ||
| 20 | typedef bit [WIDTH_BITS-1:0] data_t; | ||
| 21 | typedef bit [DEPTH_BITS-1:0] addr_t; | 21 | typedef bit [DEPTH_BITS-1:0] addr_t; |
| 22 | 22 | ||
| 23 | data_t data [DEPTH-1:0]; | 23 | data_t data [DEPTH-1:0]; |
