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

Subversion Repositories wiegand_ctl

[/] [wiegand_ctl/] [trunk/] [bench/] [fifoTestBench.v.bak] - Blame information for rev 14

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jeaander
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  fifoTestBench.v                                             ////
4
////                                                              ////
5
////                                                              ////
6
////  This file is part of the ONFI controller                    ////
7
////  http://opencores.org/project,onfi                           ////
8
////                                                              ////
9
////                                                              ////
10
////  Author(s):                                                  ////
11
////       Jeff Anderson                                          ////
12
////       jeaander@opencores.org                                 ////
13
////                                                              ////
14
////                                                              ////
15
////  All additional information is available in the README.txt   ////
16
////  file.                                                       ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20
//// Copyright (C) 2013  Author(s)                                ////
21
////                                                              ////
22
//// This source file may be used and distributed without         ////
23
//// restriction provided that this copyright statement is not    ////
24
//// removed from the file and that any derivative work contains  ////
25
//// the original copyright notice and the associated disclaimer. ////
26
////                                                              ////
27
//// This source file is free software; you can redistribute it   ////
28
//// and/or modify it under the terms of the GNU Lesser General   ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 2.1 of the License, or (at your option) any   ////
31
//// later version.                                               ////
32
////                                                              ////
33
//// This source is distributed in the hope that it will be       ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
//// details.                                                     ////
38
////                                                              ////
39
//// You should have received a copy of the GNU Lesser General    ////
40
//// Public License along with this source; if not, download it   ////
41
//// from http://www.opencores.org/lgpl.shtml                     ////
42
////                                                              ////
43
////                                                              ////
44
//////////////////////////////////////////////////////////////////////
45
//
46
// CVS Revision History at EOF
47
//
48
 
49
// synopsys translate_off
50
//`include "timescale.v"
51
// synopsys translate_on
52
 
53
module fifoTestBench();
54
  reg clk_rd,clk_wr,rst,wr_en,rd_en;
55
  reg[7:0] d_i;
56
 
57
  wire[7:0] d_o;
58
  wire full, empty;
59
 
60
  fifo fifo(clk_rd,clk_wr,d_i[7:0],d_o[7:0],rst,wr_en,rd_en,full,empty);
61
 
62
  initial begin
63
    clk_rd = 0;
64
    clk_wr = 0;
65
    rst = 1;
66
    d_i = 8'h1;
67
    wr_en = 0;
68
    rd_en = 0;
69
  end
70
 
71
  always
72
    #5 clk_wr = !clk_wr;
73
  always
74
    #15 clk_rd = !clk_rd;
75
 
76
  initial begin
77
  #20 rst = 0;
78
  #10 wr_en = 1;
79
  #150 wr_en = 0;
80
  #10 rd_en = 1;
81
 
82
  end
83
 
84
endmodule
85
 
86
//////////////////////////////////////////////////////////////////////
87
//
88
// CVS Revision History
89
//
90
// $Log: $
91
//

powered by: WebSVN 2.1.0

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