{"id":17328922,"url":"https://github.com/mmicko/fpga101-workshop","last_synced_at":"2025-04-14T17:30:29.484Z","repository":{"id":83593774,"uuid":"132482546","full_name":"mmicko/fpga101-workshop","owner":"mmicko","description":"FPGA 101 - Workshop materials","archived":false,"fork":false,"pushed_at":"2019-03-17T10:16:01.000Z","size":5469,"stargazers_count":67,"open_issues_count":0,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-16T23:11:30.507Z","etag":null,"topics":["apio","fpga","hackaday","icestorm","icestudio","micropython","riscv","verilog"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmicko.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}},"created_at":"2018-05-07T15:44:14.000Z","updated_at":"2023-11-10T10:17:13.000Z","dependencies_parsed_at":"2023-03-12T12:45:32.894Z","dependency_job_id":null,"html_url":"https://github.com/mmicko/fpga101-workshop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmicko%2Ffpga101-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmicko%2Ffpga101-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmicko%2Ffpga101-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmicko%2Ffpga101-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmicko","download_url":"https://codeload.github.com/mmicko/fpga101-workshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219843647,"owners_count":16556502,"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":["apio","fpga","hackaday","icestorm","icestudio","micropython","riscv","verilog"],"created_at":"2024-10-15T14:25:35.958Z","updated_at":"2024-10-15T14:25:36.567Z","avatar_url":"https://github.com/mmicko.png","language":"C","readme":"# FPGA 101 - Workshop materials\n\nThis repo contains all needed material for participation at FPGA 101 Workshop at Hackaday event in Belgrade 26th of May 2018.\n\n# For all environments\n\nYou probably already have a favorite text editor on your computer ready, but in case it does not \nhave Verilog language syntax hightlight, that could help you at least at start, install Visual Studio Code or\nAtom or any similar editor supporting it.\n\nFor Visual Studio Code use:\n\n```console\next install mshr-h.VerilogHDL\n```\nFor Atom use:\n\n```console\napm install language-verilog\n```\n\n# Linux Install\n\nFirst install required packages.\n\nFor Ubuntu use :\n```console\nsudo apt install python-pip make git gtkwave curl\n```\n\nAlso install Node.JS\n```console\ncurl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh\nsudo bash nodesource_setup.sh\nsudo apt-get install nodejs\n```\n\nDownload prepared package, and install APIO\n```console\ncd ~\n\nwget https://github.com/mmicko/fpga101-workshop/releases/download/tools/fpga101-linux-x64-tools.tar.gz\n\ntar xvfz fpga101-linux-x64-tools.tar.gz\n\ncd hackaday-fpga101\n\nsource fpga101.sh\n\ncd apio\n\nsudo pip install -e .\n```\n\nInstall needed Node.JS packages for IceStudio\n\n```console\ncd ../icestudio\nnpm install\n```\n\n# Windows Install\n\nDownload file from [this link](https://github.com/mmicko/fpga101-workshop/releases/download/tools/fpga101-windows-x64-tools.7z) first.\n\nUze 7zip (can be downloaded from [here](https://www.7-zip.org/download.html)) to unpack file (using right click -\u003e 7-Zip -\u003e Extract here )\n\nMove that folder to root of C drive (mandatory due to location being hardcoded in part of msys install)\n\nGo to c:\\msys64  and click ConEmu.exe to get console.\n\nYour profile will be generated and you will be greeted by next prompt.\n\n```console\n[HACKADAY] C:\\msys64\\src\u003e\n```\n\nIf you do not already have installed you favorite terminal console for serial access, please install [PuTTY](https://www.putty.org/) or similar.\nYou can even install it from command line by using:\n\n```console\npacman -S mingw-w64-x86_64-putty\n```\n\n# macOS Install\n\nFirst install Homebrew to be able to install rest of packages.\n\n```console\n/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n```\n\nThen you will be able to install Python 3, Node.JS and GTKWave\n```console\nbrew install python\nbrew install node\nbrew install wget\n\nbrew cask install gtkwave\n```\n\nDownload prepared package, and install APIO\n```console\ncd ~\n\nwget https://github.com/mmicko/fpga101-workshop/releases/download/tools/fpga101-darwin-x64-tools.tar.gz\n\ntar xvfz fpga101-darwin-x64-tools.tar.gz\n\ncd hackaday-fpga101\n\nsource fpga101.sh\n\ncd apio\n\nsudo pip3 install -e .\n```\n\nInstall needed Node.JS packages for IceStudio\n\n```console\ncd ../icestudio\nnpm install\n```\n\n# Workshop materials\n\nTo be able to test environment and to have starting point for workshop you also need to download this repository.\n\n```console\ngit clone https://github.com/mmicko/fpga101-workshop\n```\n\n**NOTE** In case you are getting error on git utility on Windows, first run msys but just leave it open at side, and try again in main window:\n```console\nc:\\msys64\\msys2.exe\n```\n\nIn examples down listed, assumption is that on Linux and macOS all is downloaded in user home folder, and on Windows in c:\\msys64\\src folder.\n\n# Testing\n\nFor Linux and macOS always make sure you have tools setup and initialized first.\n\n```console\nsource ~/hackaday-fpga101/fpga101.sh\n```\n\n## Testing APIO environment\n\nTo test if all is setup correctly.\n\n```console\n\ncd fpga101-workshop/tests/led\n\napio build\n\n```\nresponse should be\n\n```console\n\n[xxx xxx x hh:mm:ss yyyy] Processing fpga101\n--------------------------------------------------------------------------------\nyosys -p \"synth_ice40 -blif hardware.blif\" -q led.v\narachne-pnr -d 5k -P sg48 -p pinout.pcf -o hardware.asc -q hardware.blif\nicepack hardware.asc hardware.bin\n========================= [SUCCESS] Took 1.07 seconds =========================\n```\n\nTo check if GTKWave is installed fine use (on macOS it will be as separate application so we will use it manually)\n\n```console\napio sim\n```\nAnd that would open GTKWave with simulation file.\n\n## Testing Risc-V compiler\n\n```console\ncd ~\ncd fpga101-workshop/tests/riscv\nmake\n```\nresponse should be\n\n```console\nriscv64-unknown-elf-gcc -O3 -nostartfiles -mabi=ilp32 -march=rv32ic -Wl,-Bstatic,-T,sections.lds,--strip-debug -ffreestanding -o firmware.elf start.s sections.c firmware.c -lgcc\nriscv64-unknown-elf-objcopy  -O binary firmware.elf firmware.bin\n```\n\n## Testing IceStudio\n\nFor Linux and macOS:\n```console\ncd ~\ncd hackaday-fpga101/icestudio\nnpm start\n```\n\nFor Windows:\n```console\ncd \\msys64\\opt\\icestudio \nnpm start\n```\n\nShould start nw.js with IceStudio running.\n\n\n","funding_links":[],"categories":["UP5K"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmicko%2Ffpga101-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmicko%2Ffpga101-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmicko%2Ffpga101-workshop/lists"}