Skip to content

Commit 044d2ea

Browse files
committed
Correct verilog code source
1 parent 051d897 commit 044d2ea

File tree

6 files changed

+35
-19
lines changed

6 files changed

+35
-19
lines changed

sim/test/fifo_unit_test.sv

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
`include "svut_h.sv"
2-
`include "../../src/vlog/fifo.v"
32
`timescale 1 ns / 1 ps
43

54
module fifo_unit_test;
@@ -9,12 +8,16 @@ module fifo_unit_test;
98
parameter DSIZE = 8;
109
parameter ASIZE = 4;
1110

12-
[DSIZE-1:0] wdata;
13-
winc; wclk; wrst_n;
14-
rinc; rclk; rrst_n;
15-
[DSIZE-1:0] rdata;
16-
wfull;
17-
rempty;
11+
wire [DSIZE-1:0] wdata;
12+
wire winc;
13+
wire wclk;
14+
wire wrst_n;
15+
wire rinc;
16+
wire rclk;
17+
wire rrst_n;
18+
wire [DSIZE-1:0] rdata;
19+
wire wfull;
20+
wire rempty;
1821

1922
fifo
2023
#(
@@ -24,7 +27,11 @@ module fifo_unit_test;
2427
dut
2528
(
2629
wdata,
30+
winc,
31+
wclk,
2732
wrst_n,
33+
rinc,
34+
rclk,
2835
rrst_n,
2936
rdata,
3037
wfull,

sim/test/files.f

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
fifo_2mem.v
2-
fifo.v
3-
rptr_empty.v
4-
sync_r2w.v
5-
sync_w2r.v
6-
wptr_full.v
1+
../../src/vlog/fifo.v
2+
../../src/vlog/fifo_2mem.v
3+
../../src/vlog/rptr_empty.v
4+
../../src/vlog/sync_r2w.v
5+
../../src/vlog/sync_w2r.v
6+
../../src/vlog/wptr_full.v

src/vlog/fifo.v

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,18 @@
1818
`default_nettype none
1919

2020
module fifo
21+
2122
#(
2223
parameter DSIZE = 8,
2324
parameter ASIZE = 4
2425
)(
2526
input [DSIZE-1:0] wdata,
26-
input winc, wclk, wrst_n,
27-
input rinc, rclk, rrst_n,
27+
input winc,
28+
input wclk,
29+
input wrst_n,
30+
input rinc,
31+
input rclk,
32+
input rrst_n,
2833
output [DSIZE-1:0] rdata,
2934
output wfull,
3035
output rempty

src/vlog/rptr_empty.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ module rptr_empty
3333

3434
reg [ADDRSIZE:0] rbin;
3535
wire [ADDRSIZE:0] rgraynext, rbinnext;
36-
36+
wire rempty_val;
37+
3738
//-------------------
3839
// GRAYSTYLE2 pointer
3940
//-------------------

src/vlog/sync_r2w.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module sync_r2w
2323
parameter ADDRSIZE = 4
2424
)(
2525
input wire wclk,
26-
input wire wrst_ni,
26+
input wire wrst_n,
2727
input [ADDRSIZE:0] rptr,
2828
output reg [ADDRSIZE:0] wq2_rptr
2929
);

src/vlog/wptr_full.v

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ module wptr_full
2323
#(
2424
parameter ADDRSIZE = 4
2525
)(
26-
input winc, wclk, wrst_n);
26+
input winc,
27+
input wclk,
28+
input wrst_n,
2729
input [ADDRSIZE :0] wq2_rptr,
2830
output reg wfull,
2931
output [ADDRSIZE-1:0] waddr,
@@ -32,7 +34,8 @@ module wptr_full
3234

3335
reg [ADDRSIZE:0] wbin;
3436
wire [ADDRSIZE:0] wgraynext, wbinnext;
35-
37+
wire wfull_val;
38+
3639
// GRAYSTYLE2 pointer
3740
always @(posedge wclk or negedge wrst_n)
3841
if (!wrst_n)

0 commit comments

Comments
 (0)