vema lavanya
unread,Sep 8, 2011, 12:08:07 PM9/8/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vlsi_ja...@googlegroups.com
// Verilog code for d flip flop
module shift_reg(q,i,shift,clock);
output q;
input i,shift,clock;
reg[2:0]s;
wire q;
assign q=s[0];
always @(posedge clock)
begin
if(shift==1)
begin
s={i,s[2:1]};
end
end
endmodule