(A) Compile
$ Vcs file_name plus a variety of switching options
1. Basic Options
-Mupdate: incremental compilation compile time again compile only changed files
-R: After compilation continues simulation
-gui: Open DVE graphical interface
-l <filename>: set log file name, compiled for writing information generating log files are generally used in the simulation of large files
-sverilog: support system verilog language
+ V2k: verilog language support
2. technology library related options
-v lib_file: RTL code related to this technology library
-y dir_file: vcs told where to find the path to this process library process library
+ Libext + lib_ext: When used in many libraries, instead of -v
+ Incdir + inc_dir: If there is code include, use this command to tell vcs location that contains the file. verilog code written inside the `include" filename.vh "
3. File options
-f file: When there are many files to integrate multiple files into this folder
4. Modify the file name
-o foo: change the name of the executable file, formerly known as simv file
5.define define a macro
+ Define + <macro_name> = <value>: macro_name macro name; value initialization value; As + define + INCR_COUNTER
(Ii) Simulation
$ Simv add some simulation switch options
./sim -gui & (./ refers to the current file, sim refers to the executable file compiled obtained, gui gui interface refers to the open vcs -dve, & refers to the background) will be executed PID value
-s ending simulation time
$ Plusargs () receiving dynamic parameters
-E echo
-l logfile the simulation information into the logfile file
Three methods (iii) VCS Debug of
1. System task Act
system task calls
$ Display before printing variable assignment value
Values, variables change after $ montor print variable assignment, print the values have changed
$ Time simulation time
$ Readmemb the content of the document is read into memory, read binary binary
$ Readmemh the content of the document is read into memory, read hex hexadmecimal
2.UCLI command line method
$vcs filename +v2k -ucli -R
3.VCS DVE