Skip to content

Latest commit

 

History

History
64 lines (53 loc) · 3.74 KB

File metadata and controls

64 lines (53 loc) · 3.74 KB

Setup

HDL Core Setup

These are the instructions to set up the HDL core, both for command-line compilation as well as using the IDE (requires additional setup in the next section). Runs natively on Windows, Linux, and Mac.

  1. Make sure you are using Python 3.9 (or later).

  2. If you do not have a Java JDK installed, download and install one. An open-source one is Eclipse Temurin. Java 11 (or later) is required.

    Determining Java version

    This is probably not necessary unless you suspect you're running an outdated Java version, most will probably have Java 11+ installed.

    On the command line, run java --version. If Java is installed, you'll get something like:

    openjdk 17.0.4.1 2022-08-12
    OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1)
    OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode, sharing)
    

    The above is an example of a JDK at Java 17. Version reporting formats are not standardized, for example Oracle's Java 8 may report as Oracle Corporation Java 1.8.0_351.

  3. Install the Python package using the package manager:
    pip install edg

IDE Setup

An IDE is available as a PyCharm plugin. It only sees basic maintenance but still works. It currently must be built and run from source, but as a Scala / sbt project with fully managed dependencies, this should be pretty straightforward.

Over the basic Python command-line interface, the IDE provides block diagram visualization, block compilation caching, and an experimental mixed graphical + textual editing interface for the HDL.

  1. Download sbt, the Scala build tool.

  2. Download or clone the IDE plugin sources from https://github.com/BerkeleyHCI/edg-ide.

    • If using command line git: make sure to initialize submodules: git submodule update --init --recursive.
    • If using GitHub Desktop: it should automatically clone submodules for you.
  3. In the edg-ide directory, run sbt runIDE. sbt will automatically fetch dependencies, compile the plugin, and start the IDE with the plugin enabled.

    • The first run may take a while.
    Resolving common errors
    • If you get an error along the lines of
      sbt.librarymanagement.ResolveException: Error downloading edgcompiler:edgcompiler_2.13:0.1.0-SNAPSHOT
      or not found: [...]/edgcompiler/edgcompiler_2.13/0.1.0-SNAPSHOT/edgcompiler_2.13-0.1.0-SNAPSHOT.pom,
      this is because the PolymorphicBlocks submodule hasn't been cloned. See the section above for instructions. The IDE plugin includes the HDL compiler as part of its build and requires the PolymorphicBlocks codebase.
    • If you get an error along the lines of [error] ...: value strip is not a member of String, this is because your Java version is pre-11. See the section above for instructions to install a more recent JDK.
  4. Within the IDE, create a new Python project.

    • The location can be anywhere.
    • The default environment type of Virtualenv is fine.
    • Make sure to check "inherit global site-packages", so that the pip-installed package will be visible.
  5. You may need to disable slow operations assertion if you're getting a lot of "Slow operations are prohibited on EDT" errors.

    • Go to Tools > Internal Actions > Registry (or Ctrl+Shift+A), find the item idea.slow.operations.assertion, and untick it.
    • Background: more recent versions of PyCharm seem to be stricter and noisier about what can be called on the GUI (EDT) thread.