Apr 5, 2011 #1 P 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
Apr 5, 2011 #2 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 Please send your attempt first, and people will fix it.
Apr 6, 2011 #3 H haykp Member level 3 Joined Oct 22, 2010 Messages 66 Helped 9 Reputation 18 Reaction score 9 Trophy points 1,288 Activity points 1,643 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.
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.