{"id":17046438,"url":"https://github.com/cpldcpu/bitnetpdk","last_synced_at":"2025-04-12T15:30:44.487Z","repository":{"id":237810626,"uuid":"791497470","full_name":"cpldcpu/BitNetPDK","owner":"cpldcpu","description":"A proof-of-concept (hack) to implement neural network inference on a very tiny 8-bit microcontroller.","archived":false,"fork":false,"pushed_at":"2024-05-05T00:19:52.000Z","size":1438,"stargazers_count":68,"open_issues_count":1,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-26T10:04:03.297Z","etag":null,"topics":["free-pdk","padauk","pfs154","pms150c"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpldcpu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-04-24T20:32:58.000Z","updated_at":"2024-11-13T04:20:19.000Z","dependencies_parsed_at":"2024-05-03T08:03:07.026Z","dependency_job_id":"3ef3855c-29b9-4ec9-beec-d0eb15f6735c","html_url":"https://github.com/cpldcpu/BitNetPDK","commit_stats":null,"previous_names":["cpldcpu/bitnetpdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpldcpu%2FBitNetPDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpldcpu%2FBitNetPDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpldcpu%2FBitNetPDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpldcpu%2FBitNetPDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpldcpu","download_url":"https://codeload.github.com/cpldcpu/BitNetPDK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589269,"owners_count":21129578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["free-pdk","padauk","pfs154","pms150c"],"created_at":"2024-10-14T09:46:16.834Z","updated_at":"2025-04-12T15:30:43.797Z","avatar_url":"https://github.com/cpldcpu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# MNIST inference on the \"3 cent\" Microcontroller.\n\nThis project attempts to push [BitNetMCU](https://github.com/cpldcpu/BitNetMCU) to the absolute limit: Is it possible to implement reasonably accurate inference of MNIST, the handwritten numbers dataset, on a \"3 cent\" Microcontroller with only 64 bytes of RAM and 1K of instruction memory? \n\n![banner](docs/banner.png)\n\nOnly weeks ago, my resounding answer would have been: \"NO\". But after the surprisingly good performance of BitNetMCU, I decided to give it a try. \n\nThis code achieves 90.1% test accuracy on test images scaled to 8x8 pixels while consuming 59 of 64 bytes of RAM and 972 of 1024 words of program memory. [See blog](https://cpldcpu.wordpress.com/2024/05/02/machine-learning-mnist-inference-on-the-3-cent-microcontroller/) for a few more details. The training code can be found in [this branch](https://github.com/cpldcpu/BitNetMCU/tree/pdk) of BitNetMCU\n\n## Project structure\n\n```plaintext\n├── include/                    # Contains the free-pdk header files\n└── src/                \n    ├── BitNetMCU_model.h       # MNIST model definition \n    ├── main.c                  # Main source file\n    ├── Makefile\n    ├── PDK_softuart.c          # Software UART implementation\n    └── softuart.h              # Software UART header file\n```\n    \n## Building Instructions\n\n!!! **Use SDCC 4.1.0 to build. Later versions create broken code** !!!\n\nThis is a hack, don't expect it to be useful for anything. \n\nIf you still want to build the project, you need to have the [FreePDK toolchain](https://free-pdk.github.io/) installed. The default target is the PFS154, but you can change it to the PMS150C by editing the makefile. Currently, monitoring output is only supported with PFS154 as a target and the UART functions will not be included if PMS150C is selected.\n\n1. Navigate to the `src/` directory.\n2. Run `make flash` to build and flash the project\n3. `make start` to start the monitor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpldcpu%2Fbitnetpdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpldcpu%2Fbitnetpdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpldcpu%2Fbitnetpdk/lists"}