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

Subversion Repositories iso7816_3_master

[/] [iso7816_3_master/] [trunk/] [test/] [tb_BasicHalfDuplexUart.v] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 acapola
/*
2
Author: Sebastien Riou (acapola)
3
Creation date: 19:45:19 10/31/2010
4
 
5
$LastChangedDate: 2011-01-29 13:16:17 +0100 (Sat, 29 Jan 2011) $
6
$LastChangedBy: acapola $
7
$LastChangedRevision: 11 $
8
$HeadURL: file:///svn/iso7816_3_master/iso7816_3_master/trunk/test/tb_BasicHalfDuplexUart.v $
9
 
10
This file is under the BSD licence:
11
Copyright (c) 2011, Sebastien Riou
12
 
13
All rights reserved.
14
 
15
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
16
 
17
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
18
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
19
The names of contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
20
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
*/
32
`default_nettype none
33 2 acapola
`timescale 1ns / 1ps
34
 
35
module tb_BasicHalfDuplexUart;
36
 
37
        // Inputs
38
        reg [7:0] txData;
39
        reg [12:0] clocksPerBit;
40
        reg stopBit2;
41
        reg startTx;
42
        reg ackFlags;
43
        reg clk;
44
        reg nReset;
45
 
46
        // Outputs
47
        wire [7:0] rxData;
48
        wire overrunErrorFlag;
49
        wire dataOutReadyFlag;
50
        wire frameErrorFlag;
51
        wire run;
52
        wire rxStartBit;
53
        wire txFull;
54
        wire isTx;
55
 
56
        // Bidirs
57
        wire serialLine;
58
 
59
        // Instantiate the Unit Under Test (UUT)
60
        BasicHalfDuplexUart uut (
61
                .rxData(rxData),
62
                .overrunErrorFlag(overrunErrorFlag),
63
                .dataOutReadyFlag(dataOutReadyFlag),
64
                .frameErrorFlag(frameErrorFlag),
65
                .run(run),
66
                .rxStartBit(rxStartBit),
67
                .txFull(txFull),
68
                .isTx(isTx),
69
                .serialLine(serialLine),
70
                .txData(txData),
71
                .clocksPerBit(clocksPerBit),
72
                .stopBit2(stopBit2),
73
                .startTx(startTx),
74
                .ackFlags(ackFlags),
75
                .clk(clk),
76
                .nReset(nReset)
77
        );
78
 
79
        initial begin
80
                // Initialize Inputs
81
                txData = 0;
82
                clocksPerBit = 0;
83
                stopBit2 = 0;
84
                startTx = 0;
85
                ackFlags = 0;
86
                clk = 0;
87
                reset = 0;
88
 
89
                // Wait 100 ns for global reset to finish
90
                #100;
91
 
92
                // Add stimulus here
93
 
94
        end
95
 
96
endmodule
97 11 acapola
`default_nettype wire
98 2 acapola
 

powered by: WebSVN 2.1.0

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