Synopsys VCS 學習筆記(一)

來源:互聯網
上載者:User

標籤:

1、VCS常用編譯命令:
  vcs source_files [source_or_object_files] options
e.g vcs top.v toil.v -RI +v2k

Details of Options:

-I:Compiles for interactive use

+v2k:Enables new language features in the proposed IEEE 1364-2001 standard. See “Implemented IEEE Std 1364-2001 Language Constructs” on page 2-23.

-R after compilation, run simulation executable

-RI after compilation, run simulation under xvcs

-sverilog
Enables the use of the Verilog language extensions in the Accellera
SystemVerilog specification.

-debug
Enables the use of UCLI commands and DVE.

-debug_all
Enables the use of UCLI and DVE. Also enables line stepping.

-doc

Starts browser to display the HTML files for the VCS/VCSi documentation.

-vcd <filename>
Sets the output VCD file name to the specified file.
The default filename is verilog.dump.
A $dumpfile system task in the Verilog source code will override
this option.

+vcdfile+<filename>
Specifies the VCD file you want to use for post-processing.

-fsdb
To dump an fsdb file

-Xman=4:combines all source files into a single file “tokens.v”
e.g:vcs add4.v top.v -Xman=4

-l filename:Specifies a file where VCS records compilation messages. If you
also enter the -R option, VCSrecords messages from both
compilation and simulation in the same file.

2、fsdbDumpfile and fsdbDumpvars to dump an fsdb file.
fsdbDumpfile - 指定FSDB檔案名稱
-文法:$fsdbDumpfile("FSDB name")
-功能:將dump下來的資料存成指定的檔案

fsdbDumpvars - Dump指定的變數
-文法:$fsdbDumpvars;$fsdbDumpvars(leval,module/var);
-功能:將所要觀察的變數dump下來,儲存到FSDB file.

$fsdbDumpon,$fsdbDumpfileoff
-功能:Turn on/off dump 變數的功能

$fsdbDumpMem,$fsdbDumpMenNow
-文法:$fsdbDumpMem,$fsdbDumpMemNow
-功能:將記憶體的值儲存到FSDB file,當呼叫$fsdbDumpMemNow時記憶體的值會立即被dump出來,而呼叫$fsdbDumpMem則必須等到時機間隔結束才會dump出來。

example 1:

1 initial begin2   $vcdpluson;3   $fsdbDumpfile("test.fsdb");4   $fsdbDumpvars(0,router_test_io);5 end

 

example 2:

1 initial begin2     $vcdpluson;3     $fsdbDumpfile("test.fsdb");4     $fsdbDumpvars(0,test);5 end

 

註:example 1和example 2將router_test_io和test兩個模組中的訊號波形全部存在test.sfdb檔案中。


3、執行simv(VCS產生模擬使用的二進位測試檔案)檔案
命令:./simv [run_time_options]

run_time_options

-s: stops simulation at time 0

e.g:./simv -s

4、Interactive mode(互動模式)
允許即時的控制模擬的進行,允許在類比的過程中改變寄存器的值或者設定,這些改變會即時地影響到類比的結果

5、Post-processing mode(幕後處理方式)
先輸出使用者指定選擇的訊號及其變化過程到一個檔案中,然後可以用 VirSim來分析這個檔案。該檔案是 VCD+類型的,VCD+檔案是一種二進位的格式,裡面記錄了 VCS類比的結果,和訊號的變化曆史等資訊。

6、VCS編譯註意問題:
使用VCS編譯時間,必須先將含有`timescale或者宏定義的文檔放在前面,不然會報錯誤
Error-[ITSFM] Illegal `timescale for module
router_test_top.sv, 7
Module "router_test_top" has `timescale but previous module(s)/package(s) do
not.
Please refer LRM 1364-2001 section 19.8.

 

Synopsys VCS 學習筆記(一)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.