add shift register test case

This commit is contained in:
Tarachand Pagarani 2021-03-05 09:06:05 -08:00
parent e6d1ac4a58
commit ce76c58422
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
//-----------------------------------------------------//
// Design Name : Shift_reg
// File Name : Shift_reg_8192.v
// Function : Shift register
//------------------------------------------------------//
module shift_reg_8192 #( parameter size = 8191 ) (shift_in, clk, shift_out);
// Port Declaration
input shift_in;
input clk;
output shift_out;
reg [ size:0 ] shift; // shift register
always @ (posedge clk)
begin
shift = { shift[size-1:0] , shift_in } ;
end
assign shift_out = shift[size];
endmodule