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

Subversion Repositories m16c5x

[/] [m16c5x/] [trunk/] [RTL/] [Sim/] [tb_SSP_UART.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 MichaelA
///////////////////////////////////////////////////////////////////////////////
2
//
3
//  Copyright 2008-2013 by Michael A. Morris, dba M. A. Morris & Associates
4
//
5
//  All rights reserved. The source code contained herein is publicly released
6
//  under the terms and conditions of the GNU Lesser Public License. No part of
7
//  this source code may be reproduced or transmitted in any form or by any
8
//  means, electronic or mechanical, including photocopying, recording, or any
9
//  information storage and retrieval system in violation of the license under
10
//  which the source code is released.
11
//
12
//  The source code contained herein is free; it may be redistributed and/or 
13
//  modified in accordance with the terms of the GNU Lesser General Public
14
//  License as published by the Free Software Foundation; either version 2.1 of
15
//  the GNU Lesser General Public License, or any later version.
16
//
17
//  The source code contained herein is freely released WITHOUT ANY WARRANTY;
18
//  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
19
//  PARTICULAR PURPOSE. (Refer to the GNU Lesser General Public License for
20
//  more details.)
21
//
22
//  A copy of the GNU Lesser General Public License should have been received
23
//  along with the source code contained herein; if not, a copy can be obtained
24
//  by writing to:
25
//
26
//  Free Software Foundation, Inc.
27
//  51 Franklin Street, Fifth Floor
28
//  Boston, MA  02110-1301 USA
29
//
30
//  Further, no use of this source code is permitted in any form or means
31
//  without inclusion of this banner prominently in any derived works. 
32
//
33
//  Michael A. Morris
34
//  Huntsville, AL
35
//
36
///////////////////////////////////////////////////////////////////////////////`timescale 1ns / 1ps
37
 
38
`timescale 1ns / 1ps
39
 
40
///////////////////////////////////////////////////////////////////////////////
41
// Company:         M. A. Morris & Associates
42
// Engineer:        Michael A. Morris
43
//
44
// Create Date:     18:21:47 06/13/2008
45
// Design Name:     LTAS
46
// Module Name:     C:/XProjects/ISE10.1i/LTAS/tb_SSP_UART.v
47
// Project Name:    LTAS
48
// Target Device:   XC3S700AN-5FGG484I
49
// Tool versions:   ISE 10.1i SP3
50
//
51
// Description: Test Fixture for full SSP UART 
52
//
53
// Verilog Test Fixture created by ISE for module: SSP_UART
54
//
55
// Dependencies:    SSP_UART
56
// 
57
// Revision History:
58
//
59
//  0.01    08F13   MAM     File Created
60
//
61
// Additional Comments: 
62
//
63
////////////////////////////////////////////////////////////////////////////////
64
 
65
module tb_SSP_UART_v;
66
 
67
// UUT Interface
68
 
69
reg     Rst;
70
reg     Clk;
71
 
72
reg     SSP_SSEL;
73
reg     SSP_SCK;
74
reg     [2:0] SSP_RA;
75
reg     SSP_WnR;
76
reg     SSP_EOC;
77
reg     [11:0] SSP_DI;
78
wire    [11:0] SSP_DO;
79
 
80
wire    TxD_232;
81
reg     RxD_232;
82
wire    xRTS;
83
reg     xCTS;
84
 
85
wire    TxD_485;
86
reg     RxD_485;
87
wire    xDE;
88
 
89
wire    IRQ;
90
 
91
wire    TxIdle;
92
wire    RxIdle;
93
 
94
// Instantiate the Unit Under Test (UUT)
95
 
96
SSP_UART    uut (
97
                .Rst(Rst),
98
                .Clk(Clk),
99
 
100
                .SSP_SSEL(SSP_SSEL),
101
                .SSP_SCK(SSP_SCK),
102
                .SSP_RA(SSP_RA),
103
                .SSP_WnR(SSP_WnR),
104
                .SSP_EOC(SSP_EOC),
105
                .SSP_DI(SSP_DI),
106
                .SSP_DO(SSP_DO),
107
 
108
                .TxD_232(TxD_232),
109
                .RxD_232(RxD_232),
110
                .xRTS(xRTS),
111
                .xCTS(xCTS),
112
 
113
                .TxD_485(TxD_485),
114
                .RxD_485(RxD_485),
115
                .xDE(xDE),
116
 
117
                .IRQ(IRQ),
118
 
119
                .TxIdle(TxIdle),
120
                .RxIdle(RxIdle)
121
            );
122
 
123
initial begin
124
    // Initialize Inputs
125
    Rst      = 1;
126
    Clk      = 1;
127
    SSP_SSEL = 0;
128
    SSP_SCK  = 1;
129
    SSP_RA   = 0;
130
    SSP_WnR  = 0;
131
    SSP_EOC  = 0;
132
    SSP_DI   = 0;
133
    RxD_232  = 1;
134
    xCTS     = 0;
135
    RxD_485  = 1;
136
 
137
    // Wait 100 ns for global reset to finish
138
    #101 Rst = 0;
139
 
140
    // Add stimulus here
141
 
142
end
143
 
144
///////////////////////////////////////////////////////////////////////////////
145
//
146
//  Simulation Clocks
147
//
148
 
149
always #5 Clk = ~Clk;
150
 
151
endmodule
152
 

powered by: WebSVN 2.1.0

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