Any OPAL experts out there?

Okay I'm pretty good with electronics but a total noob when it comes to PLD's so my apologies if this is a dumb question...

I'm trying to build a device from info I found on the web that uses a GAL16V8 chip. The info from the web includes what's claimed to be OPAL code, but the free versions of OPAL I could find ("OPALjr") seem to have serious problems with it. My question is simple (sort of): is this code just messed up, or are there significant differences between the pay and free versions of OPAL that would explain the problems?

Here's the code: begin definition device GAL16V8 inputs DSI=2,DSCLK=3,BREAK=4,RESET=5,OE=6,M_FREEZE=7,M_DSO=8,SW=9,BERR=11; outputs (com) M_BERR=19,M_DSCLK=18,DSO=16,FREEZE=14,MAGIC=12; feedback (com) M_DSI=17,M_RESET=15,FF_BREAK=13; end definition begin equations M_DSI=DSI; M_DSI.oe=M_FREEZE&OE; M_DSCLK=DSCLK&FF_BREAK&M_RESET; FF_BREAK=BREAK|(FF_BREAK&(M_FREEZE|M_DSI)); M_RESET=RESET; M_RESET.oe=/RESET; M_BERR=/BERR; M_BERR.oe=BERR; FREEZE=M_FREEZE;DSO=M_DSO; MAGIC=0; end equations

OPALjr is complaining about 3 things: it wants a "CHIP" keyword, it doesn't like the parenthesees in the 13th line, and doesn't like the assignment to "0" in the 2nd-to-last line. Looking in the OPALjr docs, they specifically forbid the use of parens, and there's no mention of the "device" keyword or assignment to "0".

Any input would be greatly appreciated!

Eric Law

Reply to
EL
Loading thread data ...

For a GAL16V8, you can use other compilers, perhaps the (free) Lattice ispLever still supports them? You'll have to translate the logic to VHDL, Verilog or Abel, but for a project this size that shouldn't be a problem.

The code doesn't look like OPAL, that uses '*' for AND, '+' for OR, :+: for XOR etc.

I'd guess at (it's 7 or 8 years since I used OPAL)

CHIP mydevice GAL16V8 DSI=2,DSCLK=3,BREAK=4,RESET=5,OE=6,M_FREEZE=7,M_DSO=8,SW=9,BERR=11; M_BERR=19,M_DSCLK=18,DSO=16,FREEZE=14,MAGIC=12, M_DSI=17,M_RESET=15,FF_BREAK=13

equations

M_DSI=DSI

M_DSI.oe=M_FREEZE*OE

M_DSCLK= DSCLK&FF_BREAK*M_RESET

FF_BREAK= BREAK *(FF_BREAK*(M_FREEZE+M_DSI)) -- I'll leave you to expand the brackets

M_RESET=RESET

M_RESET.oe=/RESET

M_BERR=/BERR

M_BERR.oe=BERR

FREEZE=M_FREEZE

DSO=M_DSO

MAGIC=0 -- don't know what to do with this, try OE * /OE?

You might have to invert the ouputs etc.

Paul Burke

>
Reply to
Paul Burke

"EL" schreef in bericht news:42b18595$0$6702$ snipped-for-privacy@news.newshosting.com...

Eric,

Guess this code is not native OPAL but PALASM or a another like CUPL. PALASM required the keyword "device" followed by a known (i.e. known by the PALASM version at hand) device type name. OPAL requires the "CHIP" keyword also followed by a known device type name. Most of the code does neither follow the old PALASM style nor the OPAL style.

My advise is first to find out whether OPAL produces a JEDEC file correspondig to the 16V8 device you want to use. If so, you only need to rewrite the code slightly to make OPAL doing its job. Just see below. Otherwise you will have to look for another program to make your JEDEC. The old PALASM did not support 16V8. If I remember well it did support 16V8CE which required a different JEDEC. These days you can get Lattice software. The last time I used it, I could download it for free although registering was required.

OPALjr application Copyright petrus bitbyter 2005

Tryout code

CHIP tryout G16V8

CLK DSI DSCLK BREAK RESET OE M_FREEZE M_DSO SW GND BERR MAGIC FF_BREAK FREEZE M_RESET DSO M_DSI M_DSCLK M_BERR VCC

EQUATIONS

M_DSI = DSI; M_DSI.oe = M_FREEZE * OE;

M_DSCLK = DSCLK * FF_BREAK * M_RESET;

FF_BREAK = BREAK + FF_BREAK * M_FREEZE + FF_BREAK * M_DSI;

M_RESET = RESET; M_RESET.oe = /RESET;

M_BERR = /BERR; M_BERR.oe = BERR;

FREEZE = M_FREEZE;

DSO = M_DSO;

MAGIC = GND;

Mention the device- or CHIP code set to G16V8. This code will be converted by Copaljr to a valid JEDEC file.

petrus bitbyter

Reply to
petrus bitbyter

chip. The info from the web includes what's

seem to have serious problems with it. My

significant differences between the pay and free

That's definitely not OPAL syntax, and it's not enough to know 16V8 for a GAL- especially from Lattice. There were many variants with assigned suffixes which required different programming algorithms and JEDEC files. You can't program the GALs off a PC port.

Reply to
Fred Bloggs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.