Other cores tutorial?

Time to talk about what other machines can run on the Next hardware!
User avatar
Mousey
Posts: 35
Joined: Tue May 30, 2017 5:44 am

Other cores tutorial?

Postby Mousey » Mon Feb 03, 2020 11:16 am

Now the Next is about to ship (woo!) I have begun thinking a bit more about how I would use it. Ideally I would like it as my "go to" machine for (obviously) the Spectrum, but also other 8-bit computers, such as the C64 or Amstrad.

However, I am a bit clueless as to how I would go about that. I see the Next supports other cores, but can't seem to find any tutorial or guide on how to obtain and install said cores.

Could someone point me in the right direction of where to get / how to use another core? Or set my thinking straight if I've totally missed the point here. Thanks!

dave18
Posts: 186
Joined: Tue May 30, 2017 1:06 am
Location: Bristol, UK

Re: Other cores tutorial?

Postby dave18 » Mon Feb 03, 2020 12:18 pm

Quote from a thread in off topic. It looks like the multicore isn't yet finalised.
SevenFFF wrote:
Tue Jan 14, 2020 12:43 pm
Thanks, sounds great! The Next will support about thirty additional cores in the flash, with BiOS loader menus for them as well as the machine personalities in the main core.

It would be cool if you would look into porting your project to Spartan-6 SLX16 in the future, so everyone can check out your work. When the multicore support gets finalised there will be an example empty project with the Next pinout that you should be able to plug your implementation into.

Ped7g
Posts: 256
Joined: Mon Jul 16, 2018 7:11 pm

Re: Other cores tutorial?

Postby Ped7g » Mon Feb 03, 2020 12:52 pm

I know nothing about VHDL, but I have suspicion that when you are programming FPGA, you need to write it specifically for your HW schema, i.e. "TBBlue" board in this case. To access the SRAM memory, etc... which is probably on particular pins of FPGA.

I guess this can be reverse-engineered from the board schematics if you are expert-enough, but I guess most of the people will rather wait for the Next core being public (the VHDL source), so they can simply read the constants and mechanics from the Next source.

And I think other cores from other boards/FPGAs will need some adaptation to work with Next board, it's not like every board is binary-compatible with any other board firmware, I would expect it to be quite the opposite, I'm sometimes even surprised by the speed how certain people can incorporate features from other FPGA sources into their own projects, it's maybe not as difficult as I think, but I don't think it's simple copy+paste, I believe you have to manually modify the source to fit your new board.

So... I guess there are no "other" cores yet done, because the Next team is focusing on Next, and nobody outside the Next team had the VHDL sources to learn how to write new cores for Next board.

As the Next core will become public soon (if not already), I would expect many more people to try to create new core for Next in following months/year.

dave18
Posts: 186
Joined: Tue May 30, 2017 1:06 am
Location: Bristol, UK

Re: Other cores tutorial?

Postby dave18 » Mon Feb 03, 2020 3:47 pm

Most modules, either VHDL or Verilog, will have a top level that has the relevant inputs and outputs so they are relatively straight forward to plug into your internal FPGA design as long as you have the proper interface logic. Eg, it takes a matter of minutes to swap out a A-Z80 CPU core for a T80 core. The main things that need adapting are the interfaces with external hardware, especially if RAM has differing address or data bus sizes, and you may have to adjust timings if the hardware offers different constraints which in turn can break other things as pretty much everything in FPGA design is driven by clock cycles, you can't just sit and wait for code to complete like you can in software.

User avatar
Mousey
Posts: 35
Joined: Tue May 30, 2017 5:44 am

Re: Other cores tutorial?

Postby Mousey » Mon Feb 03, 2020 3:58 pm

Ah ok, thanks guys. I suspected that maybe this was the case, but it was hard to find a definitive answer. It'll be great to see other cores developed once the cased Next is in the hands of the masses.

Alcoholics Anonymous
Posts: 775
Joined: Mon May 29, 2017 7:00 pm

Re: Other cores tutorial?

Postby Alcoholics Anonymous » Mon Feb 03, 2020 4:07 pm

The multiple cores thing will be coming but it is not complete yet. As mentioned there is space for 32 cores in the fpga's flash and two slots are taken by the zx next itself. At the moment slot 3 can be used for development and can be started from basic after the next is booted. But the firmware has to be rewritten to make an interface to boot from those other slots and to initialize anything for those cores.

The zx next vhdl is going to be opened very soon.. we're just going through the licenses and adding a little documentation.

User avatar
lgb
Posts: 16
Joined: Mon May 29, 2017 9:59 pm

Re: Other cores tutorial?

Postby lgb » Sat Feb 15, 2020 11:04 am

I'm excited :D Though I'm far from being a VHDL expert (in fact a beginner) with using t80 core from opencores.org I could implement a rudimentary "version" of a Z80 based Hungarian computer (Primo) on the Digilent Nexys4 FPGA board (though with only VGA output and PS/2 keyboard input and only using block-ram of the FPGA ...). Of course, that's different what Spectrum Next uses, but still, it seems than it would be relative "easy" to create relative simple cores to start to learn things and create new cores, as far as I can imagine at least ... I'm kinda interested about my other favourite Z80 based computer, Enterprise-128.

User avatar
Timbucus
Posts: 286
Joined: Tue May 30, 2017 7:43 pm

Re: Other cores tutorial?

Postby Timbucus » Sat Feb 15, 2020 4:30 pm

lgb Sounds good keep us updated - I partly backed the Next as a cheaper way to have a nicely cased unit that could be used multicore eventually!
I'm Infinite Imaginations when not in work... PAWS for thought.

User avatar
lgb
Posts: 16
Joined: Mon May 29, 2017 9:59 pm

Re: Other cores tutorial?

Postby lgb » Sat Feb 22, 2020 9:16 pm

Guys, can anyone know/suggest a FAST method to try a new core? I mean it's kinda slow to always take out the SD-card from Next, put the core itself on it, put back to next etc. I have an FPGA development board, there it's very easy to hook it up onto a PC so I can "push" the bitstream generated by Xilinx ISE for example and that's all. No files need to be copied, SD card put in / back etc. Yes, I aware, that Next is not an FPGA board exactly :) Just I have the hope that is some kind of possibility like this ... In case of developing a new core and testing it, maybe you need to do this VERY often ... That's why for this purpose, alternative ways are handy or often just the only "acceptable" choice within some sane limits ;)

User avatar
SevenFFF
Posts: 565
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Other cores tutorial?

Postby SevenFFF » Sat Feb 22, 2020 10:01 pm

You can solder a JTAG header and push it straight from iMPACT as the main core. It’s not really ideal, and definitely NOT recommended for end users.

But it is fast and easy, and ok provided you understand the Xilinx tools and take responsibility for anything you might do. If you already do this on your dev board then the procedure is the same. As long as you never overwrite the AB core (!!!!!!!) in the flash then you can always do an AB boot and use that to restore the official Next core.

Image

Until we get a multicore boot menu, the official way to run alt cores is to rename the .bit file to core001.bit, and follow the instructions here to update and boot it. You can automate some of this with a NextZXOS autoexec.bas that does the OUT 9275,16: OUT 9531,255 or REG 16, 255. The official procedure, even when we have a more comprehensive boot menu, is always going to involve a separate update step.

If removing the SD card is the main source of friction, it's worth investing in a Toshiba FlashAir wifi SD card. These let you mount the SD card as a network drive on the PC using WebDAV, and make it straightforward to copy a smallish file like a .tbu or .bit to the correct location using a build script or manually.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins


Who is online

Users browsing this forum: No registered users and 1 guest