|
|
|
|
|
|
About the Quartus II Text Editor |
|
The Quartus II Text Editor is a flexible tool that you can use to enter text-based designs in AHDL, VHDL, Verilog HDL, and Tcl languages. Right-click commands, auto-complete text entry, and error checking features allow you to easily create Text Design Files (.tdf), VHDL Design Files (.vhd), Verilog Design Files (.v), SystemVerilog Design Files (.sv), and Tcl Script Files (.tcl). You can also generate a .tcl file from a Quartus II project, and then edit it in the Quartus II Text Editor. You can freely combine .tdf, .vhd, and .v files with other types of design files in a hierarchical project. Additionally, you can create or edit Assembly Files (.a, .asm), C/C++ Include Files (.h), C Source Files (.c), C++ Source Files (.cpp), and ASCII files, including those created for or by the Quartus II software. Code element templates provide an easy way to enter code and increase the speed and accuracy of design entry.
If you choose not to use the Quartus II Text Editor, the Quartus II software allows you to define your preferred text editor in the Options dialog box. Before using an external text editor, you must first close all files open in the Quartus II Text Editor; otherwise, the external text editor you select does not open properly.
With the Quartus II Text Editor, you can take advantage of unique features to help you debug your Quartus II project. For example, the Messages window allows you to locate and highlight design file errors in the Quartus II Text Editor. The text editor indicates errors that occur during compilation with a yellow circle at the line number in the design file where the error occurred. Hovering your mouse over the yellow circle displays a tooltip with a description of the error.
You can dock or undock the text editor window from the main Quartus II window by clicking the Detach Window or Attach Window icon, which gives you additional flexibility when you create and debug design files. Each time you save a file, the Quartus II Text Editor creates a backup file in the same directory as the open file as <file name>.bak.
In the Quartus II Text Editor, if the node text is tappable, you can click the Add Node to SignalTap II Logic Analyzer command on the shortcut menu, and then choose to add the selected node to a new SignalTap II File (.stp), or to an existing .stp file that appears on the shortcut menu.
You can customize the Quartus II Text Editor with options on the Headers & Footers Settings page, the Preferred Text Editor page, or the Text Editor page, in the Quartus II software. The following are descriptions of popular editing features available in the Quartus II Text Editor:
Find, Find Next, and Replace commands allow you to search for words or regular and matching case expressions and make replacements to the entire file, or to selected text.
Increase Indent or Decrease Indent commands allow you to increase or decrease the indent of a single line or section of text.
The Tab size (in spaces) option allows you to specify the number of spaces represented by each indent. You can also replace tab occurrences with spaces with the Insert space on Tab option on the Text Editor page, and the Replace Tabs With Spaces command on the Edit menu.
The Insert File command allows you to insert the entire contents of any text file into the current file.
The Quartus II Text Editor allows you to set different colors for various code element categories, for example, VHDL, Verilog, and Tcl reserved syntax keywords.
The Insert Template command allows you to insert a code template for any AHDL statement or section, any supported VHDL, SystemVerilog, or Verilog HDL construct, Tcl commands, or megafunctions into the current file. Additionally, to ease the specification of timing constraints in the TimeQuest Timing Analyzer, the Quartus II Text Editor supports Synopsys Design Constraints (SDC) templates.
The Fonts page allows you to change the size, style, and font of text. The Quartus II Text Editor supports only monospace fonts that range in size from 8 to 48 points.
The Quartus II Text Editor allows you to set different colors for various code element categories, for example, VHDL, Verilog, and Tcl reserved syntax keywords. On the Colors page, you can customize which colors to use for the different code elements.
The Autocomplete Text command allows the Quartus II Text Editor to predict the syntax word, delimiter, or keyword that you want to type as you enter text. As you type, a list of possible words appears in a drop-down list.
Smart highlighting helps you to easily identify matched keywords in a document. When you highlight a text string, the Quartus II Text Editor highlights all occurrences of the selected text in the document. On the Colors page, you can customize which colors to use for highlighting text.
The Find Matching Delimiter command allows you to locate start-of-section, end-of-section, and other syntax delimiters. For example, if you select an opening parenthesis, the text editor can find the next closing parenthesis.
The Go To command allows you to jump to a specified line of text.
You can use bookmarks to mark frequently accessed lines in a file. With the Toggle Bookmark, Jump To Next Bookmark, and Jump To Previous Bookmark commands, you can set a bookmark on a line in a file, and then later jump to that line from anywhere in the file. The Clear All Bookmarks command allows you to delete all bookmarks in an open file.
The Duplicate View command helps you edit and compare files by duplicating a Quartus II Text Editor window. The Split Window command allows you to split the active Quartus II Text Editor window into two panes. You can view the windows in a vertical or horizontal orientation.