6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 7:15 am

All times are UTC




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: How to use SPLD?
PostPosted: Sun Jul 24, 2016 4:23 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
Vladimir wrote:
P.S. What is in the forum member profile the 'Ocupation' item? Job or hobby? I doubt.

"Occupation" is what you do to earn money—your job.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Sun Jul 24, 2016 7:09 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Or possibly it's how you spend your time - you might be a student, or retired, or out of work but enjoying the great outdoors. Or the great indoors...
... anyhow, looks like about half of the members put something in there, so no-one should feel obliged.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Sun Jul 24, 2016 9:30 am 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
With this clear.
Next question.

8BIT wrote:
look at my DEC-1 decoder.

http://sbc.rictor.org/decoder.html

It seems to me that in the description of the decoder is a small inaccuracy.

There is:
$0240 - $02FF - unassigned
$0300 - $7FFF -RAM

Must be:
$0240 - $03FF -unassigned
$0400 - $7FFF -RAM
Isn't it?

Edit: Sorry, I'm not right, the moderator may delete this post.


Last edited by Vladimir on Wed Aug 03, 2016 6:25 am, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Sun Jul 24, 2016 10:46 am 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
Daryls design takes all the pins of the device. And what about gates? How to know, how many gates were spent? I would like to evaluate the capabilities of the device. Can anybody tell me?
Thanks.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Sun Jul 24, 2016 2:41 pm 
Offline

Joined: Sat Jan 02, 2016 10:22 am
Posts: 197
He's using a tiny fraction of the device's capabilities.

Each of the output pins on a 22v10 can have between 8 and 16 equations attached to it. On that decoder each output as just the one equation.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Sun Jul 24, 2016 4:13 pm 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
Martin A wrote:

Each of the output pins on a 22v10 can have between 8 and 16 equations attached to it.

Does this mean that a lot of gates outputs can be simultaneously connected to a single output pin? Gates with open drain outputs?
Or, maybe, through OR-gates?


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Sun Jul 24, 2016 4:49 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Vladimir wrote:
Related Wellon VP-290. $160 +$20 shipment is Kanga price. The Chinese sell for $120, shipment included. Advice?


I got most of my things from China (aliexpress) and it worked well. E.g. the device programmer, the hotair gun and the oscilloscope all arrived fast and save. I see in Aliexpress a lot of items are shipped to Russia, so it seems that you would not be the only one. Wellon is in Asia so need for the programmer to make a detour via UK. Only if something is not available in China I order it directly. However for me in Switzerland ordering from China has a lot of advantages :wink:

As for the prices you paid they are within the normal range, except for the R65C22, you see the 4MHz version typically for the same price.

There have been many discussions about the internal oscillator of the R65C51 and other brands and all I can say, there is no need for an external oscillator. Just use the built-in oscillator of the R65C51, it works perfectly and has been designed to be used. Note that some CMOS versions of the 6551 require a 1MOhm resister between the oscillator pins. The best is you consult the appropriate datasheet you can find at this site or the internet. This way your system clock can be anything and is independent. Even a simple RC oscillator using a 74HC14 will then do the job.

As for the gates used in a GAL, you need to know the following. I make some simplifications as there is more, but for a simple decoder as you need this is ok. Each Output has a OLMC (Output Logic Macro Cell) associated with it. Then there is the fuse matrix. The fuse matrix has twice as many columns as possible inputs. Each column is associated with the true and the inverted value of an input (hence twice as many columns). By blowing the appropriate fuse a product term is created that is a AND of all inputs selected by the blown fuses. In a GAL16V8 there are 64 product terms. Each OLMC has 8 product terms associated with it. Now for a simple combinatorial design (one that does not use the flip-flop function of the OLMC) it will create the logical OR of the results of all 8 product terms. Then the result can either be sent directly to the associated output or it can be sent inverted to the output. Now a GAL is flexible in that the output pins (except for 2, thats why it is called a GAL16V8, it has up to 16 inputs and up to 8 outputs form a total of 18 signal pins) can also be used as input or you can use the output as a feedback and use it as an input for the other OLMCs. The later of course doubles the propagation delay, but this is not an issue with system clocks up to approx 5-6MHz.

A GAL22V10 is larger as it has first no restrictions of which pin can be an input (thats why it is called GAL22V10, it can have up to 22 inputs and up to 10 outputs) and most OLMCs have more than 8 product terms (PIN14 and 23 have 8 PTs, PIN15 and 22 have 10PTs, ... PIN18 and 19 have 16 PTs).

