Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
280 B
1
Indexable
Never
module ff_beh_pos(s,r,clk,q,qbar);
input s,r,clk;
output reg q,qbar;
always @(posedge clk)
begin
if(s==1 & r==0)
begin
q<=1;
qbar<=0;
end
else if (s==0 & r==1)
begin
q<=0;
qbar=1;
end
else if(s==0 & r==0)
begin
q<= q;
qbar <= qbar;
end
else 
begin
q<=0;
qbar<=1;
end
end
endmodule