How to Access
Automatic action depending on context (eg, cursor position, settings, window focus, etc.)
Checks if the symbols (signals, functions, etc) obey the configured naming conventions
V3S has the ability to check your code against self-defined naming conventions. The easiest way to define your own naming rules is to export the current settings (even if there are none - a dummy file containing all necessary entries is created), modify them, and import them back into V3S. But first things first, let's look at the preferences window found at V3S|Preferences....
If you take a look at the exported settings file, you can see that the file is divided into four sections.
=character. All missing (or empty) entries will be ignored when checking the naming conventions. The following table lists the various variables you can use to reference any of the defined affixes. Also look at the examples to get a better understanding of how things work.
It's always easiest to just take a look at some examples to learn how things work. Assume the following (striped-down) configuration file. Notice that I removed all the comments and all unused entries from the file to improve readability. Just follow the steps above to export the file to obtain a fully featured version of the V3S naming convention settings. Naming Rules Configuration:
[V3sNamingTypes] boolean = b boolean_vector = bv integer = i integer_vector = iv std_logic = sl std_logic_vector = slv [V3sNamingTypeSpecs] enum = e record = r array = a file = f [V3sNamingDirections] in = i out = o inout = io [V3sNamingSymbols] AccessType = !Name_ptrt ArrayType = !Name_at EnumType = !Name_et RecordType = !Name_rt Type = !Name_%type_t EntityPortSignal = !Name_%dir Signal = !Name_s Variable = !Name_v Constant = %NAME_C Generic = %NAME_G ProcessLabel = !Name_p GenerateLabel = !Name_gen InstanceLabel = !Name_inst Function = !Name_f Enum = %NAME_ESample VHDL file:
library IEEE;Entries in Error-List-Toolwindow
entity naming_ent is -- Entity: Match
WIDTH_G : integer; -- Generic: Match
Height_G : integer -- Generic: Mismatch, should be "HEIGHT_G"
clk_i : in std_logic; -- EntityPortSignal: Match
dmy_o : inout std_logic; -- EntityPortSignal: Mismatch, should be "dmy_io"
data_o : out std_logic -- EntityPortSignal: Match
architecture rtl of naming_ent is -- Architecture: Mismatch, should be "rtl_arch"
constant MY_CONST_C: integer := 5; -- Constant: Match
type accessType_ptrt is access std_logic_vector(1 downto 0); -- AccessType: Match
type arrayType_a is array(natural range <>) of std_logic; -- ArrayType: Mismatch, should be "arrayType_at"
type enumType_et is ( -- EnumType: Match
ENUM1_E, -- Enum: Match
ENUM2, -- Enum: Mismatch, should be ENUM2_E
enum3_E); -- Enum: Mismatch, should be ENUM3_E
type myType_rt is record -- RecordType: Match
iField: integer; -- RecordField: Match
slField: std_logic; -- RecordField: Match
bField1: std_logic; -- RecordField: Mismatch, should be "slField1"
signal mySig1_mt_s: myType_rt; -- Signal: Match
signal mySig2_sl_s: std_logic; -- Signal: Match
signal mySig3_i: integer; -- Signal: Mismatch, should be "mySig3_i_s"
myProcessLabel_p: process is -- ProcessLabel: Match
variable myVar1_av: arrayType_a(1 to 2); -- Variable: Match
variable myVar2_rv: myType_rt; -- Variable: Match
variable myVar3_ev: enumType_et; -- Variable: Match
The Error-List toolwindow shows a list of symbols that does not conform to the configured naming conventions. As usual, a double-click on an item directly jumps to the respective location. Notice that you can configure the severity of the displayed messages in the V3S preferences (see above for details).