So I'm trying to teach myself CPLD programming and just ran out of talent. I've got some decoding logic working fine and decided the next step would be to implement a counter on an ATF1502S.
I figured I'd start on the nursery slopes with a simple decade counter. When I try to compile this, however, I get an error. The compilation, with cupl.exe, works fine. But when I run find1502.exe, I get the error:
Code:
Atmel ATF1502AS Fitter Version 1.8.7.8 (02-05-03)
Copyright 1999,2000 Atmel Corporation
Error - Node Q3 is registered and there is no .CLK in .olb
Reading input file failed ...
Here is my code:
Code:
Name COUNT10;
Partno 00;
Date 27/06/2022;
Revision 01;
Designer SMD;
Company ;
Assembly ;
Location ;
Device f1502tqfp44;
/***************************************************************/
/* Decade Counter */
/***************************************************************/
/** Inputs **/
PIN 15 = pulse; /* Counter clock */
PIN 44 = clr; /* Counter clear input */
/** Outputs **/
PIN [28,25,22,19] = [Q3..0]; /* Counter outputs on LEDs */
FIELD count = [Q3..0]; /* Counter output bit field */
$repeat i = [0..9]
$define S{i} 'b'{i} /* Creates S0-S9 with vals 0-9 */
$repend
/** State machine **/
SEQUENCE count {
$repeat i = [0..9]
present S{i}
if pulse next S{(i+1)%10};
if clr next S0;
default next S{i};
$repend
}
I'm compiling with:
Code:
C:\Wincupl\Shared\cupl.exe -j -a -l -e -x -f -b -m4 f1502tqfp44 COUNT10
And running find1502 with:
Code:
find1502 -i E:\NasSync\DEV\Dev-PLD\CUPL_Projects\COUNT10\COUNT10.tt2 -CUPL -dev P1502T44 -str JTAG ON -str logic_doubling off
I rechecked my previous projects and they're still working fine, so I haven't borked my dev setup.
What am I doing wrong?
[EDIT] Just realised that Atmel docs actually have this precise thing as an example. I'll be back once I've read that.
[EDIT 2] Turns out the Atmel example was the code on which I'd based mine anyway. And the Atmel code produces the same error, even when I remove all specific pin assignments and let the fitter decide on pins.
_________________
I like it when things smoke.
Blog –
Zolatron 64 project