2AtomFPGA - successor of Yarrb

discussion of games, software, hardware & emulators relating to the Acorn Atom and Acorn System machines.
Post Reply
User avatar
roland
Posts: 3271
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

2AtomFPGA - successor of Yarrb

Post by roland » Thu Jun 13, 2019 9:46 pm

Well, this is my new idea:
2AtomFPGA.png
It's also a board that goes into the 6502 socket but just requires 50% less additional wires than the Yarrb board. Only a BUF_EN signal to IC5 is needed. It will probably also work around the Phi2 issues of the Yarrb board.

Board description
The main components are a Spartan3 FPGA, 512kB static RAM, a 512KB EEPROM and a SD-MMC socket. The FPGA will hold the CPU core, AVR for AtoMMC, address decoding logic and a SID audio. My intention is to use a XC3S50A-4VQG100C because it's available, recommended for new designs and cheap (about €9.00 at Farnell). The static RAM is fast and smaller than the 32 DIL equivalents. Also the EEPROMS are getting rare in 32 DIL housings but the PLCC-32 are a good alternative. They are still easy to program .... if my programmer cooperates :)

Not drawn on the sketch are the buffers and level shifters, nor is there a clock circuit for the FPGA.

Installation
Like the Yarrb board you will have to remove all the lower memory and some decoding logic. Because this board will use it's own clock there's no need for a wire from the Atom's clock circuit to the CPU socket. You will still need the wire to enable the bus buffers (IC 2, 3 and 4). That's also a non-destructive modification in the Atom. The board will not exceed the size of the Yarrb so it won't clash with existing video boards like the colour board or noise killer.

Pricing
My goal is to keep the price of the board as close as possible to €30.00.

Why?
Because there's still a demand for memory upgrades for the Atom and most of the existing boards are build with components that are obsolete and hard to get, especially at the regular suppliers. Some Chinese vendors still sell them but often you need to buy more than one and you don't know about the quality of the components.

I replaced the CPU by a FPGA because it will make your Atom more powerful. It can run at a very high speed as long as you don't need the I/O like the VIA, timers or the keyboard. So for calculations you can run at about 8 MHz, just like the FPGAtom. This board will upgrade your Atom to an AtomFPGA with all the luxury of the standard Atom (housing, keyboard, interfaces). Together with Hoglet's noise killer and HDMI colour adapter you will have your Atom ready for the year 2020 8)

Comments?
Please leave your comments. I have nothing designed yet, just a simple sketch to illustrate the board.
Last edited by roland on Fri Jun 14, 2019 8:56 am, edited 1 time in total.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
-B-
Posts: 130
Joined: Wed Nov 26, 2014 11:54 am
Location: Noordwijk ZH (NL) / Durham (UK)
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by -B- » Thu Jun 13, 2019 10:08 pm

This sounds great!
I presume we will be able to select the speed?

Neil.
Atom | BBC Model A | BBC Model B | Electron | Olivetti PC128S.

User avatar
roland
Posts: 3271
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by roland » Thu Jun 13, 2019 10:18 pm

Yes, you can select speed by poking into #BFFE. Just like Yarrb and Atom 2k-series.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
sirmorris
Posts: 771
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by sirmorris » Fri Jun 14, 2019 6:14 am

What's the socket for? EEPROM? It all sounds quite exciting Roland!

User avatar
hoglet
Posts: 8366
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by hoglet » Fri Jun 14, 2019 7:02 am

Hi Roland,

This looks like a fun project.

A couple of thoughts about your choice of FPGA - the XC3S50A.

- The AVR version of AtoMMC needs 4KB of RAM and 20KB of ROM. So a total of 24KB. The XC3S50A only has 6KB of internal block RAM, so it's not going to fit. It's probably also not going to fit in terms of gates, as the AVR core is much bigger than the 6502 core. The next device up, the XC3S200A, has 32KB of internal block RAM. So it should fit in that, depending on what else is included.

- In Atom2K18 the AtoMMC AVR core is clocked at 32MHz, which is one of the things that makes it feel so fast. The Spartan 3A series is much slower internally than the Spartan 6 series. About half the speed. I doubt you will be able to run the AVR at 32MHz. Even 16MHz might be a stretch.

- The SID core uses a fair number of multipliers. The XC3S50A only has three hardware multipliers.

So, you almost certainly will need to move up to the more expensive XC3S200A part (£15 + VAT in a VQ100 package).

Dave

Prime
Posts: 2744
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by Prime » Fri Jun 14, 2019 8:12 am

roland wrote:
Thu Jun 13, 2019 9:46 pm
[/b]Because there's still a demand for memory upgrades for the Atom and the existing boards are build with components that are obsolete and hard to get, especially at the regular suppliers. Some Chinese vendors still sell them but often you need to buy more than one and you don't know about the quality of the components.
Just to point out that for the Atom RAM-ROM board that I designed this is not the case, latest version uses the surface mount XC9536XL, though most of the versions out in the field are still the older version. The rest is standard LSTTL and SRAM / Flash ROM.

