FPGA selection help for 32/16/8-bit CPU cores - Page 1
Forum section: electronics / beginners

author: MIRKOSOFT
author_rank: Newbie
timestamp: November 06, 2019, 02:08:53 am
content: 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 64K8-bit x65 6509 core with address space 1 MB8-bit x65 65c02 core with address space 64K16-bit 65k 65c816 with address space 16 MB32-bit 65k 65832 with direct address space 16 MB able to access 4 GB8-bit x80 Z80 core with 24-bit addressing (16 MB)32-bit x80 Z380 core with address space 4 GB8-bit x65 65CE02 or GS4502 core with 28-bit addressing able to access 2,5 GBThey'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 IOflash memroy and/or eMMC storageRTCEthernetseparate 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 basicAnd for full featured up to 1000 EURSo, 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

author: ogden
author_rank: Super Contributor
timestamp: November 06, 2019, 02:23:04 am
content: Your project is more like idea or I would say dreams . Better do your part of homework first. You would want to study CPU soft cores you can find on internet (start withhttps://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.

author: MIRKOSOFT
author_rank: Newbie
timestamp: November 06, 2019, 11:14:11 am
content: 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

author: ogden
author_rank: Super Contributor
timestamp: November 06, 2019, 11:55:40 am
content: Quote from: MIRKOSOFT on November 06, 2019, 11:14:11 amYes I understand. You want someone to doyour jobfor 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?

author: iMo
author_rank: Super Contributor
timestamp: November 06, 2019, 12:02:20 pm
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: November 06, 2019, 12:13:27 pm
content: Checkout the mister projecthttp://emulation.gametechwiki.com/index.php/MiSTer

author: ogden
author_rank: Super Contributor
timestamp: November 06, 2019, 12:23:50 pm
content: Quote from: imo on November 06, 2019, 12:02:20 pmNo CPLD! It is useless for even simplest CPU core.

author: iMo
author_rank: Super Contributor
timestamp: November 06, 2019, 12:34:29 pm
content: Good for learning verilog, however..

author: ogden
author_rank: Super Contributor
timestamp: November 06, 2019, 12:47:26 pm
content: Quote from: imo on November 06, 2019, 12:34:29 pmNo 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.

author: rstofer
author_rank: Super Contributor
timestamp: November 06, 2019, 03:59:35 pm
content: 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.

author: MIRKOSOFT
author_rank: Newbie
timestamp: November 06, 2019, 11:23:40 pm
content: Ok, explaining req'd.1. MiST I owned longer time ago, great thing, I never owned its unofficial successor MiSTer, used for many computer cores2. Nexys4DDR - old name for Nexys A7 I owned for Mega 65 project3. 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

author: radiolistener
author_rank: Super Contributor
timestamp: November 07, 2019, 02:07:48 am
content: 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

author: bingo600
author_rank: Super Contributor
timestamp: November 10, 2019, 07:07:56 pm
content: Do you know this page ?? - Grant apparently got a new HPhttps://mobile.twitter.com/zx80nuthttp://searle.wales/https://searle.x10host.com/Multicomp/index.htmlRetrobrew has lots of info for the Multicomphttps://www.retrobrewcomputers.org/doku.php?id=boards:sbc:multicomp:starthttps://github.com/douggilliland/MultiComp/Bingo

author: Canis Dirus Leidy
author_rank: Regular Contributor
timestamp: November 10, 2019, 09:30:53 pm
content: 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). AndPDP2011takes 69% of Cyclone IV (EP4CE22). Foryet another ZX Monsterlow-end Cyclone II (EP2C8) and STR750FV2T6 (MCU with ARM7TDMI core) was enough:

author: MIRKOSOFT
author_rank: Newbie
timestamp: November 11, 2019, 10:05:07 am
content: 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 athttp://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

author: Berni
author_rank: Super Contributor
timestamp: November 11, 2019, 11:47:26 am
content: 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.

author: MIRKOSOFT
author_rank: Newbie
timestamp: November 11, 2019, 11:59:03 am
content: 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

author: Berni
author_rank: Super Contributor
timestamp: November 11, 2019, 04:19:44 pm
content: 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.

author: MIRKOSOFT
author_rank: Newbie
timestamp: November 12, 2019, 12:36:11 am
content: 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 sitesAnd 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

author: MarkMLl
author_rank: Frequent Contributor
timestamp: December 21, 2021, 09:55:22 pm
content: Quote from: MIRKOSOFT on November 06, 2019, 02:08:53 amA very belated comment in case anybody is still interested in this.A project such ashttps://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 ashttps://www.jamieiles.com/80186/AKAhttps://github.com/jamieiles/80x86emulates 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 ashttps://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