Settings & Buttons

Adding Files

EDA Playground supports up to 10 files. 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.)

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

Log In

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

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.

Share

This button only shows up for saved playgrounds. It displays a modal pop-up with a static link to the current playground. Also, it displays buttons for sharing on Twitter, Facebook, or LinkedIn.

Collaborate

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

Real-Time Collaboration Intro on YouTube.

About

Links to EDA Playground documentation (these pages).

Apps

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