mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
fifoqueue area optimization
This commit is contained in:
parent
8d8769c710
commit
180735c531
1 changed files with 4 additions and 8 deletions
|
@ -90,9 +90,6 @@ module VX_fifo_queue #(
|
|||
end
|
||||
end
|
||||
|
||||
wire going_empty = (ALM_EMPTY == 1) ? alm_empty : (size[ADDRW-1:0] == ADDRW'(1));
|
||||
wire bypass = push && (empty || (going_empty && pop));
|
||||
|
||||
VX_dp_ram #(
|
||||
.DATAW (DATAW),
|
||||
.SIZE (DEPTH),
|
||||
|
@ -101,7 +98,7 @@ module VX_fifo_queue #(
|
|||
) dp_ram (
|
||||
.clk (clk),
|
||||
.reset (reset),
|
||||
.read (~bypass),
|
||||
.read (1'b1),
|
||||
.write (push),
|
||||
.wren (1'b1),
|
||||
.raddr (rd_ptr_r),
|
||||
|
@ -112,11 +109,10 @@ module VX_fifo_queue #(
|
|||
|
||||
if (OUT_REG != 0) begin : g_out_reg
|
||||
reg [DATAW-1:0] data_out_r;
|
||||
wire going_empty = (ALM_EMPTY == 1) ? alm_empty : (size[ADDRW-1:0] == ADDRW'(1));
|
||||
always @(posedge clk) begin
|
||||
if (bypass) begin
|
||||
data_out_r <= data_in;
|
||||
end else if (pop) begin
|
||||
data_out_r <= data_out_w;
|
||||
if (pop || (push && empty)) begin
|
||||
data_out_r <= (empty || going_empty) ? data_in : data_out_w;
|
||||
end
|
||||
end
|
||||
assign data_out = data_out_r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue