在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jes/scamp-cpu开源软件地址:https://github.com/jes/scamp-cpu开源编程语言:Slash 53.8%开源软件介绍:SCAMP CPUSCAMP is my homebrew 16-bit CPU. It stands for something like "Simple Computing and Arithmetic Microcoded Processor". The CPU is very primitive. It doesn't support interrupts, and has no MMU, and no concept of privilege levels. It currently runs at 1 MHz, above that the CompactFlash interface falls over. It runs a homebrew operating system, with a homebrew programming language and compiler, and can self-host the kernel and all of the system utilities. The environment tastes a bit like an early Unix, but works like CP/M. I plan to use the computer to complete as much as possible of this year's Advent of Code. I have some blog posts here: https://incoherency.co.uk/blog/tags/cpu.html and a web-based emulator available here: https://incoherency.co.uk/scamp/ My Advent of Code solutions are here: https://github.com/jes/aoc2021 Here are some pictures: Here's a sample session in the emulator recorded with And here's a video with some explanation and an example session on real hardware: The story so farThis is what I've already done:
Next stepsThe computer already works, and I suspect it will never be "finished", but some things I still want to work on are: Hardware
Low-level software
Other software
If you happen to want to work on any of the above, I'd be happy to help you! ArchitectureIt is a 16-bit CPU. The bus is 16-bit, registers are 16-bit, addresses are 16-bit, and memory contents are 16-bit. The upper 8 bits of an instruction select the opcode, and the lower 8 bits are available for small immediate values. There is no support for: cache, interrupts, virtual memory, DMA, privilege rings, floating point, and ~anything else that is not strictly necessary. Here is a diagram of the architecture: For more information, see doc/UCODE.md and doc/ISA.md. Try it outThe easiest way to try it out is to use the web-based emulator at https://incoherency.co.uk/scamp/ If you want to run it locally, first you'll need to build everything. Try Having built everything, you can go into
If you know how to use Unix you'll probably understand how to use it. If you know how to use CP/M you'll probably understand how it works. If you want, you can write SLANG programs using ResourcesI thoroughly recommend the Nand2Tetris course. https://nand2tetris.org/ If you want to do the exercises from Nand2Tetris without learning what a hardware-description language is, and without going through all the lectures, you can play https://nandgame.com/ Ben Eater's videos on 8-bit CPU design are excellent and heavily influenced the design of my CPU. I found the YouTube playlist for Nicolas Laurent's compiler class quite helpful in writing the parser for the compiler. The Build Your Own Text Editor is a fantastic tutorial that walks you through implementing antirez's kilo editor. Balazs Markus's 8250 UART example is helpful. Daniel Tufvesson has a post that is a good starting point for understanding the 8-bit CompactFlash interface. PickledDog has a description of an improvement to the RC2014 CompactFlash card that might be helpful. Also Bill Shen's comment on the RC2014 mailing list. Michał Cierniak has a good blog post about CompactFlash + 8255 interface card with lots of detail on how his CompactFlash interface works. James Sharman is building an interesting 8-bit pipelined CPU, and has good videos with lots of explanation on how it works. SCAMP is featured on the Homebrew CPU ring which also features many other interesting homebrew CPU designs. ContactYou can email me on [email protected] or read my blog: [https://incoherency.co.uk/]. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论