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.

VHDL, CPLD code:Will this implementation works

Status
Not open for further replies.

Bond_2007

Newbie level 5
Joined
Mar 5, 2007
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
Hello,

I would like to use the following case statement:

test_bits<bit1,bit0>

case 00:
Make IO output PIN 7 high.
case 01:
Make IO output PIN 8 high.

If case 00 has ran, the IO PIN 7 is high, will it stays high even when case 01 is running? Is this a latch operation?

I am new to CPLD, any help is appreciated.

-B
 

Yes ur right! This will create a latch for both PIN7 and PIN 8
because you have not specified what value to drive on these pins
under all possible conditions!
 

any other inputs are greatly appreciated.

-B
 

As stated above, the code will result in two latches. To avoid latches use the following code structure:

Code:
test_bits<bit1,bit0>

case 00:
Make IO output PIN 7 high.
Make IO output PIN 8 low. 

case 01:
Make IO output PIN 8 high. 
Make IO output PIN 7 low.

You can also use the IF statement to do the same.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top