Design of Serial IN - Serial OUT Shift Register using Behavior Modeling Style -
Output Waveform : Serial IN - Serial OUT Shift Register |
Verilog CODE-
//-----------------------------------------------------------------------------
//
// Title : Serial_in_Serial_out
// Design : verilog upload 2
// Author : Naresh Singh Dobal
// Company : nsdobal@gmail.com
// Verilog Programs & Exercise by Naresh Singh Dobal.
//
//-----------------------------------------------------------------------------
//
// File : Serial IN - Serial OUT shift register using Behavior Modeling Style.v
module Serial_in_Serial_out ( din ,clk ,reset ,dout );
output dout ;
reg dout ;
input din ;
wire din ;
input clk ;
wire clk ;
input reset ;
wire reset ;
reg [2:0]s;
always @ (posedge (clk)) begin
if (reset)
dout <= 0;
else begin
s[0] <= din ;
s[1] <= s[0] ;
s[2] <= s[1] ;
dout <= s[2];
end
end
endmodule
9 comments :
Is the array required [2:0] or [3:0]????
ok i thought it was a 4bit reg code but it was not mentioned in the title
it is a 3bit code right?
Isn't input by default a wire ?
Gandu h kya
Gandu h kya
Abe kitna bda gandu h tu
Ha bhai mujhe. Bhi lag rha he😏
Post a Comment