Cheers.

Phill.

User avatar
roland
Posts: 3271
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by roland » Fri Jun 14, 2019 8:58 am

Thanks Phill, I refined my phrase. Your RAM-ROM board is still a good alternative for Yarrb.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 8366
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by hoglet » Fri Jun 14, 2019 11:46 am

Roland,

I just tried a small experiment. I hacked a version of AtomFpga, removing a lot of stuff, until I ended up with just:
- the 6502 section
- the AtoMMC section
- the Atom2K15 RamRom section
- an optional SID section

With the SID disabled, this uses ~90% of a XC3S200A and routes successfully.

With the SID enabled, this went up to 125% and (obviously) it failed to route.

So next I tried switching to a Spartan 6 - the LX4 - and still it did not fit. This time it's because there is not enough block RAM. The AVR needs 24K and the SID needs 4K, but the LX4 only has 24KB on total.

Here's a small comparison table between the parts:

Code: Select all

Part    Usable BRAM   LUTs  Logic Cells  Registers  Multipliers  Package         Price
----    -----------   ----  -----------  ---------  -----------  -------         -----

XC3S50A         6KB   1408         1584       1408            3  TQFP100   £6.44 + VAT 
XC3S200A       32KB   3584         4032       3584           16  TQFP100  £15.00 + VAT

XC6SLX4        24KB   2400         3840       4800            8  TQFP144   £9.18 + VAT
XC6SLX9        64KB   5720         9152      11440           16  TQFP144  £13.21 + VAT
Finally, I tried an LX9, and it fitted easily with the following usage:
- BRAM: 28KB of 64KB (43%)
- LUTs: 2864 of 5720 (50%)
- Registers: 1815 of 11440 (15%)
- Multipliers: 4 of 16 (25%)

I wonder if it's worth considering using an external microcontroller for AtoMMC?

The ATxmega32D4-AU is very cheap:
https://uk.farnell.com/microchip/atxmeg ... dp/1748558

I still don't think the 6502 + SID + RamRom would ever fit in the XC3S50A FPGA.

To save some board space, you could dispense with the 512K parallel FLASH, and place the default ROMs in the SPI EEPROM. These could be boot-loaded into SRAM on power up. Some of the Atom FPGAs do this already, and it's very effective. The SRAM pages used for ROM can be write protected, so it really is like ROM.

Dave
Last edited by hoglet on Fri Jun 14, 2019 12:00 pm, edited 3 times in total.

User avatar
roland
Posts: 3271
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by roland » Fri Jun 14, 2019 1:22 pm

hoglet wrote:
Fri Jun 14, 2019 11:46 am
I wonder if it's worth considering using an external microcontroller for AtoMMC?
Or we just stick to the original AtoMMC's. After all the Atom has PL8 available. My concern is that you also need a programmer for that microcontroller.
hoglet wrote:
Fri Jun 14, 2019 11:46 am
To save some board space, you could dispense with the 512K parallel FLASH, and place the default ROMs in the SPI EEPROM. These could be boot-loaded into SRAM on power up. Some of the Atom FPGAs do this already, and it's very effective. The SRAM pages used for ROM can be write protected, so it really is like ROM.
Is that (psysicaly) the same SPI EEPROM where the FPGA configuration is stored, so we only need one SPI EEPROM?
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 8366
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by hoglet » Fri Jun 14, 2019 2:48 pm

roland wrote:
Fri Jun 14, 2019 1:22 pm
My concern is that you also need a programmer for that microcontroller.
That's s good point... Charlie put a lot of effort into the boot loader for the PIC that allows for the reprogramming of the main FLASH. The AVR AtoMMC doesn't have that capability yet.
roland wrote:
Fri Jun 14, 2019 1:22 pm
Is that (psysicaly) the same SPI EEPROM where the FPGA configuration is stored, so we only need one SPI EEPROM?
Yes, it's the same EEPROM. They are usually much larger than the FPGA bitstream. For example, the W25Q32BV on the LX9 Core Board is 32MBit. The size of the LX9 bitstream is 2.7Mbit. So that's over 3MBytes free. They typically cost less than £1.00.

Dave

User avatar
roland
Posts: 3271
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by roland » Fri Jun 14, 2019 3:27 pm

Then let's skip the AtoMMC and the EEPROM on this board and use the small EEPROM. That will keep the price low and FPGA-minded people will not bother to reflash their FPGA firmware for a new AtoMMC version but I think most Atom owners just want to have it working without having a programmer for every device on the board.

Would a CPU, RAM/ROM logic and SID fit in a XC3S200A? It's a bit more expensive than the Spantan6 devices but there are only 100 pins which might make it easier to solder. (Although I did not look if the pins and pitch are the same so that last phrase might be nonsense.)
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 8366
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by hoglet » Fri Jun 14, 2019 4:39 pm

