OpenCores
URL https://opencores.org/ocsvn/de1_olpcl2294_system/de1_olpcl2294_system/trunk

Subversion Repositories de1_olpcl2294_system

[/] [de1_olpcl2294_system/] [trunk/] [sim/] [tests/] [debug/] [tb_top.v] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 qaztronic
// --------------------------------------------------------------------
2
//
3
// --------------------------------------------------------------------
4
 
5
`timescale 1ns/10ps
6
 
7
 
8
module tb_top();
9
 
10
  parameter CLK_PERIOD = 10;
11
 
12
  reg tb_clk, tb_rst;
13
 
14
  initial
15
    begin
16
      tb_clk <= 1'b1;
17
      tb_rst <= 1'b1;
18
 
19
      #(CLK_PERIOD); #(CLK_PERIOD/3);
20
      tb_rst = 1'b0;
21
 
22
    end
23
 
24
  always
25
    #(CLK_PERIOD/2) tb_clk = ~tb_clk;
26
 
27
// --------------------------------------------------------------------
28
// tb_dut
29
  tb_dut dut( tb_clk, tb_rst );
30
 
31
 
32
// --------------------------------------------------------------------
33
// insert test below
34
 
35
  initial
36
    begin
37
 
38
      wait( ~tb_rst );
39
 
40
      repeat(2) @(posedge tb_clk);
41
 
42
      //     
43
      $display("\n^^^- \n");
44
 
45
 
46
      dut.async_mem.async_mem_write( 32'h83000000, 32'habbabeef, 4'b0000 );
47
      repeat(2) @(posedge tb_clk);
48
 
49
      dut.async_mem.async_mem_cmp( 32'h83000000, 32'habbabeef, 4'b0000 );
50
      repeat(4) @(posedge tb_clk);
51
 
52
 
53
      $display("\n^^^---------------------------------\n");
54
      $display("^^^- Testbench done. %t.\n", $time);
55
 
56
      $stop();
57
 
58
    end
59
 
60
endmodule
61
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.