摘要: 查看代码 module tb; int q1[$]={1,2,3,4,5}; int q2[$]; int tmp; initial begin tmp = q1[0]; #1; tmp = q1[$]; #1; q2 = q1; #1; q2 = {}; #1; q2[0] = 15; #1; q 阅读全文
posted @ 2022-03-31 20:45 程序媛莫可可 阅读(585) 评论(0) 推荐(0)
摘要: class Register ; string name; rand bit [3:0] rank; rand bit [3:0] pages; function new(string name); this.name = name; endfunction function void print( 阅读全文
posted @ 2022-03-31 19:59 程序媛莫可可 阅读(259) 评论(0) 推荐(0)
摘要: SV支持对数组内变量的 定位locator、排序ordering 和缩位 reduction (1) 定位 find with, find_first with, find_last with 找的是数组内元素 find_index with, find_first_index with , fin 阅读全文
posted @ 2022-03-31 15:19 程序媛莫可可 阅读(1813) 评论(0) 推荐(0)
摘要: 联合数组,associative arrays, 为了充分利用内存的零散空间🔍 语法格式: data_type associative_array_name [index data type] ; 查看代码 module assoc_array; int assoc1 [string] ; int 阅读全文
posted @ 2022-03-31 14:20 程序媛莫可可 阅读(799) 评论(0) 推荐(0)