Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

4-bit shift register using behavioral modelling

Status
Not open for further replies.

pavani40444

Newbie level 2
Joined
Apr 4, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
pls send me verilog code for 4-bit shift register using behavioral modelling
 

Please send your attempt first, and people will fix it.
 

Anyway lets help:

module shiftReg ( out, in, clk, reset);
input in;
input clk;
input reset;

output out;

reg [0:3] mem;

assign out = mem [3];

always @ (posedge clk)
begin
if (reset)
mem <= 4'b0;
else
mem <= {in,mem};
end

endmodule

Folks feel free to add comments.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top