{"id":18513562,"url":"https://github.com/marko19907/low-level-programming-labs","last_synced_at":"2025-10-16T19:24:54.382Z","repository":{"id":215787296,"uuid":"739576680","full_name":"Marko19907/Low-level-programming-labs","owner":"Marko19907","description":"Low-level programming assignments, \"Low-Level Programming\" (TDT4258) course, fall 2023.","archived":false,"fork":false,"pushed_at":"2024-01-05T22:54:46.000Z","size":580,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T03:30:24.658Z","etag":null,"topics":["armv7","assembly","c","cache-simulator","cpu-cache","cpu-simulator","cpulator","direct-mapped-cache","linux","low-level-programming","palindrome-checker","unified-cache"],"latest_commit_sha":null,"homepage":"","language":"Assembly","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/Marko19907.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":"2024-01-05T22:53:38.000Z","updated_at":"2024-01-06T13:23:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"194b9ad8-722d-408e-be22-65dfc87ae2de","html_url":"https://github.com/Marko19907/Low-level-programming-labs","commit_stats":null,"previous_names":["marko19907/low-level-programming-labs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2FLow-level-programming-labs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2FLow-level-programming-labs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2FLow-level-programming-labs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marko19907%2FLow-level-programming-labs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marko19907","download_url":"https://codeload.github.com/Marko19907/Low-level-programming-labs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254142599,"owners_count":22021566,"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":["armv7","assembly","c","cache-simulator","cpu-cache","cpu-simulator","cpulator","direct-mapped-cache","linux","low-level-programming","palindrome-checker","unified-cache"],"created_at":"2024-11-06T15:39:16.370Z","updated_at":"2025-10-16T19:24:49.350Z","avatar_url":"https://github.com/Marko19907.png","language":"Assembly","readme":"# Low-Level Programming labs\n\nThis repository contains all the labs for the low-level programming course at NTNU (TDT4258). \n\n## [Lab 1: Assembly programming](/lab_1)\n\n* [x] Create a palindrome checker in assembly.\n* [x] Use the ARMv7 ISA and [CPUlator](https://cpulator.01xz.net/?sys=arm-de1soc) to run the program.\n* [x] Must be case insensitive and ignore spaces.\n  * [x]  A valid palindrome can only be a single word, sentence (words separated  by spaces), numbers, or alphanumeric.\n  Examples of valid palindromes: “level”, “8448”, “step on no pets”, “My gym”, “Was it a car or a cat  I saw”.\n  Examples of strings that are not a palindrome: “Palindrome”,  “First level”\n* [x] The shortest palindrome is at least 2 characters long.\n* [x] The valid characters are as follows: ‘a-z’, ‘A-Z’, ‘0-9’ and ‘ ’ (space).\n  Special characters will not be used in test inputs.\n* [x] Implement the algorithm in a high-level language (C, Rust, or Python) as you would write assembly code to get the correct control flow.\n  * [x] Written in Rust and available [here](/lab_1/src/bin).\n* [x] The program will display the output in two different ways:\n  * [x] **Light up the red LEDs**: If the output is not a palindrome, light up the five leftmost LEDs. If the output is a palindrome, light up the five rightmost LEDs.\n  * [x] **Write to the JTAG UART**: If the output is not a palindrome, write “Not a palindrome” to the JTAG UART. If the output is a palindrome, write “Palindrome detected” to the JTAG UART box.\n* [x] This lab includes an optional task: **Write numbers 0 to 100 to the JTAG UART box**. \n\n## [Lab 2: CPU cache simulator](/lab_2)\n* [x] Implement a CPU cache simulator in C with the following requirements:\n* [x] The simulator should be able to simulate a direct-mapped cache and a fully associative cache.\n* [x] The simulator should support both unified and split caches.\n  * [x] Unified caches have a single cache for both instructions and data (Von Neumann architecture) while split caches have separate caches for instructions and data (Harvard architecture).\n* [x] Fixed parameters:\n  * [x] 32-bit address space\n  * [x] 64-byte cache line size\n  * [x] FIFO replacement policy for the associative caches\n* [x] Variable parameters:\n  * [x] Cache size in bytes or kilobytes and only accepting powers of two between 128 bytes and 4096 bytes\n  * [x] Cache mapping, direct-mapped or fully associative\n  * [x] Cache organization, unified or split\n* [x] Expected results:\n  * [x] The simulator should output:\n    * [x] The number of accesses to the cache\n    * [x] The number of cache hits\n    * [x] The hit rate\n    * [x] Any other information you find relevant\n* [x] Trace files:\n  * [x] Memory trace `mem_trace.txt` files are provided in the lab repository.\n    * These will be used to test the simulator.\n    * The trace files contain a sequence of memory accesses, one per line.\n    * Each line contains a 32-bit hexadecimal memory address and a single character indicating the type of access, either `I` for instruction or `D` for data.\n* [x] Must be able to run on Linux.\n\n## [Lab 3: Tetris on a Raspberry Pi in C](https://github.com/Marko19907/Raspberry-Pi-Tetris)\n\nExtracted to [this repository](https://github.com/Marko19907/Raspberry-Pi-Tetris) since it was a big project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarko19907%2Flow-level-programming-labs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarko19907%2Flow-level-programming-labs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarko19907%2Flow-level-programming-labs/lists"}