⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.v

📁 systemverilog程序
💻 V
字号:
program automatic test (arb_if.TEST arbif);    int max_trans;    task reset_test();  begin   $display("Task reset_test: asserting and checking reset");   arbif.reset <= 0;   #100 arbif.reset <= 1; // synchron   arbif.cb.request <= 0;   repeat (2) @arbif.cb;   arbif.reset <= 0;   @arbif.cb;   a0: assert (arbif.cb.grant == 2'b00);  endendtasktask request_grant_test();  $monitor("@%0d: grant=%b", $time, arbif.cb.grant);      // Test out bit 0  $display("Task request_grant_test: asserting and checking reset");  ##1 arbif.cb.request <= 2'b01;  $display("@%0d: Drove req=01", $time);  repeat (2) @arbif.cb;  a1: assert (arbif.cb.grant == 2'b01);  ##1 arbif.cb.request <= 2'b00;  $display("@%0d: Drove req=00", $time);  repeat (2) @arbif.cb;  a2: assert (arbif.cb.grant == 2'b00);  ##1 arbif.cb.request <= 2'b10;  $display("@%0d: Drove req=10", $time);  repeat (2) @arbif.cb;  a3: assert (arbif.cb.grant == 2'b10);  ##1 arbif.cb.request <= 2'b00;  $display("@%0d: Drove req=00", $time);  repeat (2) @arbif.cb;  a4: assert (arbif.cb.grant == 2'b00);  ##1 arbif.cb.request <= 2'b11;  $display("@%0d: Drove req=11", $time);  repeat (2) @arbif.cb;  a5: assert (arbif.cb.grant == 2'b01);  ##1 arbif.cb.request <= 2'b00;  $display("@%0d: Drove req=00", $time);  repeat (2) @arbif.cb;  a6: assert (arbif.cb.grant == 2'b00);endtaskinitial begin  repeat (10) @arbif.cb;  reset_test();  request_grant_test();  repeat (10) @arbif.cb;  $finish;endendprogram

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -