Tutorial: New Project

Note: Some of the rest of the examples in this tutorial series assume you are using the Eclipse plugin (and not the standalone compiler). Although this is not required to learn the syntax of the language, it is recommended that that you simultaneously follow along in a working Eclipse environment with the plugin properly installed.

Navigating the various tutorials may be accomplished with menu bar above, or by advancing through each page with the "previous" and "next" buttons at the top and bottom of each page. Once you have familiarized yourself with all concepts, we invite you to take a look at some of our examples to internalize how more complicated designs may be acheived using the language.

That said, let's begin by creating a new project. First, open Eclipse, and select File -> New -> Project... from the menu bar, as shown in the picture below.

From the popup windows, select a general project, and give it a name. We will name our example project "example." After clicking through the prompts, the new project is created in the workspace. Now, right click on the project folder and choose New -> File. Give the new file resource a name with a *.phdl extension (example.phdl). It is important to give the file the correct extension so the tool knows it is a PHDL file, otherwise the file will not be highlighted properly or contribute to any part of a PHDL design. Once the file is created, you will be prompted to add the Xtext nature to the project. Upon clicking "yes", every time a PHDL file is opened in the project, a special PHDL text editor will be opened in eclipse. You are now ready to begin editing PHDL.

Users who are already familiar with Eclipse will notice the similar regions of the tool. There are four main regions (called views) that you should become familiar with if you are not already. The first view is on the left hand side, and provides a hierarchy of resources in an explorer sorted by project name.

The editor view shows the resource that is currently being edited. You can turn on line numbers in the editor by right-clicking on the left hand vertical bar, and choosing "Show line-numbers." Resources that are not saved will show up with an asterisk by their name tab at the top. An outline view is shown at right. Clicking on any object in the outline view jumps to where the object is declared in editor. The objects in the outline may be sorted, expanded, or collapsed with the buttons near the top of the outline browser. Finally, any problems that exist with compilation are reported in the problems view at the bottom.

Getting Started With PHDL

The best place to start is to visit our installation instructions which will help you get PHDL up and running on your machine. Then, be sure to visit the tutorial page.