When you use WinCUPL you can change the option so the compiler will create a DOC file which tells you how many product terms have been used. I recommend that you get a copy of WinCUPL (it's free) and install it (Windows XP or Windows 7 required) and try to compile the design of Daryl and check your options so you can then study the .doc file.

Cheers

Peter


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Mon Jul 25, 2016 5:26 pm 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
Thank you very much Peter.
I follow your advices. WinCUPL is installed, I'm playing with examples and reading guides, helps, manuals u.s.w.
It seems, microprocessor is already arrived, it will be nesessary to visit the post office. Tomorrow there will be "free run" test (constant NOP instruction on data bus). The questions will be posted on the forum.
Cheers
Vladimir


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Mon Jul 25, 2016 8:57 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
You should also read the following document http://ee-classes.usc.edu/ee459/library/documents/CUPL_Reference.pdf which helped me a lot. Also I suggest that you clearly understand the FIELD statement and it's use. It makes many equations much more easier to understand e.g. in Daryls example you see
Code:
RAM = A15 # (!A14 & !A13 & !A12 & !A11 & !A10 & A9 & !A8);

Which could be expressed as
Code:
PIN  21 = !RAM;
FIELD ADDRESS = [A15..0];

RAM = ADDRESS:[0000..01FF]
    # ADDRESS:[0300..7FFF];

which is much more intuitive to write and read. It does not matter that some pins of the address field are not assigned to a PIN, as long as they are don't care WinCUPL can sort that out for you. The .doc file also shows you the actual equations created and you will be surprised as to how much WinCUPL is able to optimize.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Wed Jul 27, 2016 8:08 am 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
A few days ago I downloaded this document and skimmed it. At first these things (FIELD's and range operations) do not cause me any emotions. But now, after a careful study of the relevant chapter, I'm starting to realize, what a powerful tool is the CUPL. Thanks for hints and guidelines Peter.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Wed Jul 27, 2016 11:59 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Thanks for CUPL info, Peter -- very interesting.

Regarding the code comparison, it's worth clarifying that the two examples use different definitions for the variable RAM. Here it is again, this time including Daryl's definition for RAM (from: http://sbc.rictor.org/decoder.html ). He chose to let RAM reflect the active-low nature of the actual pin.

Code:
Pin 21 = RAM;

RAM = A15 # (!A14 & !A13 & !A12 & !A11 & !A10 & A9 & !A8);

Code:
PIN  21 = !RAM;
FIELD ADDRESS = [A15..0];

RAM = ADDRESS:[0000..01FF]
    # ADDRESS:[0300..7FFF];

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Thu Jul 28, 2016 5:39 pm 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
The CUPL reference manual advises the designer against the habit to thinking constantly, wether signal ìs high or low. The designer should say 'true/false' or 'asserted/negated'. But, as soon, as I start to think about these things, my brain starts to boil. For example, who can tell me when the address line A15 is true? Or negated?


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Thu Jul 28, 2016 5:44 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
It's a common source of confusion, for control lines. For address and data I'm not sure at all that I'd use those words.

In 6502 land for example we have \SO which is active-low and will set the overflow flag when low. And we have RDY which is active high and signals that the memory is ready when high. It's very like a \HALT but for some reason MOS went with RDY instead, leading to much confusion when people say 'asserted' meaning low, when for an active-high signal, asserted means high.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Thu Jul 28, 2016 7:09 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
That's why I would have written the design file of Daryl as

Code:
Pin 21 = !RAM;

!RAM = A15 # (!A14 & !A13 & !A12 & !A11 & !A10 & A9 & !A8);


Unfortunately WinCUPL has the bad habit to turn all pins into positive logic notation (the pin-out of the doc file only shows RAM, CS etc. even if you define the Pins with the exclamation marks) and also "inverses" the equations.

Low and High are only '0' and '1' in our world (i.e. 65xxx world, it ain't necessarily so in other evironments). But even that does not say that high means active and low inactive (as we all know from the /CS if RAM chips).

I really prefer the words active, asserted and inactive, deasserted and combine it with a syntax wether active means a logic level '0' (Low) or '1' (High). It's a pity that this never has been standardized. If came across many version. / or ! as prefix, as in GALASM, device specifications adn WinCUPL. But also B or N as prefix (B was commonly used to denote the inverted Bus signal in DECs computers) or B or N as suffix (e.g. WDC uses the suffix B, as in SOB, VPB, NMIB, IRQB, etc). I tried to write and document everything using the / as prefix, but since I started to use WinCUPL I switched to ! as prefix. And I use the FIELD as often as possible as it tends to make your designs easier to understand.


Top
 Profile  
Reply with quote  
 Post subject: Re: How to use SPLD?
PostPosted: Thu Jul 28, 2016 8:41 pm 
Offline

Joined: Wed Jul 20, 2016 2:14 am
Posts: 78
Location: Irkutsk, Russia
I knew only one thing: still a lot of confusion is waiting for me in the future. :D

P.S. Wellon VP-290 is ordered. About end of august I hope to have it...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 15 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: