Author Topic: FPGA selection help for 32/16/8-bit CPU cores  (Read 3982 times)

0 Members and 1 Guest are viewing this topic.

Offline MIRKOSOFTTopic starter

  • Newbie
  • Posts: 6
  • Country: sk
FPGA selection help for 32/16/8-bit CPU cores
« on: November 06, 2019, 02:08:53 am »
Hello!

I'm newbie here and in FPGA and VHDL/Verilog beginner.
I want to ask for help in FPGA selection for my project.
Project: External CPU Soft-Core for 8-bit computer (Commodore 128)
Features:
8-bit x65 6502 core with address space 64K
8-bit x65 6509 core with address space 1 MB
8-bit x65 65c02 core with address space 64K
16-bit 65k 65c816 with address space 16 MB
32-bit 65k 65832 with direct address space 16 MB able to access 4 GB
8-bit x80 Z80 core with 24-bit addressing (16 MB)
32-bit x80 Z380 core with address space 4 GB
8-bit x65 65CE02 or GS4502 core with 28-bit addressing able to access 2,5 GB
They're 8 cores mostly from x65 family and computer is running with 8-bit MOS 8502 x65 CPU with 16-bit addressing accessing 128K RAM by MMU and 8-bit Zilog Z80 x80 CPU with 16-bit addressing accessing 64K RAM. FPGA I want to make as extension cartridge with soft-cores switching with ability to save/restore computer and soft-core RAM at power-on/off.

Dream is NEC uPD9002 V50 Z80/8086 Hybrid CPU compatible with both Z80 and x86 families but here I'm lost 'cause it is near impossible to find any detailed datasheet in English or German language, so dream I can only name dream. Working CPU is possible to get, but ability to create FPGA core is near impossible (for now).

What FPGA board needs:
44-pin IO
flash memroy and/or eMMC storage
RTC
Ethernet
separate story is RAM:
I want to leave for each core separate RAM space with possible backup - what de facto looks like 13 GB - but it looks only.
Real access is 16 MB, saving its content per core is 128 MB, so it is enough.
But if is possible to get FPGA with possible extension by RAM modules it will be great with possibility to use it also like RAM disk.
Why talking about 128 MB instead 2 GB or more?
In world of Commodore 8-bit computers is price important.
I can leave available cartridge for 200-250 EUR as basic
And for full featured up to 1000 EUR
So, can anybody recommend me FPGA in these two price lines with requested features?

Thank you for understanding and I hope your suggestions, help, replies or comments can help me to find what I need.
Miro
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #1 on: November 06, 2019, 02:23:04 am »
Your project is more like idea or I would say dreams [kidding]. Better do your part of homework first. You would want to study CPU soft cores you can find on internet (start with https://opencores.org/), check what FPGA resources are needed for those, make some table or something. If in the process you still have question - come back.
 

Offline MIRKOSOFTTopic starter

  • Newbie
  • Posts: 6
  • Country: sk
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #2 on: November 06, 2019, 11:14:11 am »
Opencores.org I know.
And from there I have most of CPU cores, some needs mod, so it is not only dream.
Of course two cores are possible to create only after deep learning VHDL or Verilog.
I began learning VHDL month ago, so beginning here is.
Verilog is problem - my native language is Slovak and I know 99% Czech, but in these two language is not any Verilog (e)book available - Verilog is mostly used in North America.
I know English, but not good and bit German - but if I want to understand really any programming language it needs SK or CZ language.

What is main problem - really I'm programmer in more than 3 PL, but hardware is for me yet not very well known. my friend knows hardware better, so we want to try it together.
I was posting FPGA selection help on Xilinx forum, but there I got recommended only Xilinx products with much more features than req'd and higher prices.
So, I'm asking here.
Maybe you can understand.

Miro
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #3 on: November 06, 2019, 11:55:40 am »
Maybe you can understand.
Yes I understand. You want someone to do your job for you. You have to find number of logic cells you need for your project, YOURSELF. Then you either take already mentioned Xilinx or Altera. Prices are similar, just tools differ. Why don't you start with baby steps - get ANY cheap FPGA board and start with one, simplest core?
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4824
  • Country: pm
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #4 on: November 06, 2019, 12:02:20 pm »
Mirko, you would need to spend years messing with verilog (my recommendation) and studying how those MCUs work. English docs are a must, of course. Nothing in CZ/SK languages is useful.
Your dreams are ok, and almost everybody looking at the FPGAs and their potential capabilities started with creating something with an MCU inside. Start small - buy a $15-$50 CPLD/FPGA board off ebay and a cheapo programmer, download the IDE suite and start to work with it.
So still some time till your Ace OS would run on your Commodore FPGA HW.
That is all you may get as an advice today, imho..

PS: there are ready to buy FPGA boards for Spectrum/Amiga/Atari, afaik.. You may start there as well.
« Last Edit: November 06, 2019, 12:11:35 pm by imo »
I got to the very edge of the abyss, but since then I have already taken a step forward..
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #5 on: November 06, 2019, 12:13:27 pm »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #6 on: November 06, 2019, 12:23:50 pm »
Start small - buy a $15-$50 CPLD/FPGA board off ebay and a cheapo programmer, download the IDE suite and start to work with it.
No CPLD! It is useless for even simplest CPU core.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4824
  • Country: pm
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #7 on: November 06, 2019, 12:34:29 pm »
Good for learning verilog, however..
I got to the very edge of the abyss, but since then I have already taken a step forward..
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #8 on: November 06, 2019, 12:47:26 pm »
Good for learning verilog, however..
No it's not. Today you don't want to learn Verilog/VHDL using "programmable logic array" that is nearly obsolete, and is not even similar to FPGA. Search internet for "CPLD vs FPGA differences" and you will see that suggesting CPLD for someone who aim for FPGA is very bad idea.
 
The following users thanked this post: iMo

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9902
  • Country: us
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #9 on: November 06, 2019, 03:59:35 pm »
You're asking for memory space of up to 16 MB and, in my view, that memory should be on the FPGA board and tightly coupled electrically.  Some of your requested cores seem quite large, I don't know what it will take in terms of an FPGA but most of the 65xx and Z80 cores will easily fit in an Artix 7 board.  I would always recommend the 100T version.  Yes, the boards are expensive, I have bought a few of them myself.

https://store.digilentinc.com/arty-a7-artix-7-fpga-development-board-for-makers-and-hobbyists/

This board is my favorite:

https://store.digilentinc.com/nexys-a7-fpga-trainer-board-recommended-for-ece-curriculum/

Note that it comes with a VHDL component to make the DDR memory look like static RAM.  That's a really big deal!

Most of the cores you want are already at OpenCores and the rest are going to be a stretch.  The T80 project from OpenCores is a really good implementation of the Z80.  I have used it to run the old CP/M 2.2 Operating System from a Compact Flash device and I have another board implementing PacMan.

https://www.fpgaarcade.com/

Why not take on a simple project from scratch?  Search the Internet for LC3 (or LC3b) and sit down with a suitable FPGA board and build the core.  By the time you are finished, you will know a lot above HDLs.  It's a simple 16 bit RISC architecture with a limited instruction set but to implement it you will need a Finite State Machine with 64 states (several unused) and the usual complement of BlockRAM, MUXes and so on.  The documentation is excellent and there's a book by Patt & Patel  "Introduction to Computing Systems"  They use microcoding, I used a state machine.  Either method will work and it might be really interesting to implement a microcoded design and then stuff in the microcode from a .hex file.  This allows separate development and initialization of the BlockRAM used as microcode storage.  All necessary documentation is on the Internet.  You don't really need the book.

Go to OpenCores and grab a UART core such that you can implement interrupt driven console input and output.  Many USB boards will create a USB COM port which you can connect to the UART.
 

Offline MIRKOSOFTTopic starter

  • Newbie
  • Posts: 6
  • Country: sk
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #10 on: November 06, 2019, 11:23:40 pm »
Ok, explaining req'd.

1. MiST I owned longer time ago, great thing, I never owned its unofficial successor MiSTer, used for many computer cores
2. Nexys4DDR - old name for Nexys A7 I owned for Mega 65 project
3. We both have board for beginning which is normally used as C128/C64 cartridge, so we can make anything, but I asked for FPGA to get board for product final status. So, we can begin directly,  it has delay caused by my other projects.

So, again - I need to know in which price line I can to be for two versions: standard and full featured.
Thank you for understanding.
I hope that it is clear that I'm searching for target FPGA.
Thank you for each suggestion.
Miro
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3473
  • Country: ua
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #11 on: November 07, 2019, 02:07:48 am »
I think some altera cyclone 4 ep4ce22 or cyclone 10LP 10cl025 with external memory chip and VGA output circuit will be enough.

Some peripheral adapters, such as keyboard, mouse, etc also good.

Just look for more on-board peripherals needed for emulated computer, it will simplify your life :)
« Last Edit: November 07, 2019, 02:12:24 am by radiolistener »
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1998
  • Country: dk
 

