6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 9:22 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Nov 11, 2017 10:37 pm 
Offline

Joined: Sat Nov 11, 2017 10:11 pm
Posts: 1
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 12, 2017 9:17 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 12, 2017 5:40 pm 
Offline
User avatar

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

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 19, 2023 3:07 pm 
Offline
User avatar

Joined: Sun Mar 19, 2023 2:48 pm
Posts: 1
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 20, 2023 11:51 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
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

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 20, 2023 11:56 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1681
Location: Sacramento, CA
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

_________________
Please visit my website -> https://sbc.rictor.org/


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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: