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

WinCupl and using .S and .R extensions with the ATF 1508
http://forum.6502.org/viewtopic.php?f=10&t=4979
Page 1 of 1

Author:  md95065 [ Sat Nov 11, 2017 10:37 pm ]
Post subject:  WinCupl and using .S and .R extensions with the ATF 1508

I was trying to use an SR flip flop in an ATF 1508 design and assumed that all that I would have to do was to
write logic equations for the .S and .R inputs and that WinCupl and the fitter would figure out the rest.

Note that Devhelp.pdf explicitly mentions the .S and .R extensions as being available on the 1508, thus:
Quote:
F1508ispplcc84 Architecture
Mnemonic: F1508ispplcc84 Mnemonic: PLCC
Pin Count: 84 Total Product Terms: 320
Extensions: D T S R OE OEMUX CK CKMUX AR DQ LQ IO IOD IOL
IOCK IOAR

However, when I try to use the .S and .R extensions, WinCupl gives me a warning that looks like this:
Quote:
Module: cuplc
[0014cc] Please note: unknown extension encountered: r
[0014cc] Please note: unknown extension encountered: s

After some more digging I found a mention of an apparently almost completely undocumented keyword "register_select"
which appears to have something to do with explicitly telling WinCupl what type of flip flop you want to use.

"register_select" is used in the CONVERT.PLD example file but that really doesn't explain what it does:
Quote:
Register_select [y0..y2] = 0;

/* This statement will convert the FF flop equation to */
/* Equivalant T-type flip-flop equation. For Atmel devices */
/* Options 0,1,2,5 are supported. More information is available */
/* on this option in the CUPL help menu */

Unfortunately I can't find any of that "more information" which is supposed to be available in the CUPL help menu
and randomly playing with the "register_select" keyword in my design along with the magic numbers 0, 1, 2 and 5
didn't appear to help.

Any ideas?

btw I realize that I don't really *need* an SR flip flop - I am currently just using the.AR and .AP inputs on a D flip
flop that has .D and .CK set to 0 and that works just fine, but I am curious if anyone knows how this is supposed to work.

Author:  BigEd [ Sun Nov 12, 2017 9:17 am ]
Post subject:  Re: WinCupl and using .S and .R extensions with the ATF 1508

Welcome!

I have no special knowledge, but did you also try with uppercase R and S? The message you quoted looks as if it is complaining about lowercase r and s.

Author:  BigDumbDinosaur [ Sun Nov 12, 2017 5:40 pm ]
Post subject:  Re: WinCupl and using .S and .R extensions with the ATF 1508

BigEd wrote:
I have no special knowledge, but did you also try with uppercase R and S? The message you quoted looks as if it is complaining about lowercase r and s.

Ed is echoing my thoughts. WinCUPL can be fussy about case.

Author:  SONIC3D [ Sun Mar 19, 2023 3:07 pm ]
Post subject:  Re: WinCupl and using .S and .R extensions with the ATF 1508

md95065 wrote:
"register_select" is used in the CONVERT.PLD example file but that really doesn't explain what it does:
Quote:
Register_select [y0..y2] = 0;

/* This statement will convert the FF flop equation to */
/* Equivalant T-type flip-flop equation. For Atmel devices */
/* Options 0,1,2,5 are supported. More information is available */
/* on this option in the CUPL help menu */

Unfortunately I can't find any of that "more information" which is supposed to be available in the CUPL help menu
and randomly playing with the "register_select" keyword in my design along with the magic numbers 0, 1, 2 and 5
didn't appear to help.

Any ideas?

btw I realize that I don't really *need* an SR flip flop - I am currently just using the.AR and .AP inputs on a D flip
flop that has .D and .CK set to 0 and that works just fine, but I am curious if anyone knows how this is supposed to work.


Check the old version of CUPL reference:
https://www.qsl.net/bh1phl/CUPL_USERS_GUIDE.pdf

REGISTER_SELECT is on the page 61:

Code:
The REGISTER_SELECT statement allows the user to convert between different register
types automatically. CUPL will generate equivalent logic expressions for the specified
register type.

REGISTER_SELECT [var_list] = register_type;

The register_type is a number that indicates the target register:
0 use the specified register
1 D
2 T
3 JK
4 SR
5 select best usage of product terms between D and T


So it's actually a syntactic sugar for D-type expression. All code will be transferred to D-type expression.

Author:  8BIT [ Mon Mar 20, 2023 11:51 am ]
Post subject:  Re: WinCupl and using .S and .R extensions with the ATF 1508

I found on the 1504 that the AP and AR worked for asynchronous Preset and asynchronous Reset, which is very similar to S/R

Give those a try.

Daryl

Author:  8BIT [ Mon Mar 20, 2023 11:56 am ]
Post subject:  Re: WinCupl and using .S and .R extensions with the ATF 1508

8BIT wrote:
I found on the 1504 that the AP and AR worked for asynchronous Preset and asynchronous Reset, which is very similar to S/R

Give those a try.

Daryl



Here's an example from the SPIv2 code. Note I am using a D register, with a clocked function to reset the register during the active /RES of the CPU. Then use the AS/AR pair to actually switch the register states during operation.

Code:
  ECE.ck = !RES;
  ECE.d  = 'b'0;
  ECE.ar = !D2 & !A1 & A0 & CS1 & !CS2 & PHI2 & !RW;
  ECE.ap =  D2 & !A1 & A0 & CS1 & !CS2 & PHI2 & !RW;
Hope that helps.

Daryl

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