6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 13, 2024 1:05 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Jan 26, 2022 8:04 pm 
Offline
User avatar

Joined: Tue Apr 03, 2018 2:10 pm
Posts: 125
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.

_________________
I like it when things smoke.
BlogZolatron 64 project


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 26, 2022 11:25 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 27, 2022 8:26 am 
Offline
User avatar

Joined: Tue Apr 03, 2018 2:10 pm
Posts: 125
Thanks. I've now got WinCUPL installed. It's kinda ... um ... early 1990s, but I guess it does the job.

_________________
I like it when things smoke.
BlogZolatron 64 project


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 27, 2022 3:16 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 27, 2022 5:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8182
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 28, 2022 12:09 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 704
Location: Texas
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


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 23, 2022 4:33 am 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
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).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: