6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu May 09, 2024 10:46 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: The 6502 ALU in TTL
PostPosted: Sun Apr 15, 2012 9:06 am 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
Hallo allemaal,

I'm busy revising my TTL6502 project, http://www.baltissen.org/newhtm/ttl6502.htm. The original idea was to build a 6502 only TTL ICs. But I soon found out that that was undoable from a practical point of view: the Instruction decoder and the ALU were the trouble makers. So I decided to cheat a bit and to use FlashRAMs.
To handle 8-bit operations I would need a FlashRAM with at least 24 inputs. Not having them I decided to cascade two, each handling four bits. But that idea comes with a penalty: the access time of the ALU is 140 ns. This means I can only emulate the 6502 up to 3 MHz.

During the revision I thought about expanding the 6502 a bit with, for example, 16-bits registers. Only after weeks I realised that I needed a 16-bits ALU as well. Using FlashRAMs means a 280 ns. access time, meaning I can forget 2 MHz operations :(

My question: has anybody a better idea?

Many thanks in advance!

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Sun Apr 15, 2012 9:18 am 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
Ruud, it might be best to just post a link to the same post you put in "Programmable logic" (there-- I just did!) so the replies are kept all in one place and are more helpful as each person replying sees everything that was already written. If you like, I think the new forum software allows us to move the topic if it was not in the best section for the subject matter.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Sun Apr 15, 2012 12:34 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
GARTHWILSON wrote:
Ruud, it might be best to just post a link to the same post you put in "Programmable logic" (there-- I just did!) so the replies are kept all in one place and are more helpful as each person replying sees everything that was already written. If you like, I think the new forum software allows us to move the topic if it was not in the best section for the subject matter.


When writing this post, my son came downstairs to tell me he had a virus on his PC. I know that I finished it. But when I looked this morning, I couldn't find it anywhere! So I wrote a new one. And when I submitted that one, I was quite sure I hadn't seen the usual screens yesterday thus believing that, although having finished it, I hadn't submitted it.

I'm sorry for any inconvenience!

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Sun Apr 15, 2012 12:44 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
And in turn I was briefly confused to see Garth's reply but no sign of my own half-baked contribution!


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Mon Apr 16, 2012 6:08 pm 
Offline

Joined: Sun Sep 15, 2002 10:42 pm
Posts: 214
It doesn't sound like you're familiar with bit-slice processors.

It will take much fewer chips to build a 16-bit ALU using something like an AM2901 bit-slice ALU.

Toshi


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Mon Apr 16, 2012 6:17 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
As part of my Computer Architecture class i had a lab in which i had to program the Intel 3002 bit-slice cpu. I had a ms-dos program for doing that, but it is in croatian... This kind of cpu may be microprogrammed in any way, but than again, this is like cheating(if you want to build your own alu)...


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Mon Apr 16, 2012 9:05 pm 
Offline

Joined: Sun Sep 15, 2002 10:42 pm
Posts: 214
Dajgoro wrote:
As part of my Computer Architecture class i had a lab in which i had to program the Intel 3002 bit-slice cpu. I had a ms-dos program for doing that, but it is in croatian... This kind of cpu may be microprogrammed in any way, but than again, this is like cheating(if you want to build your own alu)...


You can use an Am2901 inn a pipelined design.

The ALU doesn't care if the design is pipelined or microcoded.

Toshi


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Tue Apr 17, 2012 4:18 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
Dajgoro wrote:
... i had to program the Intel 3002 bit-slice cpu.

Couldn't find the datasheet. And I found out it is almost 40 years old ???? Is it still available?

TMorita wrote:
You can use an Am2901 inn a pipelined design.

Located a datasheet and:
- I wondered if it could emulate the complete ALU of the 6502
- propagation delays up to 90ns.! In that case a 70 ns. FlashRAM is faster.

Thanks anyway for your response!

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Tue Apr 17, 2012 6:59 pm 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 277
There's also the 74<mumblemumble>181 and '182 chips; it is possible that these may be available in a logic family that gives you the performance you require. There also appears to be something called the '381 and '382.


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Tue Apr 17, 2012 7:48 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
The intel3002 (the intel3001 is the control chip) datasheet: http://www.cpu-zone.com/3002/intel3002.pdf

You may buy it here: http://www.ebay.com/sch/i.html?_trkparms=65%253A12%257C66%253A2%257C39%253A1%257C72%253A6063&rt=nc&_nkw=intel3002&_sticky=1&_trksid=p3286.c0.m14&_sop=15&_sc=1

As for the 181, i recently purchased 3x form ebay:http://www.ebay.com/sch/i.html?_nkw=74ls181&_sacat=0&_sop=15&_odkw=intel3002&_osacat=0&_trksid=p3286.c0.m270.l1313


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Tue Apr 17, 2012 8:31 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
Dajgoro wrote:

I have some 181's but they don't cover the BCD mode.

But the solution for my problem is quite simple. When I run in 6502 mode, I only need the 8-bits part of the ALU and so I still can run the wanted 2 (even 3) MHz. But my 16-bits mode won't be compatible with the 65816 anyway so there is no objection against inserting a "wait state" when the ALU is needed. Problem solved :)

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Sun Apr 22, 2012 9:22 am 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
We have an incredible warehouse of info on this website, and my attention was just brought to something I didn't realize was there, from Dieter Mueler:
ALU design index, including NMOS 6502 ALU
Trex experimental 32 Bit TTL RISC CPU (I think I saw it before on his old website.)

A couple of his projects are shown here.

First, his M02 home-made 6502 made from standard parts, 74LSxxx, 27C512 EPROMs, and a fast SRAM from an old 80386 motherboard:
Image

then the 32-bit TTL RISC CPU (the sandwich is three boards thick, in a 6U Eurocard size):
Image

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Fri May 04, 2012 7:52 pm 
Offline
User avatar

Joined: Fri Dec 12, 2003 7:22 am
Posts: 259
Location: Heerlen, NL
GARTHWILSON wrote:
... and my attention was just brought to something I didn't realize was there, from Dieter Mueler: ...

Although it works great indeed, I have one objection against this design: it doesn't emulate the 6502 internally. It is in fact a little TTL computer running at X MHz that simulates what the 6502 does at 1 MHz. My design is meant to run on the clock it is fed with.

But again: still all respect for his solution!

_________________
Code:
    ___
   / __|__
  / /  |_/     Groetjes, Ruud
  \ \__|_\
   \___|       URL: www.baltissen.org



Top
 Profile  
Reply with quote  
PostPosted: Mon May 14, 2012 9:43 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
Somewhat related, although not tackling BCD, 'lateblt' has an article about a TTL design of a 6502 ALU which goes into some detail about the datapath here:
http://lateblt.livejournal.com/87418.html


Top
 Profile  
Reply with quote  
 Post subject: Re: The 6502 ALU in TTL
PostPosted: Wed Jul 25, 2012 6:33 am 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
Mike just posted Dieter's updates, at http://6502.org/users/dieter/index.htm .

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


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

All times are UTC


Who is online

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