Practical computer design

Couple of months ago I ran into idea of modifing some existing old CPU into a multicore processor. The idea developed into building my own computer, with MPU, ethernet, wifi and LCD.  This blog series is intended to be a jottings of my work.

The idea is to create some simple system using some ready blocks, write some new ones, and glue it to create a standalone computer with operating system, capable of running standard applications, like pdf reader, image reader, web browser etc.

The main requirements include:

  • use of retro processor to create a multiprocessor unit
  • RS232 to communicate with the world in first stages
  • ethernet and (optionally) 802.11 to have a real use of the device
  • LCD to create a tablet
  • Linux or BSD operating system
  • System on Chip on a FPGA

All points are discussed in detail in further paragraphs.

Use of retro processor to create a multiprocessor unit

It is more fun to use some retro processor instead of modern one. What is the challenge of using quadcore cortex-a9 CPU with 1000MHz power? None! My very first idea was to design and develop multicore cpu from some old processor. This would allow me to focus on interesting aspects, instead of designing CPU itself.

Connecting couple of IP cores to create a System on Chip is quite simple (especially when they share the same bus system like wishbone), but creating a Symmetric Multiprocessor System out of a old CPU is much more difficult. Since you will have multiple masters on the shared bus, every core has to have its data and instruction cache. It also would be very nice, if NIC has its DMA engine to put frames to the memory, since our CPU will be slow, so there is another master. Moreover, decision of use Linux/BSD operating system force us to implement virtual memory. It will probably need adjustments in the core, if it does not support VM. If I manage to implement VM without adjusting the core, there is a chance to build a hardware version of the SoC, with original CPU IC and CPLD as cache and MMU.

There is couple of options, when deciding which old cpu to use. Both Motorola 68k series and Zilog z80 series are still quite popular. You can find many projects and papers regarding to this two. I will review available options in another post.

RS-232 to communicate with the world in first stages

I use RS-232 port every day at work to communicate with devices I’m developing software for. This is the easiest way to communicate the CPU with outer world. Couple of assembler instructions, and you have your putchar instruction.

LCD to create a tablet

This will be probably last thing to do. Connect LCD screen with touchscreen and run it under Linux, to create graphical interface for the user.

Ethernet and (optionally) 802.11 to have a real use of the device

Most of the usage of computers/tablets today is access to the Internet. I would be very nice to add Internet access to the device, via Ethernet interface of WiFi. In conjunction with modern operating systems, it might even display simple websites in graphical mode, instead of text mode (i.e. links).

 Linux or BSD operating system

The choice of operating system will be one of the most difficult. There is an implementation of uClinux for nommu m68k. With the MMU enabled version, I will have a lot of work in machine dependent code, to implement mmu operations.

System on Chip on a FPGA

I am planning of doing everything in Verilog. First simulate the code with iverilog and verilator. The implementation in chosen FPGA will be one of the last steps, so we don’t have to worry about it now.

Leave a Reply

Your email address will not be published. Required fields are marked *