Settings & Buttons

Adding Files

EDA Playground supports multiple files, up to a total character limit of 1,000,000. The files may be HDL source files, or text files to be used as inputs to the testbench.

_images/add_tab.png

To add a file, click the + sign in the testbench or design pane. Then create a new file or upload an existing file. The filename may not contain special characters.

Simulating code with multiple files

  • For SystemVerilog, use include statements such as the following to include the added source files in the compile:

    `include "adpcm_seq_item.svh"
    
  • For VHDL, all files with the .vhd and .vhdl extensions are automatically included in the compile.

  • For Python, use import statements:

    from design import *
    

To rename a file, double click the tab name. (The initial testbench and design files cannot be renamed.)

Share Tab

You can add a name and description for your playground using the share tab (which can be found in the bottom pane).

A brief name/title of the playground. Visible by others when they open a saved playground.

A longer description of the playground. Visible by others when they open a saved playground. You can format your text using Markdown.

You can control the visibility of your playground by selecting one of three options:

  • Private (only your can view)

  • Public (anyone with the link can view)

  • Published (will appear in search results)

Examples

Links to code examples created on EDA Playground. These generate a search of the EDA Playground database.

Editor Modes and Shortcuts

The editor supports the following modes:

  • Default

  • Vim

  • Emacs

The user may select the mode in the User Options on the user page:

_images/editorMode.png

Note that Vim and Emacs modes are only loose approximations of the actual bindings.

Default Mode

The default mode comes with search/replace functionality. The keybindings are:

  • Ctrl-F / Cmd-F - Start searching

  • Ctrl-G / Cmd-G - Find next

  • Shift-Ctrl-G / Shift-Cmd-G - Find previous

  • Shift-Ctrl-F / Cmd-Option-F - Replace

  • Shift-Ctrl-R / Shift-Cmd-Option-F - Replace all

The default mode uses the following shortcuts. Note that the shortcuts are different for PC and MAC users.

// For All
keyMap.basic = {
  "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
  "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
  "Delete": "delCharAfter", "Backspace": "delCharBefore", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
  "Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
};

// For PC
keyMap.pcDefault = {
  "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
  "Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd",
  "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
  "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-F": "find",
  "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev",
  "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
  fallthrough: "basic"
};

// For MAC
keyMap.macDefault = {
  "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
  "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
  "Alt-Right": "goGroupRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delGroupBefore",
  "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-F": "find",
  "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev",
  "Cmd-[": "indentLess", "Cmd-]": "indentMore",
  fallthrough: ["basic", "emacsy"]
};
keyMap.emacsy = {
  "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
  "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
  "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
  "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
};

Buttons

Run

Shortcut: Ctrl+Enter

Run the current code using the selected tool/simulator and options. The code runs on the EDA Playground server and the results are printed in the bottom Results pane.

Save

Shortcut: Ctrl+S

Save the current playground, including code, bottom 200 lines of results, and options. Once the playground is saved, the page reloads. The location specified in the address bar is a static link to this playground – this link can be shared with others.

If the playground has been saved previously, clicking on Save updates the currently saved playground. The static link does not change.

If you modified a code example but did not save, you’ll see an asterisk in the Save button.

Copy

This button shows up for everyone when viewing a saved playground. Clicking on it creates a new copy of the current playground. The copy will be complitely separate from the original, and it will have its own link that can be shared with others.

If you modified a code example but did not save, you’ll see an asterisk in the Copy button.

?

Links to EDA Playground documentation (these pages).

Flask

Shows links to other apps available on EDA Playground, such as EPWave.

Playgrounds

Gives access to your and others’ playgrounds. You can either browse or search.

Log In / Profile

The user must be logged in to save or run playground code. Playground code and results may be viewed without logging in. If this button says “Log in” then click it to log in.

If this button says “Profile”, then you can click it to access your profile and your settings or to log out.

Log In

The user must be logged in to save or run playground code. Playground code and results may be viewed without logging in.

Collaborate

Allows real-time collaborations where multiple users can edit code simultaneously.

Real-Time Collaboration Intro on YouTube.

Forum

A short cut to the EDA Playground Forum.

Follow @edaplayground

Click to follow EDA Playground on Twitter.