2018-12-11 23:21:39 -06:00
|
|
|
///////////////////////////////
|
|
|
|
// //
|
|
|
|
// fifo_1bit benchmark //
|
|
|
|
// //
|
|
|
|
///////////////////////////////
|
|
|
|
|
|
|
|
module fifo_1bit(
|
|
|
|
rst,
|
|
|
|
clk,
|
|
|
|
data_in,
|
|
|
|
data_out );
|
|
|
|
|
|
|
|
input rst;
|
|
|
|
input clk;
|
|
|
|
input data_in;
|
|
|
|
output data_out;
|
|
|
|
|
2018-12-12 17:45:33 -06:00
|
|
|
reg[31:0] int_reg;
|
2018-12-11 23:21:39 -06:00
|
|
|
|
2018-12-12 17:45:33 -06:00
|
|
|
assign data_out = int_reg[31];
|
2018-12-11 23:21:39 -06:00
|
|
|
|
|
|
|
always@(posedge clk or posedge rst) begin
|
|
|
|
if(rst) begin
|
2018-12-12 17:45:33 -06:00
|
|
|
int_reg <= 32'h00;
|
2018-12-11 23:21:39 -06:00
|
|
|
end
|
|
|
|
else begin
|
|
|
|
int_reg[0] <= data_in;
|
2018-12-12 17:45:33 -06:00
|
|
|
int_reg[32:1] = int_reg[31:0];
|
2018-12-11 23:21:39 -06:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
endmodule
|