"""Study register file properities""" module( name = "regfilestudy", ) bazel_dep(name = "rules_jvm_external", version = "6.7") bazel_dep(name = "rules_java", version = "8.12.0") bazel_dep(name = "rules_cc", version = "0.1.1") ## Fix the compiler version and avoid any local compiler bazel_dep(name = "toolchains_llvm", version = "1.4.0") llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") llvm.toolchain( llvm_version = "20.1.0", ) use_repo(llvm, "llvm_toolchain") register_toolchains( "@llvm_toolchain//:all", ) bazel_dep( name = "rules_python", version = "1.3.0", # reduce namespace collisions by prefixing with regfilestudy repo_name = "regfilestudy_rules_python", ) python = use_extension("@regfilestudy_rules_python//python/extensions:python.bzl", "python") python.toolchain( ignore_root_user_error = True, python_version = "3.13", ) pip = use_extension("@regfilestudy_rules_python//python/extensions:pip.bzl", "pip") pip.parse( hub_name = "regfilestudy-pip", python_version = "3.13", requirements_lock = "//:requirements_lock.txt", ) use_repo(pip, "regfilestudy-pip") bazel_dep(name = "bazel-orfs") # To bump version, run: bazelisk run @bazel-orfs//:bump git_override( module_name = "bazel-orfs", commit = "a94bc4e8e7973750cf818a220fcb2c1e23042469", remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git", ) orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories") # To bump version, run: bazelisk run @bazel-orfs//:bump orfs.default( # Official image https://hub.docker.com/r/openroad/orfs/tags image = "docker.io/openroad/orfs:v3.0-3695-ga037c3d9", sha256 = "a1e32aa02774b817ccb66813bbf838a6b5174ee90bdfc1a42e7e288a2a6dc25f", ) use_repo(orfs, "com_github_nixos_patchelf_download") use_repo(orfs, "docker_orfs") SCALA_VERSION = "2.13.16" SCALA_VERSION_SHORT = SCALA_VERSION.rpartition(".")[0] CIRCE_VERSION = "0.14.13" MAVEN_DEPS = { "org.apache.commons:commons-text": "1.12.0", "org.scala-lang:scala-compiler": SCALA_VERSION, "org.scala-lang:scala-library": SCALA_VERSION, "org.scala-lang:scala-reflect": SCALA_VERSION, } MAVEN_SHORT_DEPS = { "com.github.scopt:scopt": "4.1.0", "com.lihaoyi:os-lib": "0.10.0", "com.lihaoyi:ujson": "4.1.0", "com.lihaoyi:upickle": "4.1.0", "io.circe:circe-core": CIRCE_VERSION, "io.circe:circe-generic": CIRCE_VERSION, #"io.circe:circe-generic-extras": CIRCE_VERSION, #"io.circe:circe-parser": CIRCE_VERSION, "io.circe:circe-yaml": "1.15.0", "org.json4s:json4s-native": "4.0.7", "org.chipsalliance:chisel": "7.0.0-RC4", "org.chipsalliance:firtool-resolver": "2.0.1", "org.scalatest:scalatest": "3.2.19", } MAVEN_LONG_DEPS = { "org.chipsalliance:chisel-plugin": "7.0.0-RC4", "org.scalameta:semanticdb-scalac": "4.13.6", } maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") maven.install( name = "maven", artifacts = ["{}_{}:{}".format(dep, SCALA_VERSION_SHORT, version) for (dep, version) in MAVEN_SHORT_DEPS.items()] + ["{}_{}:{}".format(dep, SCALA_VERSION, version) for (dep, version) in MAVEN_LONG_DEPS.items()] + ["{}:{}".format(dep, version) for (dep, version) in MAVEN_DEPS.items()], fetch_sources = True, lock_file = "//:maven_install.json", repositories = [ "https://repo1.maven.org/maven2", # fastest mirror, last I tried "https://s01.oss.sonatype.org/content/repositories/releases", "https://s01.oss.sonatype.org/content/repositories/snapshots", ], ) use_repo(maven, "maven") http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "circt", build_file_content = """ exports_files(glob(["bin/*"]), visibility = ["//visibility:public"]) """, sha256 = "44b03df50843ceb5f49ad0e6a84c382008e591361ec1dd4086ac8321877e401b", strip_prefix = "firtool-1.127.0", url = "https://github.com/llvm/circt/releases/download/firtool-1.127.0/circt-full-static-linux-x64.tar.gz", ) http_archive( name = "berkeley_hardfloat", build_file = "//multiplier:hardfloat.BUILD.bazel", sha256 = "84e09620e9fb902bc63dadd5c755562ce6fea9f18dad9bc52eb98a952aeefaa5", strip_prefix = "berkeley-hardfloat-109ac38f253184dbb67223cac0c3ae5408d82d7a", url = "https://github.com/Pinata-Consulting/berkeley-hardfloat/archive/109ac38f253184dbb67223cac0c3ae5408d82d7a.zip", ) http_archive( name = "xls", build_file_content = """ exports_files(glob(["*"]), visibility = ["//visibility:public"]) sh_binary( name = "ir_converter", srcs = ["ir_converter_main"], data = glob(["**"]), visibility = ["//visibility:public"], ) """, sha256 = "96962d3cc6673a35ee71d511bfc6306af1b7097231f3302c0113115d3c184081", strip_prefix = "xls-v0.0.0-8685-g7540f6e14-linux-x64", url = "https://github.com/google/xls/releases/download/v0.0.0-8685-g7540f6e14/xls-v0.0.0-8685-g7540f6e14-linux-x64.tar.gz", )