注册 登录
ET创芯网论坛(EETOP) 返回首页

imicman的个人空间 http://blog.eetop.cn/?1518355 [收藏] [复制] [分享] [RSS]

日志

back-slash

已有 349 次阅读2016-6-14 21:45 |个人分类:验证杂谈


In Verilog, the  ‘define  macro text can include a backslash (  \  ) at the end of a line to show continuation on
the next line. 
==========================================
A string literal shall be contained in a single line unless the new line is immediately preceded by a  \  (back-
slash). In this case, the backslash and the new line are ignored. There is no predefined limit to the length of a
string literal. 

Example 1:
$display("Humpty Dumpty sat on a wall. \
Humpty Dumpty had a great fall.");

prints

Humpty Dumpty sat on a wall. Humpty Dumpty had a great fall.

==============================================
 If more than one line is necessary to specify the text, the newline shall be preceded by a backslash (  \  )
=============================================

注意:反斜杠后面一定不能有任何字符,也就是反斜杠是最后一个字符
            在linux服务器上,如果文件采用windos的ODOA换行,需要将文件转化为unix/linux格式,即0D0A->0A
      不然,上述两种情况都会编译报错


评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

关闭

站长推荐上一条 /2 下一条

小黑屋|手机版|Archiver|ET创芯网 ( 京ICP备:10050787号 京公网安备:110105001212 )

GMT+8, 2019-4-26 17:45 , Processed in 0.026026 second(s), 11 queries , Redis On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

返回顶部