随笔分类 -  IC

IC设计和验证的学习资料和学习记录
摘要:fork join_any 在一个简单的SystemVerilog中,main thread会等到所有child thread都完成执行。这意味着如果任何child thread永远运行并且永远不会完成,则fork将挂起模拟。SystemVerilog还提供了带有fork join和fork joi 阅读全文
posted @ 2024-05-13 22:29 松—松 阅读(96) 评论(0) 推荐(0)
摘要:fork join SystemVerilog 通过构造提供对并行或并发threads的支持。可以使用fork和join同时生成多个procedural blocks。有一些变体允许main thread根据child thread何时完成继续执行其余语句。 Syntax fork // Threa 阅读全文
posted @ 2024-05-13 22:09 松—松 阅读(124) 评论(0) 推荐(0)
摘要:Wait fork wait fork允许 main thread 等待,直到所有 forked threads 都结束。这在 main thread 必须生成多个 threads 并在等待所有 threads 完成之前执行某些功能的情况下非常有用。 Example 我们将使用上一篇文章中相同的示例 阅读全文
posted @ 2024-05-12 22:22 松—松 阅读(295) 评论(0) 推荐(0)
摘要:SystemVerilog Threads What are SystemVerilog threads or processes ? thread 或 process 是作为单独实体执行的任何一段代码。在 verilog 中,每个initial和always块都作为单独的 thread 生成,这些 阅读全文
posted @ 2024-05-12 21:46 松—松 阅读(60) 评论(0) 推荐(0)
摘要:SystemVerilog Coverpoint Bins Usage coverpoint 用于在 covergroup 中指定要进行覆盖率收集统计收集的目标的变量。它记录单个变量或表达式的观测值。 coverpoint后面跟变量名或表达式,用于指定要收集覆盖率的目标。 可以使用bins关键字手动 阅读全文
posted @ 2024-05-12 10:55 松—松 阅读(918) 评论(0) 推荐(0)
摘要:SystemVerilog Covergroup and Coverpoint coverpoint 是 covergroup 中最基本的单元,多个 coverpoint 的覆盖率构成 covergroup 的覆盖率,在构成整体功能覆盖率。covergroup new covergroup可以在包、 阅读全文
posted @ 2024-05-11 23:25 松—松 阅读(187) 评论(0) 推荐(0)
摘要:SystemVerilog Functional Coverage covergroup 和 VCS 获取 coverage 的主要区别 covergroup用于功能覆盖率收集,而vcs主要用于代码覆盖率收集。 covergroup需要在设计代码中显示定义和实例化,通过sample()方法触发采样。 阅读全文
posted @ 2024-05-11 22:53 松—松 阅读(461) 评论(0) 推荐(0)
摘要:SystemVerilog Assertions with time delay 到目前为止,在之前的文章中,在每个时钟边沿检查了简单的布尔表达式。但是顺序检查需要几个时钟周期才能完成,并且时间延迟由符号指定。## ## Operator 如果a在任何给定时钟周期内不为高电平,则序列在同一周期内启动 阅读全文
posted @ 2024-05-10 21:38 松—松 阅读(95) 评论(0) 推荐(0)
摘要:SystemVerilog $rose、$fell、$stable A 是 SystemVerilog assertion 中的简单构成基块,可以表示某些表达式以帮助创建更复杂的属性。sequence Simple Sequence module tb; bit a; bit clk; // Thi 阅读全文
posted @ 2024-05-10 21:18 松—松 阅读(589) 评论(0) 推荐(0)
摘要:SystemVerilog Concurrent Assertions Concurrent Assertions描述了跨越仿真时间的行为,并且仅在时钟边沿发生时进行评估。 SystemVerilog Concurrent Assertions语句可以在与其它语句同时运行的模块、接口或程序块中指定。 阅读全文
posted @ 2024-05-09 22:14 松—松 阅读(74) 评论(0) 推荐(0)
摘要:SystemVerilog Immediate Assertions Immediate Assertions基于模拟事件语义执行,并且需要在过程块中指定。在模拟过程中,它的处理方式与语句中的表达式相同。if 如果表达式在执行语句时为true,则Immediate Assertions将通过,如果表 阅读全文
posted @ 2024-05-08 22:16 松—松 阅读(78) 评论(0) 推荐(0)
摘要:SystemVerilog Assertions 系统的行为可以写成一个assertion,该assertion在任何时候都应该为真。因此,assertion用于验证定义为属性的系统的行为,也可用于功能覆盖。 What are properities of a design ? 如果assertio 阅读全文
posted @ 2024-05-07 22:02 松—松 阅读(97) 评论(0) 推荐(0)
摘要:SystemVerilog Functions SystemVerilog函数具有与Verilog中的function相同的特征。 Functions a的主要用途是返回一个可在表达式中使用且不能消耗模拟时间的值。function function不能具有时间控制语句,如@ # fork join 阅读全文
posted @ 2024-05-06 21:45 松—松 阅读(311) 评论(0) 推荐(0)
摘要:SystemVerilog Event An是一个静态对象句柄,用于在两个或多个并发活动进程之间进行同步。一个进程将触发event,另一个thread的等待event。event 可以分配或其它event变量进行比较 可以分配给null 当分配给另一个event时,两个变量都指向同一个同步对象 可以 阅读全文
posted @ 2024-05-05 21:58 松—松 阅读(417) 评论(0) 推荐(0)
摘要:SystemVerilog case SystemVerilog语句检查表达式是否与多个表达式和分支中的一个匹配。该行为与Verilog中的行为相同。case unique, unique0 case 所有case语句都可以由or关键字限定,以执行违规检查,就像我们在if-else-if构造中看到的 阅读全文
posted @ 2024-05-05 21:07 松—松 阅读(531) 评论(0) 推荐(0)
摘要:SystemVerilog 'unique' and 'priority' if-else 条件语句用于决定是否执行语句。if else SystemVerilog 引入了一下用于违规检查的构造。if else unique-if unique0-if priority-if unique-if, 阅读全文
posted @ 2024-05-05 20:44 松—松 阅读(206) 评论(0) 推荐(0)
摘要:break module tb; initial begin // This for loop increments i from 0 to 9 and exit for (int i = 0; i < 10; i++) begin $display ("Iteration [%0d]", i); 阅读全文
posted @ 2024-05-05 19:59 松—松 阅读(147) 评论(0) 推荐(0)
摘要:一组给定的语句可以使用构造执行N次。repeat Syntax repeat (<number>) // Single Statement repeat (<number>) begin // Multiple Statements end Example #1 module tb; initial 阅读全文
posted @ 2024-05-05 19:48 松—松 阅读(606) 评论(0) 推荐(0)
摘要:SystemVerilog forever loop 循环永远运行,或者无限时间运行。forever Syntax forever // Single statement forever begin // Multiple statements end 循环类似于下面Verilog中所示的代码。两者 阅读全文
posted @ 2024-05-05 19:28 松—松 阅读(277) 评论(0) 推荐(0)
摘要:SystemVerilog for loop SystemVerilog中的循环多次重复一组给定的语句,直到不满足给定的表达式。与所有其他过程块一样,循环中需要多个语句被for和for begin end关键字括起来。 Syntax For循环使用三步方法控制其语句的执行: 初始化影响循环运行次数的 阅读全文
posted @ 2024-05-05 19:11 松—松 阅读(521) 评论(0) 推荐(0)