Guest
Hi,
I know DFF is:
module DFF(d,clk,q) ;
input d, clk ;
output reg q ;
always @(posedge clk)
q<= d ;
endmodule
Now I need to implement ASYNCHRONOUS RESET flip flop
using DFF ONLY, may be some extract logic. HOW CAN I DO THAT ?
The implemented circuit MUST WORK AS FOLLOWS:
module DFFR(d,clk,r, q) ;
input d, clk,r ;
output reg q ;
always @(posedge clk or posedge r)
if (r) q <= 0 ;
else q<= d ;
endmodule
Please give the code or diagram. I am curious about this.
Sant
I know DFF is:
module DFF(d,clk,q) ;
input d, clk ;
output reg q ;
always @(posedge clk)
q<= d ;
endmodule
Now I need to implement ASYNCHRONOUS RESET flip flop
using DFF ONLY, may be some extract logic. HOW CAN I DO THAT ?
The implemented circuit MUST WORK AS FOLLOWS:
module DFFR(d,clk,r, q) ;
input d, clk,r ;
output reg q ;
always @(posedge clk or posedge r)
if (r) q <= 0 ;
else q<= d ;
endmodule
Please give the code or diagram. I am curious about this.
Sant