Blog

  • Bigger CPU: Simulation Phase

    This Is A Bit Less Easy.

    Smaller CPU designs are fairly easy to work with and will work on convenient FPGA boards.

    Larger designs have proven a pain to get working on FPGAs. There are a lot of issues with larger FPGAs to the extent that I’d recommend starting CPU development on an underpowered one.

    Issues with running designs on larger FPGAs include:

    • Harder to get the tools working, will need to create accounts on very broken vendor websites to access downloads
    • Documentation is fucked, I don’t know who they expect to be buying these things but printing a pinout with the boards would be fucking nice
    • Examples that don’t work, tools that give warnings when you do things the example way, a weird sensation like the vendor didn’t actually want to sell you this product…

    I won’t point out any specific vendors but basically they are all a bit shit (although their support teams can be helpful!), unless you buy the cheap models that are easy to program from a Linux terminal. With those you’re just a bit limited in the size of the design, they will only fit a simple CPU.

    It Works In Simulation

    It’s been easier to get features working in simulation though, so in a Verilog simulator my new design has the following features:

    • Modern 64-bit RISC architecture
    • 5-stage or (experimental) 6-stage pipeline
    • Extremely efficient hardware threads implementation, designed for configurations with 4 threads per core
    • Alternative optimisations for efficient/fast single-threaded implementations
    • Very suitable for real-time device control or for further extension as server CPUs
    • Based on a simpler MIT-licensed design, allowing for relatively easy commercial or open source licensing

    Long Way To Go…

    The current design looks and feels really solid, in simulation… There is no guarantee that it will ever work in hardware, maybe I will have to go back to the drawing board eventually but until then I’m working around the clock to make this design work.

    There’s a chance that it will just work effortlessly in FPGA & in silicon once I figure out one more bug or get one more FPGA board working, but realistically it’ll take quite a lot more optimisation to get it fine tuned and also to add all the extensions developers would want.

    Full Announcement Forthcoming

    So I don’t know if this all is going to work right yet, I will reserve more detailed announcements until later.

    If my new design does work this will probably become the basis for testing & deploying my OS code, otherwise the backup plan is I’ll probably scale back a little on my hardware designs and offer software/configuration support for existing designs instead (this will probably mean some less aggressive open source CPU forks). But for now of course I’ll continue working on bringing up this design on FPGA, which should work if I spend enough time isolating & testing each behaviour (my current testbench is just a bit of a mess).

    So something will be coming either way, but for now I’m slowly progressing on the larger model which should perform quite well on large FPGAs if I can iron out the remaining bugs. This won’t be completely full-featured at first but should provide a good basis for extension.

  • New Hardware Designs Imminent

    Work on a larger CPU family utilising both new and legacy designs is underway. Proper announcements will follow.

  • Brutal Progress

    The 210 Works On More FPGAs

    The latest configuration has been tested on GateMate FPGAs and results in working builds (as determined by running a simple “flashing LEDs” program). This means that Gowin and GateMate are now supported targets, although it’ll take me a little while to clean up & extend the builds.

    Higher-End Models Underway

    I should have some faster base models uploaded soon based on third-party open source projects. So these initial models will represent much less engineering effort at my end but will hopefully form the basis of a stable processor lineup: hardened & supported versions of existing designs.

    This currently involves experimenting with two different open-source designs, and provided that the basics eventually work I should be able to start uploading my changes soon.

    Note that model numbers will not indicate newness but should roughly correspond to size of the design, and that the level of support I can offer won’t be exactly the same for each model (although at least some of my compilers will be portable to each).

    Having To Think About Version Control…

    I may just go back to using git as this seems easier for browsing projects & READMEs online, or I may release more over SVN as this is very convenient from my end.

  • Current & Next FPGA CPU Models

    Features Of The 210

    • Builds on my gen1cpu and the “200 Series” (gen2cpu) branch with improved cross-compatibility between configurations
    • Native code built for either the 32-bit or 64-bit configuration can launch correctly on the opposite configuration
    • This does not include full maths compatibility and compatibility between all extra features, only basic ISA & function call ABI cross-compatibility
    • Maths still happens in 32-bit mode on 32-bit cores and 64-mode on 64-bit cores, but whether the extended bits are available can be easily detected in code
    • These features are not properly tested in this version, and should be considered experimental for now

    Possible Features (~220)

    • Improved testing & FPGA support
    • Will hopefully be tested & working on more different FPGA devices
    • More/easier/faster memory access on common FPGA models, hopefully
    • Possibly more I/O
    • Huge overhaul of RISC Emulation
    • This could include limited support for instruction sets of planned secondary processor lines
  • Possible Range Of CPUs for FPGA

    Model Numbers <100

    These will be extra lightweight models designed to fit on practically any FPGA (a few thousand LUTs?) but may not offer modern CPU functionality (e.g. may be 16-bit designs).

    Models ≥100 and <1000

    These will be the primary models designed for beginner FPGA users (i.e. the range surrounding the current 200/210 model).

    These will be 32-bit and 64-bit models targeted at the best FPGAs for beginners, and will need at least around 10,000 LUTs depending on model or configuration.

    Models ≥1000

    These will be the high-performance and/or legacy-compatible models, which will probably mostly be based on existing open source projects.

  • SecureLang® 210: Improved 32-/64-bit CPU

    Following the first release of my second-generation processor architecture I’ve got a new update improving software cross-compatibility between 32-bit and 64-bit configurations.

    This works by providing multiple instructions for reading/writing 32-bit chunks of data which can be ignored or interpreted differently when run on different processor configurations, allowing programs optimised for either target to launch smoothly and detect the environment when run on either a 32-bit or 64-bit core.

    Although other features necessary for a viable CPU are still in progress, I hope to continue improving the core architecture and amplify key features like this which each update!

    This update is in the final stages now and only represents a minor mechanical change with minimal testing but hopefully will be a major improvement to cross-compatibility between future models.

  • SecureLang® 200

    Brief Announcement

    I’ve released a second-generation version of my processor core, this has some advanced CPU-like features but is suited for use with FPGA technology as a microcontroller.

    After rigorous improvements still following from my original design, this version is now beginning to work in a more robust way and is now tested using compiled program code (the design is now stable enough to run loops & function calls).

    Introductory Branding

    The processor architecture will for now be referred to as the SecureLang® 200 or The SecureLang® 200 Series Microcontroller Architecture, in reference to each current version being a revision of the second generation processor design.

    The current revisions may be called 204, 205, 206 and so on until a new major iteration, while some early documentation may refer to the architecture as 232 or 264 based on bit width.

    The repository names are gen1cpu for the original (first-generation) version which can be found in a probably-broken form on GitHub and gen2cpu for the current 200 Series which is released over subversion. Open-source forks can use the genNcpu naming to refer to their or my freely available versions if they prefer to avoid any commercial branding.

    Software Still In Progress

    Only my Pascal-like subsystem fully supports the new CPU architecture at present, announcements about the operating system in general will treat it as a separate product for now.

    Base Version Will Remain Free

    The initial version of my processor design was made available freely and this will continue to apply to basic versions of the design.

    Hardware Out Now (Only Catch Is…)

    The latest versions of the design have already been released, current public releases are made over Subversion to see if this convenient:

    https://svn.riouxsvn.com/gen2cpu/

    The only catch is that this (second) version is still a very early test design which is only suited for use using FPGA devices or simulators. As such this version still has somewhat limited performance, but otherwise should be near to being a stable product.

    For now this means you will need a SiPEED Tang Nano 20K device or comparable/better FPGA device and/or a laptop to test the design.

    Hardware Specs

    • Developed in Verilog for easy use on FPGAs
    • Low footprint, requires <10,000 LUTs
    • Supported by efficient, in-house compiler technology
    • Available in both 32-bit and 64-bit configurations
    • Optional management & emulation features
    • Custom instruction set allowing up to 256 registers
    • Limited but reasonable runtime performance (no advanced pipelining or caching features)
  • Hardware Announcements Will Follow

    I’ve been working these CPUs a little hard, some big little things are coming to replace them.

  • Fonts, Hardware Work

    The basic version of my font package is kind of finished, I have to restrain myself from tweaking the fonts too much but for now it’s a huge improvement over just having the legacy bitmap font.

    In other news I’ve decided it’s probably easier to build my own hardware than to write drivers for everybody else’s so I’ll be adding some more FPGAs to my workflow but that may be pretty gradual before I get new tech working.

  • More Screenshots Soon!

    Work is underway on theming and font support, in a few days I should have some more styles to show off!