roland wrote:
Fri Jun 14, 2019 3:27 pm
Then let's skip the AtoMMC and the EEPROM on this board and use the small EEPROM.
One possible advantage of the parallel EEPROM is that it can be reprogrammed in software. But that is dangerous if it goes wrong. It's been possible on existing RamRom boards, and the FLASH command even exists in the FPGA Utils ROM, but I don't think anyone dares to use it. :lol:
roland wrote:
Fri Jun 14, 2019 3:27 pm
Would a CPU, RAM/ROM logic and SID fit in a XC3S200A?
Yes it will - with 62% utilization of LUTs. But....
roland wrote:
Fri Jun 14, 2019 3:27 pm
It's a bit more expensive than the Spantan6 devices but there are only 100 pins which might make it easier to solder. (Although I did not look if the pins and pitch are the same so that last phrase might be nonsense.)
You make a good point there about pin pitch (which I had missed).

Here are the two package diagrams:
https://www.xilinx.com/support/document ... /vq100.pdf
https://www.xilinx.com/support/document ... /tq144.pdf

Both are actually the same pitch - 0.5mm - which is pretty fine. I'd say they were both about the same difficulty to solder. i.e. quite difficult!

Given this, I don't really see any benefit to the XC3S200A.

You could use the cheaper/faster XC6SLX9 and get an AtoMMC for free.

Dave

User avatar
roland
Posts: 3271
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by roland » Fri Jun 14, 2019 5:25 pm

Ok. Then we stick to that. We can try to find somebody / a company that can solder the (smd) components for us.
256K + 6502 Inside
MAN WOMAN :shock:

bprosman
Posts: 297
Joined: Sun Mar 29, 2015 10:27 pm
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by bprosman » Fri Jun 14, 2019 9:22 pm

100 Pin 0.5mm is still do-able by hand.
Did a few XC9572's last summer.
XC9572.jpg
But most PCB manufacturers can put the components on for you as well.

janrinze
Posts: 87
Joined: Sat Mar 19, 2016 6:38 am
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by janrinze » Sat Jun 15, 2019 6:31 pm

FPGA based Atom's can easily do 40 MHz.
If the I/O is setup to have wait states then all will work as expected.
Another thing I have not seen yet is to make the memory map for video as a shadow buffer.
That means only writes to the video memory go out, the internal SRAM is updated simultaneously and thus allowing for fast readout.

Of course if the video is also in the FPGA then that does not matter much.
With the ICE40 my designs have the dual-port SRAM available for video (max 32KB) and 512KB of external 10ns SRAM for the rest.

Still working on the PS2 keyboard input, hoglet's code works well and i would like some 'auto' select for this in the code.

User avatar
roland
Posts: 3271
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by roland » Sat Jun 15, 2019 7:25 pm

janrinze wrote:
Sat Jun 15, 2019 6:31 pm
FPGA based Atom's can easily do 40 MHz.
How does CTRL+G sound at that speed :shock:
janrinze wrote:
Sat Jun 15, 2019 6:31 pm
Another thing I have not seen yet is to make the memory map for video as a shadow buffer.
We can keep that in mind :idea:
256K + 6502 Inside
MAN WOMAN :shock:

janrinze
Posts: 87
Joined: Sat Mar 19, 2016 6:38 am
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by janrinze » Sat Jun 15, 2019 7:46 pm

roland wrote:
Sat Jun 15, 2019 7:25 pm
janrinze wrote:
Sat Jun 15, 2019 6:31 pm
FPGA based Atom's can easily do 40 MHz.
How does CTRL+G sound at that speed :shock:
janrinze wrote:
Sat Jun 15, 2019 6:31 pm
Another thing I have not seen yet is to make the memory map for video as a shadow buffer.
We can keep that in mind :idea:
I haven't tested sound much mainly because there is no speaker attached. :oops:
45 MHz just running a test now and seems fine too.

Games and such that wait for vsync work smoothly but anything that expects the speed based on cpu cycles definitely is just way too fast. #-o

45 MHz is a really nice option if you want to see what's possible in respect to pushing the limits.
Since the SDcard is operated from a hardware SPI interface (SDDOS) it has no issues getting data at that speed either.

Probably not very compatible but definitely nice to play with :D

User avatar
1024MAK
Posts: 9052
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: 2AtomFPGA - successor of Yarrb

Post by 1024MAK » Sat Jun 15, 2019 8:01 pm

roland wrote:
Sat Jun 15, 2019 7:25 pm
janrinze wrote:
Sat Jun 15, 2019 6:31 pm
FPGA based Atom's can easily do 40 MHz.
How does CTRL+G sound at that speed :shock:
Suitable as a dog “whistle” :lol:

Mark

Post Reply