{"id":26269858,"url":"https://github.com/tvlad1234/toymcu","last_synced_at":"2026-04-08T14:32:07.909Z","repository":{"id":280285301,"uuid":"941513748","full_name":"tvlad1234/toymcu","owner":"tvlad1234","description":"Verilog implementation of a microcontroller, using the (extended) Princeton TOY ISA","archived":false,"fork":false,"pushed_at":"2025-03-30T10:49:30.000Z","size":123,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T11:28:30.113Z","etag":null,"topics":["assembler","assembly","fpga","microcontroller","princeton","risc","toy","verilog"],"latest_commit_sha":null,"homepage":"","language":"Verilog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tvlad1234.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-02T13:30:07.000Z","updated_at":"2025-03-30T10:49:33.000Z","dependencies_parsed_at":"2025-03-30T11:25:01.298Z","dependency_job_id":"02ccea0c-4406-45f4-ac96-d37c6f3808a2","html_url":"https://github.com/tvlad1234/toymcu","commit_stats":null,"previous_names":["tvlad1234/verilog_princeton_toy_plus","tvlad1234/toymcu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tvlad1234/toymcu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2Ftoymcu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2Ftoymcu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2Ftoymcu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2Ftoymcu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvlad1234","download_url":"https://codeload.github.com/tvlad1234/toymcu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2Ftoymcu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31559775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembler","assembly","fpga","microcontroller","princeton","risc","toy","verilog"],"created_at":"2025-03-14T05:16:15.634Z","updated_at":"2026-04-08T14:32:07.897Z","avatar_url":"https://github.com/tvlad1234.png","language":"Verilog","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toymcu\n\nThis repository contains the Verilog implementation of a microcontroller, based around a CPU core which uses an extension of the [Princeton TOY instruction set architecture](https://introcs.cs.princeton.edu/java/62toy/), as well as an assembler and example program.\n\n## How it came to be\nDuring my 2nd year of university, I studied the basics of digital hardware design, using VHDL. Out of personal curiosity and passion for the subject, I had the idea of implementing a small CPU design. While looking for possible instruction set architectures to use, I came across the TOY ISA, developed by Princeton University, to use in their Computer Science courses. I settled on it, considering its simplicity and the fact that nobody had (publically, at least) implemented it in hardware previously.\n\nDuring the 3rd year, I decided I wanted to improve my digital hardware design skills and learn Verilog. The [CPU core](hw/cpu) was my first Verilog design, having translated the older project from VHDL, while also making some [significant and useful modifications](docs/toy_improvements.md).\n\nAfter I was pleased with the state of the CPU core, I started to work on the [assembler](assembler/), in order to be able to write programs without having to type machine code by hand directly into memory. I also implemented the transmit part of a UART, at this point being able to output characters to a serial console.\n\nWith the CPU core and assembler mostly functional, I decided to implement more [peripherals](hw/peripherals/). I ended up implementing a full bidirectional UART, a timer, GPIO port and interrupt controller, basically turning the project into what can universally be considered a microcontroller.\n\n## Repository contents\n### Build system\nThis project uses makefiles and various open-source tools for its build system. The usage of this build system is described in [this file](docs/build_system.md).\n\n### Hardware design\nThe [hw](hw) folder contains the Verilog implementation of the toymcu, simulation testbench and a top-level design meant for the Colorlight 5A-75B V8.2 board.\n\n### Assembler\nThe [assembler](assembler/) folder contains the assembler for the toymcu. [This file](docs/assembler.md) explains the features and usage of the assembler.\n\n### Boot ROM and loader tool\nThe `toymcu` starts executing code from a ROM memory. This memory contains a [bootloader](program/bootrom/main.asm) which loads code into RAM, over the UART. Code is sent using the [loader](loader/) tool.\n\n### Example program\nThe [program/hello](program/hello) folder contains an example program for the toymcu, which showcases UART and GPIO output, as well as UART and timer interrupts. The program source is split across multiple assembly files\n\n## Documentation\n- [The build system](docs/build_system.md)\n- [Improvements made upon the original Princeton TOY ISA](docs/toy_improvements.md)\n- [The TOY ISA](docs/isa.md)\n- [The `toyasm` assembler](docs/assembler.md)\n- [Memory map](docs/memory_map.md)\n- Peripherals\n    - [Interrupt controller](docs/peripherals/interrupt_ctrl.md)\n    - [UART](docs/peripherals/uart.md)\n    - [Timer](docs/peripherals/timer.md)\n\n## To do\n- Documentation\n    - document GPIO peripheral\n- Implement GPIO interrupts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvlad1234%2Ftoymcu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvlad1234%2Ftoymcu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvlad1234%2Ftoymcu/lists"}