pipeline optimization
This commit is contained in:
@@ -12,7 +12,7 @@ module VX_cam_buffer #(
|
||||
output wire [ADDRW-1:0] write_addr,
|
||||
input wire acquire_slot,
|
||||
input wire [RPORTS-1:0][ADDRW-1:0] read_addr,
|
||||
output reg [RPORTS-1:0][DATAW-1:0] read_data,
|
||||
output reg [RPORTS-1:0][DATAW-1:0] read_data,
|
||||
input wire [RPORTS-1:0] release_slot,
|
||||
output wire full
|
||||
);
|
||||
|
||||
@@ -52,11 +52,7 @@ module VX_generic_queue #(
|
||||
|
||||
end else begin // (SIZE > 1)
|
||||
|
||||
`ifdef QUEUE_FORCE_MLAB
|
||||
(* syn_ramstyle = "mlab" *) reg [DATAW-1:0] data [SIZE-1:0];
|
||||
`else
|
||||
reg [DATAW-1:0] data [SIZE-1:0];
|
||||
`endif
|
||||
`USE_FAST_BRAM reg [DATAW-1:0] data [SIZE-1:0];
|
||||
|
||||
if (0 == BUFFERED) begin
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
`include "VX_platform.vh"
|
||||
|
||||
module VX_generic_stack #(
|
||||
parameter WIDTH = 1,
|
||||
parameter DEPTH = 1
|
||||
) (
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
input wire push,
|
||||
input wire pop,
|
||||
input reg [WIDTH - 1:0] q1,
|
||||
input reg [WIDTH - 1:0] q2,
|
||||
output wire[WIDTH - 1:0] d
|
||||
);
|
||||
|
||||
reg [DEPTH - 1:0] ptr;
|
||||
reg [WIDTH - 1:0] stack [0:(1 << DEPTH) - 1];
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (reset) begin
|
||||
ptr <= 0;
|
||||
end else if (push) begin
|
||||
stack[ptr] <= q1;
|
||||
stack[ptr+1] <= q2;
|
||||
ptr <= ptr + 2;
|
||||
end else if (pop) begin
|
||||
ptr <= ptr - 1;
|
||||
end
|
||||
end
|
||||
|
||||
assign d = stack[ptr - 1];
|
||||
|
||||
endmodule
|
||||
@@ -15,7 +15,7 @@ module VX_index_queue #(
|
||||
input wire [`LOG2UP(SIZE)-1:0] read_addr,
|
||||
output wire [DATAW-1:0] read_data
|
||||
);
|
||||
reg [DATAW-1:0] data [SIZE-1:0];
|
||||
`USE_FAST_BRAM reg [DATAW-1:0] data [SIZE-1:0];
|
||||
reg [SIZE-1:0] valid;
|
||||
reg [`LOG2UP(SIZE):0] rd_ptr, wr_ptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user