{"id":20962381,"url":"https://github.com/yasnakateb/trafficlightcontroller","last_synced_at":"2026-03-19T18:13:33.360Z","repository":{"id":131233416,"uuid":"201840622","full_name":"yasnakateb/TrafficLightController","owner":"yasnakateb","description":"🚦 A  digital controller to control traffic in Verilog HDL ","archived":false,"fork":false,"pushed_at":"2019-08-12T21:25:35.000Z","size":87,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-08T04:47:15.298Z","etag":null,"topics":["icarus-verilog","traffic-light-controller"],"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/yasnakateb.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":"2019-08-12T02:07:29.000Z","updated_at":"2025-05-21T20:56:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"34280407-fbf4-446a-b449-ac9fa94dbf7e","html_url":"https://github.com/yasnakateb/TrafficLightController","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yasnakateb/TrafficLightController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasnakateb%2FTrafficLightController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasnakateb%2FTrafficLightController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasnakateb%2FTrafficLightController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasnakateb%2FTrafficLightController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yasnakateb","download_url":"https://codeload.github.com/yasnakateb/TrafficLightController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yasnakateb%2FTrafficLightController/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29447276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T14:10:32.461Z","status":"ssl_error","status_checked_at":"2026-02-14T14:09:49.945Z","response_time":53,"last_error":"SSL_read: 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":["icarus-verilog","traffic-light-controller"],"created_at":"2024-11-19T02:32:55.703Z","updated_at":"2026-02-14T14:33:23.010Z","avatar_url":"https://github.com/yasnakateb.png","language":"Verilog","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traffic Light Controller\nThis project aims to design a digital controller to control traffic at an intersection.\nAt each intersection, there are four traffic lights in red, yellow and green, and \neight pedestrian lights in green and red, which naturally are the same for two-by-two vehicles \nand the four-by-four pedestrian lights also act the same.\n\n\n# Behavior\n\n1. The pedestrian light is red when the car light is green or yellow, and green when the car light is red.\n\n2. The traffic light is green for  15 seconds by default and yellow for 4 seconds. \nObviously, for the same cycle of the two sides, the red time of the cars is equal to the sum of the green and yellow.\n\n3. Police Interrupt Button: \nThis button is available for both directions on the street and by turning it on any side \nthat has the green light will change to yellow immediately.\n\n4. Pedestrian Interrupt Button: \nThis button is also present on each side of the street.If the pedestrian lights are green \nand the remaining time is less than 3 seconds to reset, turning on this button will return \nthis time to 3 seconds. Of course, pedestrians can only do this twice at a time.\n\n5. The status of all lights will be defined according to the interruptions that have occurred.\n\n6. Interrupts are synchronized with the clock.\n\n\n7. On each side of the street, smart cameras are installed that can measure the traffic on each side\nand give our control module a number. A low value indicates smoother traffic and higher value indicates heavier traffic. The intersection timetable changes based on two numbers, each corresponding to a street.\n\n\n8. We have a memory where the data from the cameras is stored.\n\nDependencies\n============\n## macOS\nThis project needs [Icarus-Verilog](http://iverilog.icarus.com) and a VCD viewer.\n\n## Building on macOS\n1. Icarus-Verilog can be installed via Homebrew :\n   \u003ccode\u003e$ brew install icarus-verilog\u003c/code\u003e\n2. Download [Scansion](http://www.logicpoet.com/scansion/) from here.  \n3. Clone the repository.\n4. Change the directory to src.\n3. \u003ccode\u003e$ make check\u003c/code\u003e- compiles the verilog design - good for checking code.\n4. \u003ccode\u003e$ make simulate\u003c/code\u003e - compiles design+TB \u0026 simulates the verilog design.\n5. \u003ccode\u003e$ make display\u003c/code\u003e - displays waveforms.\n\n![](ScreenShots/traffic.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyasnakateb%2Ftrafficlightcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyasnakateb%2Ftrafficlightcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyasnakateb%2Ftrafficlightcontroller/lists"}