How to write Verilog HDL efficiently?

Vim is actually a commonly used editor for Linux. It is called Gvim under Windows. Due to its high degree of customization and operation commands, programmers can even write the code without leaving the keyboard. They only need to input the corresponding commands. The entire programming can be done. It can be said that it is the favorite of programmers. So why do I recommend using Gvim to write VerilogHDL here, first because of its high degree of customization.

Gvim's configuration files are customizable so that when writing code, you can use a few simple commands to reduce the amount of labor. For example, the code we wrote is basically composed of always blocks. Generally speaking, we all write an always block and then paste and copy the other ones. Then with gvim, I only need to insert mode (gvim). The default is the command mode, press i to enter the insert mode, press esc to enter the command mode), enter Shixu+ Enter, and automatically generate the always block template.

How to write Verilog HDL efficiently - Advanced Edition

This is because Vim's highly customizable nature allows you to configure any required "shortcut" input methods in Vim's configuration file. For example, if I type Zhishi+ Enter, I can directly generate my own code comment information, type Fenge+Enter, generate the split line, etc. This is my habit of writing code, and the user can customize the configuration.

How to write Verilog HDL efficiently - Advanced Edition

The specific configuration method is also very simple. Open the _vimrc file in the installation directory. This is the configuration file of gvim. The specific fixed configuration parameters can be Baidu. I only talk about the simplest one. I only need to The following various types of editing files, spaces are direct spaces, carriage returns,: ab + command + space + code, the edited paragraph directly copied to the _vimrc file, you can use.

How to write Verilog HDL efficiently - Advanced Edition

In addition to these, gvim has a lot of useful commands. I will briefly list a few commands that are often used when writing VerilogHDL. It is really necessary to use Vim bloggers to learn.

1. Command mode: All the keys on the keyboard are various operation commands. Open editor default to command mode

2. Edit mode: For normal editing, press i in command mode to switch to edit mode, press Esc to switch to command mode.

3. Column operation mode ctrl+q

Press ctrl+q in the command mode to enter the column operation. Select the code that needs to be operated by pressing Ctrl+q, then you can operate the entire column and exit after the operation.

4. Completion command Ctrl+p

When entering the first few characters of the code, if there is a string with the same code in the file, you only need to press ctrl+p directly to display the auto-completion.

5. Jump command

Jump within the file (gg, G,: 100). In command mode, gg is jumped to the file header, G is jumped to the file, and 100 is jumped to 100 lines.

6. Replacement command

Replace the command (:%s/xx/yy/gc, :10,100s/xx/yy/gc). In command mode, type the command: %s/xx/yy/gc, which means replacing xx with yy, and the command: 10,100s/xx/yy/gc means replacing xx of 10 to 100 lines with yy.

7. Column insertion method

Enter the command mode, select the position to be inserted, press ctrl+q to enter the column edit, press hjkl to indicate the up, down, left and right operations, then type the uppercase I, insert the data, press Esc, the column insert operation is completed.

and many more. .

After writing the code in the editor and opening it with the software's own editor, Chinese garbled characters may appear, so I suggest not to open the code with the software's own editor, and open it directly with Gvim. Of course, the two softwares of Xilinx also provide associations. A third-party editor, bloggers try to associate successfully, share as follows.

1.ISE calls the GVim editor

In the IE main interface menu bar, click Eidt - Preference, select custom, and then enter the following command line in the command line syntax: {D:\Gvim installation path \gvim.exe} --remote-tab-silent +$2 $1. Inside the brackets is the path to the gvim installation.

How to write Verilog HDL efficiently - Advanced Edition

Smart Watch

Smart Watches,Smart Bracelet,Blood Pressure Smart Watch,Health Monitor Smart Watches;

C&Q Technology (Guangzhou) Co.,Ltd. , https://www.gzcqteq.com