Offline Canis Dirus Leidy

  • Regular Contributor
  • *
  • Posts: 216
  • Country: ru
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #13 on: November 10, 2019, 09:30:53 pm »
Some numbers from real world.  w11 (Implementation of the PDP-11/70 on FPGA) takes a little less than half of Artix-7 (XC7A35T) or almost all of Spartan-6 (XC6SLX16). And PDP2011 takes 69% of Cyclone IV (EP4CE22). For yet another ZX Monster low-end Cyclone II (EP2C8) and STR750FV2T6 (MCU with ARM7TDMI core) was enough:
 
The following users thanked this post: ogden

Offline MIRKOSOFTTopic starter

  • Newbie
  • Posts: 6
  • Country: sk
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #14 on: November 11, 2019, 10:05:07 am »
Yes, I know Grant's Multicomp.
I owned MiST FPGA where are available many computers, arcade and games I'm ignoring. Also owned Nexys4DDR for running Mega 65 (Commodore 65 successor) with using many cores.
But: I don't want to create whole computer FPGA core.
I want to create cartridge for Commodore 128, working also with Commodore 64 and even maybe for Commodore VIC20.
Really cartridge to connect into expansion port - only CPU core.

I know lot of projects, for example I want to try implement first attempts to 1541Ultimate 2+ cartridge which offers 16MB RAM, is ready to connect to C128/C64 and needs use own core, and some C and 6502 code - this is not problem.
I need to learn VHDL, and if I find any documentation in Slovak or Czech language want to learn Verilog 'cause many FPGA cores are written in Verilog 'cause it is commonly used in North America - and this is problem of SK/CZ documentation for Verilog.
When I'll be able to modify VHDL and even create own, it will come true.
I'm not beginner in coding, I know many FPGA core resources but my problem is that I know not to find FPGA which allows to run 32/16/8-bit cores with available at least 128MB RAM - best in add-on RAM modules and also flash - not only for firmware - also for RAM content saving and computer state too at power-off. In state saving is problem that C128/C64/VIC20 users knows not any shutdown process - they always turning off computer by power switch. I need storing of 128MB RAM, computer RAM and IO in as little time as possible, maybe by wiring power-off switch which allows hold power for that time to save state.
So, problem is for me hardware, not software - and if I find FPGA, I can learn VHDL and maybe Verilog - so also testing on real hardware. It is not enough to learn VHDL/Verilog without real hardware tests.
So, what a FPGA to use?
Req'd are: able to run 32/16/8-bit core, 128MB RAM, at least 128K flash and NVRAM or other way to store 128MB + 128K of space (I k now that Optane solution exist, but is it available also for FPGA?), RTC and ethernet. Maybe video output - and that's all - nothing more - no keyboard, no anything other.
If you want to see anything similar, hardware solution exist from year 1997 - CMD SuperCPU in versions 128 and 64 - I want to do anything better - it offers overclocked W65C816 CPU at 20MHz and 16MB of RAM + JiffyDOS. Look at http://supercpu.cbm8bit.com/
If you can help me to find anything able something similar, even in requirements which I need I will be thankful.

Miro
 

Online Berni

  • Super Contributor
  • ***
  • Posts: 4985
  • Country: si
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #15 on: November 11, 2019, 11:47:26 am »
I don't see needing a Verilog book in Slovakian being the major barrier.

Even if you do find a book in your language to learn Verilog that's just a small part of it. All of the software tools to write, compile, simulate code on the FPGA are going to be in English. Reading documentation for the actual chip families and chips is also really important, all of this is again in... wait for it.. English. Knowing Verilog/VHDL will do you no good at all if you don't understand how to compile it and use the chip.

If you want the software and documentation in languages other then English then the only option is to go to a Chinese FPGA vendor where you will get to choose between broken English or Chinese as your language.

If you can understand enough spoken English just try watching some Youtube tutorials on FPGAs. Run the chip documentation trough google translate or something if you think it helps.
 

Offline MIRKOSOFTTopic starter

  • Newbie
  • Posts: 6
  • Country: sk
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #16 on: November 11, 2019, 11:59:03 am »
I understand English, poor but good for compiling and using software/compilers/description/comments.
I know programming also in assembler, C and others - and there it is about computer English.

