6502.org
http://forum.6502.org/

Best CPLDs & toolchain for beginners
http://forum.6502.org/viewtopic.php?f=10&t=6992
Page 1 of 1

Author:  speculatrix [ Wed Jan 26, 2022 8:04 pm ]
Post subject:  Best CPLDs & toolchain for beginners

I want to get into CPLDs (and later FPGAs) but am finding getting going to be difficult.

Initially I’d like to tackle address decoding.

I thought I might start with the ATF15xx. But what toolchains do people recommend? I’m platform agnostic (ie, Windows, Linux and Mac all work for me - I’d probably draw the line at System/360).

Are there other CPLDs that are good for beginners (eg, well supported with software)? I’d prefer to go with chips that are still in production.

Author:  BigDumbDinosaur [ Wed Jan 26, 2022 11:25 pm ]
Post subject:  Re: Best CPLDs & toolchain for beginners

speculatrix wrote:
I want to get into CPLDs (and later FPGAs) but am finding getting going to be difficult.

Initially I’d like to tackle address decoding.

I thought I might start with the ATF15xx. But what toolchains do people recommend? I’m platform agnostic (ie, Windows, Linux and Mac all work for me - I’d probably draw the line at System/360).

Are there other CPLDs that are good for beginners (eg, well supported with software)? I’d prefer to go with chips that are still in production.

If you're interested in the Microchip (Atmel) ATF parts—which are in current production—you can snag a copy of WinCUPL from their site to do you development and simulation. WinCUPL runs on any version of Window$ from 2000 onward. The package is a bit buggy here and there, but does work. If you have any trouble getting hold of the software please contact me via PM and I'll try to help.

Author:  speculatrix [ Thu Jan 27, 2022 8:26 am ]
Post subject:  Re: Best CPLDs & toolchain for beginners

Thanks. I've now got WinCUPL installed. It's kinda ... um ... early 1990s, but I guess it does the job.

Author:  gfoot [ Thu Jan 27, 2022 3:16 pm ]
Post subject:  Re: Best CPLDs & toolchain for beginners

speculatrix wrote:
Thanks. I've now got WinCUPL installed. It's kinda ... um ... early 1990s, but I guess it does the job.

Just about.

I use the following Cygwin bash script to wrap the command line tools, as the GUI is quite awful!

Code:
#!/bin/bash

WINCUPL_SHARED="c:/WinCupl/Shared"

# These are documented in http://ee.sharif.edu/~logic_circuits_t/readings/CUPL_Reference.pdf
cuplopts=-jaxf

usage()
{
   echo "Usage: $0 <pld> <outdir>"
   echo "    where <pld> is the PLD source file"
   echo "          <outdir> is an output directory"
   echo
   echo "The output directory will contain copies of the source files"
   echo "along with all output files, including compiler console output"
   echo "(errors, etc) in <pld_basename>.out."
   echo
   echo "If a corresponding <pld_basename>.si file exists, the simulator"
   echo "will also be run after a successful compile."
}

f="$1"
if [ ! -e "$f" ]; then
   usage
   exit 1
fi

f_base=`basename "$f" .pld`

outdir="$2"
if [ "$outdir" == "" ]; then
   usage
   exit 1
fi

if [ ! -d "$outdir" ]; then
   mkdir -p "$outdir"
   if [ ! -d "$outdir" ]; then
      echo "Output directory '$outdir' is not a directory"
      exit 1
   fi
fi

cp "$f" "$outdir"

if [ -f "$f_base".si ]; then
   cp "$f_base".si "$outdir"

   # Adding the 's' option makes it also run the simulator - it's not in the docs, but
   # I read about it somewhere.  I can't manage to get the simulator to run standalone.
   cuplopts="$cuplopts"s
fi

# Some bits of cupl only work if the files are in the current directory
f=`basename "$f"`
f_base=`basename "$f_base"`
cd "$outdir"


# Remove old output files
for ext in abs doc jed lst out pla sim so wo; do
   rm -f "$f_base.$ext"
done

export LIBCUPL="$WINCUPL_SHARED"/atmel.dl
"$WINCUPL_SHARED"/cupl $cuplopts "$f" > "$f_base".out

# Check and report errors
if [ "$?" -gt 0 ]; then

   # The compiler outputs errors mixed in with its other output, print them here
   grep '^[[]' "$f_base".out

   # If the .so file exists, then the compile succeeded and the simulator was run but failed
   if [ -e "$f_base".so ]; then
      # The simulaton doesn't output errors to the console, only to the .so file
      cat "$f_base".so
      echo
      echo "ERROR: Simulation failed, see errors above"
      exit 1
   else
      # No .so file means the simulator didn't run, i.e. the compile failed
      echo "ERROR: Compilation failed"
      exit 1
   fi
fi

Author:  BigDumbDinosaur [ Thu Jan 27, 2022 5:54 pm ]
Post subject:  Re: Best CPLDs & toolchain for beginners

speculatrix wrote:
It's kinda ... um ... early 1990s, but I guess it does the job.

That's because it is early 1990s. It's a DOS program that got Windowfied.

Author:  sburrow [ Fri Jan 28, 2022 12:09 pm ]
Post subject:  Re: Best CPLDs & toolchain for beginners

I'm going to jump in with a question: What if I'm NOT platform agnostic? I see that WinCUPL is Windows (only?) and I'm a Linux guy. Though Windows might be possible, it's not preferable. Likewise Wine has not been my best friend in the past.

Any thoughts on Linux based CPLD/FPGA programming for beginners like me? I'm currently using Quartus 13.0sp1 with EPM7128S CPLD's. I like it well enough, so just asking around.

Thanks!

Chad

Author:  kakemoms [ Wed Feb 23, 2022 4:33 am ]
Post subject:  Re: Best CPLDs & toolchain for beginners

sburrow wrote:
I'm going to jump in with a question: What if I'm NOT platform agnostic? I see that WinCUPL is Windows (only?) and I'm a Linux guy. Though Windows might be possible, it's not preferable. Likewise Wine has not been my best friend in the past.

Any thoughts on Linux based CPLD/FPGA programming for beginners like me? I'm currently using Quartus 13.0sp1 with EPM7128S CPLD's. I like it well enough, so just asking around.

Thanks!

Chad


You can try the Lattice Diamond package... if you want to stick to Lattice devices... and Red Hat Linux... and version 6.9 or 7.4.... and the 64-bit version. Some people seems to run it under Ubuntu, and I think I tried it a few years ago.

It might not be a good idea, but the package is free and has a simulator bundled with it (at least under windows).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/