aboutsummaryrefslogtreecommitdiff
path: root/src/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtl')
-rw-r--r--src/rtl/trng_csprng_fifo.v17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/rtl/trng_csprng_fifo.v b/src/rtl/trng_csprng_fifo.v
index e4abc26..9c52ef5 100644
--- a/src/rtl/trng_csprng_fifo.v
+++ b/src/rtl/trng_csprng_fifo.v
@@ -60,8 +60,7 @@ module trng_csprng_fifo(
localparam FIFO_MAX = (2 ** FIFO_ADDR_BITS) - 1;
localparam WR_IDLE = 0;
- localparam WR_WAIT = 1;
- localparam WR_WRITE = 2;
+ localparam WR_STORE = 1;
localparam WR_DISCARD = 7;
localparam RD_IDLE = 0;
@@ -453,13 +452,21 @@ module trng_csprng_fifo(
if (csprng_data_valid)
begin
- fifo_mem_we = 1;
- wr_ptr_inc = 1;
- fifo_ctr_inc = 1;
+ wr_ctrl_new = WR_STORE;
+ wr_ctrl_we = 1;
end
end
end
+ WR_STORE:
+ begin
+ fifo_mem_we = 1;
+ wr_ptr_inc = 1;
+ fifo_ctr_inc = 1;
+ wr_ctrl_new = WR_IDLE;
+ wr_ctrl_we = 1;
+ end
+
WR_DISCARD:
begin
fifo_ctr_rst = 1;