I have Czech ebook for learning VHDL and there's always used work with English compilers, even in world of software and applications is for me always better English.
Why? I know better computer English than spoken English - but spoken English is used more in ebooks or other manuals.
In computer English I know all what is needed, is it enough?
For example - I'm using Visual Studio - there's available Czech translation, but it is useless e.g. for naming items in menu - e.g. Compile is better to translate to Skompilovat than Sestavit.
Sestavit is very different to English and even also it has other word meaning - so using English in software is for me better and more clear...

Miro
 

Online Berni

  • Super Contributor
  • ***
  • Posts: 4985
  • Country: si
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #17 on: November 11, 2019, 04:19:44 pm »
Yeah i also use all software in English rather than Slovenian since i am just not used to the translated names for things.

I don't think books are a good way to teach programming languages, i never learned a language using a book. Sure its good at teaching you the very basics of how variables, functions, statements look like and the details of there behavior, but for most normal languages you can pick most of that up in half an hour. I can just google a decent "Beginners tutorial for <insert language here>". Once i am this far then i mostly just look at code examples, learning good ways of doing certain things. Books tend to be useless at that while google can instantly find the exact code example i want from a website like StackOverflow or a similar. It seams like a waste of paper for me to buy a book only to read it for 30 minutes. Once you start looking at code examples the language is Verilog or VHDL anyway and not Slovakian or English (Apart from comments that are going to be using very technical words anyway so you will want them in English for the same reason you like your software in English).

Maybe for others books work well for teaching programming, for me personally they don't work.

Knowing english is going to be a huge benifit to you anyway, and since you know the basics you just need to practice it by watching content in this language. Just try to watch more English Youtube videos, turn on automatic translated subtitles to help you with words you don't know. It typically only takes a week of this to get the hang of the language structure, the rest is just about expanding your word collection and this happens naturally over years.
 

Offline MIRKOSOFTTopic starter

  • Newbie
  • Posts: 6
  • Country: sk
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #18 on: November 12, 2019, 12:36:11 am »
I know that.
My English is not so poor that I do not understand really everything, only my known word count is in middle amount.
My Google and other search engines problem is this:
- I find anything and see all clear and perfectly, but I look on the next in text and I have not always time for it, so I add bookmark to my browser to look at later
- I find anything other, do the same
- resources are highly growing in count and I forget after few days the first, so I create groups in bookmarks and so on
- and later I have bookmarks and bookmark groups and really it is bizarre resource full on many sites
And this is reason for me why I look into ebook or so - there is always collected at least basic information and I can later find it always there and search immediately instead searching in bookmarks or searching again for the same like reinventing the wheel.
Really for programming and even notes in code is English the best - clear, easy and effective.
But reading for example theory is in other than Slovak or Czech language hard...

Miro
 

Offline MarkMLl

  • Frequent Contributor
  • **
  • Posts: 360
  • Country: gb
Re: FPGA selection help for 32/16/8-bit CPU cores
« Reply #19 on: December 21, 2021, 09:55:22 pm »
Dream is NEC uPD9002 V50 Z80/8086 Hybrid CPU compatible with both Z80 and x86 families but here I'm lost 'cause it is near impossible to find any detailed datasheet in English or German language, so dream I can only name dream. Working CPU is possible to get, but ability to create FPGA core is near impossible (for now).

A very belated comment in case anybody is still interested in this.

A project such as https://hackaday.com/2020/07/10/an-nec-v20-for-two-processors-in-one-sbc/ provides a fairly elegant v20 system, which would run (C)CP/M-86 and (8080) CP/M-80. A few years ago (/quite/ a few years ago) I wrote a shell which allowed 8080 programs to run on a V20 CCP/M-86 system, but found a nasty bug in the chip... I think it was one of the flag bits not being preserved over a mode change.

A project such as https://www.jamieiles.com/80186/ AKA https://github.com/jamieiles/80x86 emulates an 80186. It should be comparatively easy to add the NEC-specific opcodes that switched to and from an 8-bit emulation.

A project such as https://hackaday.com/2019/12/10/laptop-like-its-1979-with-a-16-core-z80-on-an-fpga/ has pointers to a good Z80 emulation. In practical terms it might even be possible to dispense with details like the Z80 secondary register bank.

I note from the V20 documentation that it apparently supports an invalid opcode interrupt. I haven't the faintest idea whether that does anything useful when in 8-bit mode.

My current interest in this is that I was sniffing around for a development board which exposed the address/data/control busses, so that I could capture useful data to a VCD file and investigate the feasibility of a disassembler.

MarkMLl
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf