摘要: 定宽数组:可以直接赋值,也可以先声明再赋值 其中还有多维数组 int array2[0:7][0:3];int array3[8][4];// 先个后位 int ascend[4]='{0,1,2,3}; int descend[5]; descend='{4,3,2,1,0}; descend[0 阅读全文
posted @ 2023-11-10 13:41 hc_zheng 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 设置成员操作符–inside SystemVerilog增加了一个检测是否集合中–员的操作符,这个操作符的关键字是inside。 logic [2:0] a; if(a inside{3'b001,3'b010,3'b100}) //等价if((a==3'b001)||(a==3'b010)||(a 阅读全文
posted @ 2023-11-10 11:34 hc_zheng 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 信号类型分为两种:变量类型,线网类型 四值逻辑:wire reg logic integer 二值逻辑:bit byte int shortint longint time real 有符号:byte int shortint longint integer real 无符号:wire reg lo 阅读全文
posted @ 2023-11-10 10:51 hc_zheng 阅读(39) 评论(0) 推荐(0) 编辑