Trung tâm đào tạo thiết kế vi mạch Semicon


  • ĐĂNG KÝ TÀI KHOẢN ĐỂ TRUY CẬP NHIỀU TÀI LIỆU HƠN!
  • Create an account
    *
    *
    *
    *
    *
    Fields marked with an asterisk (*) are required.
semicon_lab.jpg

Verilog Quick Reference part 2

E-mail Print PDF

SYSTEM TASKSbut mentioned in the informative appendix.

INPUT $readmemh("fname", ID [, startadd [, stopadd]]); 

$sreadmemb(ID, startadd, stopadd {, string});

$sreadmemh(ID, startadd, stopadd {, string});

OUTPUT

$display[defbase]([fmtstr,] {expr,});

.

$write[defbase] ([fmtstr,] {expr,});

$strobe[defbase] ([fmtstr,] {expr,});

.

.

$monitor[defbase] ([fmtstr,] {expr,});

$fdisplay[defbase] (fileno, [fmtstr,] {expr,});

$fwrite[defbase] (fileno, [fmtstr,] {expr,});.

.

$fstrobe(fileno, [fmtstr,] {expr,});

.

$fmonitor(fileno, [fmtstr,] {expr,});

fileno = $fopen("filename");

.

.

$fclose(fileno);

.

defbase ::= h | b | o

.

TIME

$stime "now" as INTEGER

.

$realtime "now" as REAL

.

$scale(hierid) Scale "foreign" time value

.

$printtimescale[(path)] Display time unit & precision

.

$timeformat(unit#, prec#, "unit", minwidth)

.

Set time %t display format

SIMULATION CONTROL

.

$stop Interrupt

.

$finish Terminate

$save("fn") Savecurrentmulation

$incsave("fn") Delta-save since last save

$restart("fn") Restart with saved simulation

$input("fn") Read commands from file

$log[("fn")] Enable output logging to file

$nolog Disable output logging

$key[("fn")] Enable input logging to file

.

$nokey Disable input logging

$scope(hiername) Set scope to hierarchy

.

$showscopes Scopes at current scope

$showscopes(1) All scopes at & below scope

$showvars Info on all variables in scope

$showvars(ID) Info on specified variable

$countdrivers(net)>1 driver predicate

$list[(ID)] List source of [named] block

$monitoron Enable $monitor task

$monitoroff Disable $monitor task

.

$dumpon Enable val change dumping

$dumpoff Disable val change dumping

$dumpfile("fn") Name of dump file

$dumplimit(size) Max size of dump file

$dumpflush Flush dump file buffer

$dumpvars(levels [{, MODID | VARID}])

Variables to dump

$dumpall Force a dump now

$reset[(0)] Reset simulation to time 0

$reset(1) Reset and run again

$reset(0|1, expr) Reset with reset_value*$reset_value Reset_value of last $reset

$reset_count # of times $reset was used

MISCELLANEOUS

.

$getpattern(mem) Assign mem content

$rtoi(expr) Convert real to integer

$itor(expr) Convert integer to real

$realtobits(expr) Convert real to 64-bit vector

$bitstoreal(expr) Convert 64-bit vector to real

.  . .

.

ESCAPE SEQUENCES IN FORMAT STRINGS

.

.

\xxx character as octal value

%% character "%"

%[w.d]e, %[w.d]E display real in scientific form

%[w.d]f, %[w.d]F display real in decimal form

%[w.d]g, %[w.d]G display real in shortest form

%[0]h, %[0]H display in hexadecimal

%[0]d, %[0]D display in decimal

%[0]o, %[0]O display in octal

%[0]b, %[0]B display in binary

%[0]c, %[0]C display as ASCII character

%[0]v, %[0]V display net signal strength

%[0]s, %[0]S display as string

%[0]t, %[0]T display in current time format

%[0]m, %[0]M display hierarchical name

LEXICAL ELEMENTS

.

hierarchical identifier ::= {INSTID .} identifier

.

identifier ::= letter | _ { alphanumeric | $ | _}.

 .

escaped identifer ::= \ {nonwhite}

.

decimal literal ::=

[+|-]integer [. integer] [E|e[+|-] integer]

based literal ::= integer " base {hexdigit | x | z}

.

base ::= b | o | d | .\

comment ::= // comment newline

.

 .

comment block ::= /* comment */

 Bạn Có Đam Mê Với Vi Mạch hay Nhúng      -     Bạn Muốn Trau Dồi Thêm Kĩ Năng

Mong Muốn Có Thêm Cơ Hội Trong Công Việc

Và Trở Thành Một Người Có Giá Trị Hơn

Bạn Chưa Biết Phương Thức Nào Nhanh Chóng Để Đạt Được Chúng

Hãy Để Chúng Tôi Hỗ Trợ Cho Bạn. SEMICON  

 

Last Updated ( Tuesday, 29 March 2022 01:01 )  
Chat Zalo