OpenFPGA/vpr7_x2p/vpr/Circuits/fifo_1bit.v

33 lines
511 B
Coq
Raw Normal View History

///////////////////////////////
// //
// 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-12 17:45:33 -06:00
assign data_out = int_reg[31];
always@(posedge clk or posedge rst) begin
if(rst) begin
2018-12-12 17:45:33 -06:00
int_reg <= 32'h00;
end
else begin
int_reg[0] <= data_in;
2018-12-12 17:45:33 -06:00
int_reg[32:1] = int_reg[31:0];
end
end
endmodule