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.

module definition of D flip-flop

Status
Not open for further replies.

funjoke

Member level 3
Joined
Feb 19, 2009
Messages
58
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,772
d flip flop

module dff
(output reg op_q,
output op_q_n,
input ip_data,
input ip_aset_n,
input ip_areset_n,
input ip_clock);

Write a behavioural description of the D flip flop(DFF) that fulfils the following specification
-The DFF is synchronised to the rising edge of a clock
-The DFF has an active-low asynchoronous reset
-The DFF has an active-low asynchoronous set
-The reset has priority over the set



The answer is :
always@(posedge ip_clock)
if(!ip_areset_n)
op_q<=0;
else
op_q<=ip_data;



i dunno know how to do it le ,can anybody help ?
 

always@(posedge ip_clock or negedge ip_aset_n or ip_areset_n )
if(!ip_areset_n)
op_q<=0;
else if(!ip_set_n)
op_q<=1;
else
op_q<=ip_data;
 

this is the only answer ?but i haven finish do it
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top