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

Subversion Repositories cpu8080

[/] [cpu8080/] [trunk/] [project/] [cpu_tbw.ant] - Blame information for rev 9

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

Line No. Rev Author Line
1 2 samiam9512
////////////////////////////////////////////////////////////////////////////////
2
// Copyright (c) 1995-2003 Xilinx, Inc.
3
// All Right Reserved.
4
////////////////////////////////////////////////////////////////////////////////
5
//   ____  ____
6
//  /   /\/   /
7
// /___/  \  /    Vendor: Xilinx
8
// \   \   \/     Version : 8.2.02i
9
//  \   \         Application : ISE
10
//  /   /         Filename : cpu_tbw.ant
11 9 samiam9512
// /___/   /\     Timestamp : Fri Oct 20 21:19:57 2006
12 2 samiam9512
// \   \  /  \
13
//  \___\/\___\
14
//
15
//Command:
16
//Design Name: cpu_tbw
17
//Device: Xilinx
18
//
19
`timescale 1ns/1ps
20
 
21
module cpu_tbw;
22
    wire [15:0] addr;
23
    reg [7:0] data$inout$reg = 8'bZZZZZZZZ;
24
    wire [7:0] data = data$inout$reg;
25
    wire readmem;
26
    wire writemem;
27
    wire readio;
28
    wire writeio;
29 9 samiam9512
    wire intr;
30 2 samiam9512
    wire inta;
31
    reg waitr = 1'b0;
32
    reg reset = 1'b1;
33
    reg clock = 1'b0;
34
 
35
    parameter PERIOD = 200;
36
    parameter real DUTY_CYCLE = 0.5;
37
    parameter OFFSET = 0;
38
 
39
    initial    // Clock process for clock
40
    begin
41
        #OFFSET;
42
        forever
43
        begin
44
            clock = 1'b0;
45
            #(PERIOD-(PERIOD*DUTY_CYCLE)) clock = 1'b1;
46
            #(PERIOD*DUTY_CYCLE);
47
        end
48
    end
49
 
50
    testbench UUT (
51
        .addr(addr),
52
        .data(data),
53
        .readmem(readmem),
54
        .writemem(writemem),
55
        .readio(readio),
56
        .writeio(writeio),
57
        .intr(intr),
58
        .inta(inta),
59
        .waitr(waitr),
60
        .reset(reset),
61
        .clock(clock));
62
 
63
    integer TX_FILE = 0;
64
    integer TX_ERROR = 0;
65
 
66
    initial begin    // Annotation process for clock clock
67
        #0;
68
        ANNOTATE_addr;
69
        ANNOTATE_readmem;
70
        ANNOTATE_writemem;
71
        ANNOTATE_readio;
72
        ANNOTATE_writeio;
73 9 samiam9512
        ANNOTATE_intr;
74 2 samiam9512
        ANNOTATE_inta;
75
        #OFFSET;
76
        forever begin
77
            #115;
78
            ANNOTATE_addr;
79
            ANNOTATE_readmem;
80
            ANNOTATE_writemem;
81
            ANNOTATE_readio;
82
            ANNOTATE_writeio;
83 9 samiam9512
            ANNOTATE_intr;
84 2 samiam9512
            ANNOTATE_inta;
85
            #85;
86
        end
87
    end
88
 
89
    initial begin  // Open the annotations file...
90
        TX_FILE = $fopen("C:\\Xilinx\\ISEexamples\\cpu8080\\cpu_tbw.ano");
91
        #10200 // Final time:  10200 ns
92
        $display("Success! Annotation Simulation Complete.");
93
        $fdisplay(TX_FILE, "Total[%d]", TX_ERROR);
94
        $fclose(TX_FILE);
95
        $finish;
96
    end
97
 
98
    initial begin
99
        // -------------  Current Time:  485ns
100
        #485;
101
        reset = 1'b0;
102
        // -------------------------------------
103
    end
104
 
105
    task ANNOTATE_addr;
106
        #0 begin
107
            $fdisplay(TX_FILE, "Annotate[%d,addr,%b]", $time, addr);
108
            $fflush(TX_FILE);
109
            TX_ERROR = TX_ERROR + 1;
110
        end
111
    endtask
112
 
113
    task ANNOTATE_readmem;
114
        #0 begin
115
            $fdisplay(TX_FILE, "Annotate[%d,readmem,%b]", $time, readmem);
116
            $fflush(TX_FILE);
117
            TX_ERROR = TX_ERROR + 1;
118
        end
119
    endtask
120
 
121
    task ANNOTATE_writemem;
122
        #0 begin
123
            $fdisplay(TX_FILE, "Annotate[%d,writemem,%b]", $time, writemem);
124
            $fflush(TX_FILE);
125
            TX_ERROR = TX_ERROR + 1;
126
        end
127
    endtask
128
 
129
    task ANNOTATE_readio;
130
        #0 begin
131
            $fdisplay(TX_FILE, "Annotate[%d,readio,%b]", $time, readio);
132
            $fflush(TX_FILE);
133
            TX_ERROR = TX_ERROR + 1;
134
        end
135
    endtask
136
 
137
    task ANNOTATE_writeio;
138
        #0 begin
139
            $fdisplay(TX_FILE, "Annotate[%d,writeio,%b]", $time, writeio);
140
            $fflush(TX_FILE);
141
            TX_ERROR = TX_ERROR + 1;
142
        end
143
    endtask
144
 
145 9 samiam9512
    task ANNOTATE_intr;
146
        #0 begin
147
            $fdisplay(TX_FILE, "Annotate[%d,intr,%b]", $time, intr);
148
            $fflush(TX_FILE);
149
            TX_ERROR = TX_ERROR + 1;
150
        end
151
    endtask
152
 
153 2 samiam9512
    task ANNOTATE_inta;
154
        #0 begin
155
            $fdisplay(TX_FILE, "Annotate[%d,inta,%b]", $time, inta);
156
            $fflush(TX_FILE);
157
            TX_ERROR = TX_ERROR + 1;
158
        end
159
    endtask
160
 
161
endmodule
162
 

powered by: WebSVN 2.1.0

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