{"id":18304466,"url":"https://github.com/spinalhdl/spinaltemplategradle","last_synced_at":"2025-04-12T15:12:39.657Z","repository":{"id":85972128,"uuid":"229156174","full_name":"SpinalHDL/SpinalTemplateGradle","owner":"SpinalHDL","description":"A basic SpinalHDL project, configured with Gradle instead of SBT","archived":false,"fork":false,"pushed_at":"2023-07-05T09:58:31.000Z","size":102,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T15:12:35.344Z","etag":null,"topics":["spinalhdl"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/SpinalHDL.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-12-19T23:40:52.000Z","updated_at":"2024-10-11T08:46:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"2050726f-41c1-46d3-a00d-dbf35427fb37","html_url":"https://github.com/SpinalHDL/SpinalTemplateGradle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpinalHDL%2FSpinalTemplateGradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpinalHDL%2FSpinalTemplateGradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpinalHDL%2FSpinalTemplateGradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpinalHDL%2FSpinalTemplateGradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpinalHDL","download_url":"https://codeload.github.com/SpinalHDL/SpinalTemplateGradle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586245,"owners_count":21128998,"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":["spinalhdl"],"created_at":"2024-11-05T15:29:01.046Z","updated_at":"2025-04-12T15:12:39.629Z","avatar_url":"https://github.com/SpinalHDL.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"Spinal Base Project\n============\nThis repository is a base Gradle project added to help people that prefer Gradle over SBT getting started.\n\nJust one important note, you need a java JDK \u003e= 8\n\n## Quick start\n\nIf you already have all the necessary tools installed, clone this repository and run Gradle:\n\n```sh\ngit clone https://github.com/SpinalHDL/SpinalTemplateSbt.git\ncd SpinalTemplateSbt\n\n# If you want to generate the Verilog of your design\n./gradlew runVerilog\n\n# If you want to generate the VHDL of your design\n./gradlew runVhdl\n\n# If you want to run the scala written testbench\n./gradlew runSimulation\n```\n\nYou'll see the synthesized HDL code in the project's root directory. The simulation output will be written to `./simWorkspace`.\n\nThe top level spinal code is defined in `./src/main/scala/mylib`.\n\n## Basics, without any IDE\n\nYou don't really need to install Gradle. The executable in the project, `./gradlew` (or `./gradlew.bat`), will download and run the correct Gradle version for you.\n\nIf you want to run the scala written testbench, you have to be on linux and have Verilator installed (a recent version).\n\nOn Debian:\n\n```sh\nsudo apt-get install git make autoconf g++ flex bison -y  # First time prerequisites\ngit clone http://git.veripool.org/git/verilator   # Only first time\nunsetenv VERILATOR_ROOT  # For csh; ignore error if on bash\nunset VERILATOR_ROOT  # For bash\ncd verilator\ngit pull        # Make sure we're up-to-date\ngit checkout verilator_3_916\nautoconf        # Create ./configure script\n./configure\nmake -j$(nproc)\nsudo make install\ncd ..\necho \"DONE\"\n```\n\nOn Arch Linux:\n\n```sh\nsudo pacman -S verilator\n```\n\n## Work in IntelliJ IDEA\n\nThis project already contains the Gradle idea plugin. With the `idea` task (`./gradlew idea`), it will generate all files so that you can import this as project in in IntelliJ (`File` – `Open Project`, see [the documentation](https://docs.gradle.org/current/userguide/idea_plugin.html) for more details.\n\n## Work with Eclipse\n\nFirst, you need to add the [scala plugin](https://scala-ide.org/) to Eclipse (click on the link or simply search the Marketplace). \n\nThis project already contains the Gradle eclipse plugin. With the `eclipse` task (`./gradlew eclipse`), it will generate all files so that you can import this as an existing project in in Eclipse (`File` – `Import…` … `Existing Projects into Workspace`, see [the documentation](https://docs.gradle.org/current/userguide/eclipse_plugin.html) for more details.\n\nIn Eclipse, there is also the possibility to install [Buildship, the Gradle plugin for Eclipse](https://projects.eclipse.org/projects/tools.buildship) (not to confuse with the Eclipse plugin for Gradle as above), that allows a more straightforward Gradle-Eclipse integration.\n\n## A word about main methods\n\nIn SBT, you run the task `runMain MyClassName` to run the main method you want. One of the few downsides of Gradle is that it is built around the concept of having one main class per project. The solution to this is to define custom tasks, one for each main method to run, in the `build.gradle`:\n\n```Groovy\ntask myRunTaskName(type: JavaExec) {\n    classpath = sourceSets.main.runtimeClasspath\n    main = \"mypackage.MyMainClassName\"\n}\n```\n\nThen, type `./gradlew myRunTaskName` to run it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinalhdl%2Fspinaltemplategradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspinalhdl%2Fspinaltemplategradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinalhdl%2Fspinaltemplategradle/lists"}