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.

SPLD - D-FF in PALCE with WinCupl

Status
Not open for further replies.

H.E.Tjelum

Newbie level 6
Joined
May 4, 2011
Messages
11
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,283
Location
Denmark
Activity points
1,364
Hi

I have more than 500 pcs. of unused PALCE20v8 and want to use them for some projects.
I use Atmels WinCUPL and have made some combinatoric projects, which works great.
But i have trouble getting the internal D-FFs to work. For some reason i can not compile, when i try with a registered output.
I have made a small program for making a simple D-FF, but i can't understand what i am doing wrong.

The code is:

/* *************** INPUT PINS *********************/
PIN 1 = CLK ;
PIN 2 = Out_E ;
PIN 3 = Data_in ;

/* *************** OUTPUT PINS *********************/
PIN 18 = CLK_out ;
PIN 17 = Enable_O ;
PIN 16 = Data_out ;
PIN 15 = Data_out_L ;

/* ************* Logic equations *******************/

CLK_out = CLK ;
Enable_O = Out_E ;
Data_out = Data_in ;
Data_out_L = Data_in ;
/* Data_out_L.d = Data_in ; */
/* Data_out_L.D = Data_in ; */
Data_out_L.OE = Out_E ;

The posted program works fine...
When i use one of the .d or .D equ. and note out the Data_out_L = Data_in ; WinCupl says fatal failure.

I have attached the .PLD file as a .TXT file.

I really hope to get these oldies to work. It would be a shame to throw them away.

Friendly regards
H.E.Tjelum
 

Attachments

  • Testing_01.TXT
    781 bytes · Views: 77

I think, there's one detail in your design, that's incompatible with PALCE properties. It may be the reason for the observed problem. I'm however not familiar with WinCupl, I used PALASM when designing with these devices (probably 15 years ago).

PALCE can either operate in registered or unregistered mode. In registered mode, Pin1 is reserved as clock, thus the assignment CLK_out = CLK isn't legal.
 
Hi again

Now i can use the D-FF, so You hit the nail straight on :)

But now something new appeared.

The code:
/* *************** INPUT PINS *********************/
/*PIN 1 = CLK ; */
PIN 2 = Out_E ;
PIN 3 = Data_in ;

/* *************** OUTPUT PINS *********************/
/*PIN 18 = CLK_out ; */
PIN 17 = Enable_O ;
PIN 16 = Data_out ;
PIN 15 = Data_out_L ;

/* ************* Logic equations *******************/
Enable_O = Out_E ;
Data_out = Data_in ;
Data_out_L.d = Data_in ;
Data_out_L.OE = Out_E ;

If i try to compile this, i get an error:
Variable usage is mutually excluded by a previous usage of the pin or pinnode. A shared product term or terms has been defined more than once.

In the first code example, i had a output Data_out_L.OE = Out_E ; that worked fine, but now it seems like this is conflicting with Data_out_L.d = Data_in ; ?

Another question is, i would like to have a PIN like PIN 18 = CLK_out ; so i have a confirmed state of clock in (PIN1).
How can i implement that, if i cannot name it?

Friendly regards
H.E.Tjelum
 

The error is caused by this two lines, I guess. They seem in fact mutual exclusive.
Code:
Data_out = Data_in ; 
Data_out_L.d = Data_in ;
 

Hi again

Thank you for Your answer.
I have been looking on this. It is two different outputs, so how can they be mutual exclusive?

Data_out = Data_in ;
Data_out_L.d = Data_in ;

I thought these two lines could be the reason for the error:
Data_out_L.d = Data_in ;
Data_out_L.OE = Out_E ;

But again, why should the .d exclude the .OE?

Friendly regards
H.E.Tjelum
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top