The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:13am
Pages: 1
Send Topic Print
Latch D->Latch T (Read 1451 times)
Daniel Minan
New Member
*
Offline



Posts: 1

Latch D->Latch T
Apr 25th, 2010, 12:59pm
 
I want to make a toggle latch from D latch using only data flow only:

module latcht(
   input T,
      output Led
   );

wire d, c, qn;
//1'b0;
assign c = 1'b1;
assign d = q^T;
latchd U1( d, c, q, qn);


endmodule

module latchd(
   input D,
   input C,
   output Q,
      output Qn
   );
     

/*assign Q = ((C==1'b1&&D==1'b0)? 1'b0 Sad(C==1'b1 && D==1'b1)?1'b1: Q));
assign Qn = ~Q;*/

endmodule


But when i tested the logic of the Led, it hold at z state all the time

Sorry for my poor english
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Latch D->Latch T
Reply #1 - Apr 26th, 2010, 6:28am
 
Daniel Minan,
You need to force a defined initial state, e.g. by adding a reset.
Without that your circuit is likely to remain in X (not Z) initial state.

B O E
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.