Edit code - EDA Playground
Warning! This exercise has been opened in another tab; autosave has been disabled. Close this tab or refresh to reactivate.

 Languages & Libraries

 Tools & Simulators

 Examples

203


24
 
1
//-------------------------------------------------------------------------
2
//                      www.verificationguide.com - Program Block
3
//-------------------------------------------------------------------------
4
//testbench
5
//-------------------------------------------------------------------------
6
program testbench(input bit [7:0] addr);
7
  initial begin
8
    $display("\t Addr = %0d",addr);
9
  end
10
endprogram
11
12
//-------------------------------------------------------------------------
13
//testbench top,
14
//-------------------------------------------------------------------------
15
module tbench_top;
16
  wire [7:0] addr;
17
  
18
  //design instance
19
  design_ex dut(addr);
20
  
21
  //testbench instance
22
  testbench test(addr);
23
24
endmodule
9
 
1
//-------------------------------------------------------------------------
2
//design code
3
//-------------------------------------------------------------------------
4
module design_ex(output bit [7:0] addr);
5
  
6
  initial begin
7
    addr <= 10; 
8
  end     
9
endmodule
2119 views and 0 likes     
A short description will be helpful for you to remember your playground's details
 
100:0