URL
https://opencores.org/ocsvn/cpu8080/cpu8080/trunk
Subversion Repositories cpu8080
[/] [cpu8080/] [trunk/] [project/] [cpu_tbw.ant] - Rev 33
Compare with Previous | Blame | View Log
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 1995-2003 Xilinx, Inc.
// All Right Reserved.
////////////////////////////////////////////////////////////////////////////////
// ____ ____
// / /\/ /
// /___/ \ / Vendor: Xilinx
// \ \ \/ Version : 8.2.02i
// \ \ Application : ISE
// / / Filename : cpu_tbw.ant
// /___/ /\ Timestamp : Sat Oct 28 09:12:59 2006
// \ \ / \
// \___\/\___\
//
//Command:
//Design Name: cpu_tbw
//Device: Xilinx
//
`timescale 1ns/1ps
module cpu_tbw;
wire [15:0] addr;
reg [7:0] data$inout$reg = 8'bZ1Z00000;
wire [7:0] data = data$inout$reg;
wire readmem;
wire writemem;
wire readio;
wire writeio;
wire intr;
wire inta;
reg waitr = 1'b0;
wire [2:0] r;
wire [2:0] g;
wire [2:0] b;
wire hsync_n;
wire vsync_n;
reg reset = 1'b0;
reg clock = 1'b0;
parameter PERIOD = 200;
parameter real DUTY_CYCLE = 0.5;
parameter OFFSET = 0;
initial // Clock process for clock
begin
#OFFSET;
forever
begin
clock = 1'b0;
#(PERIOD-(PERIOD*DUTY_CYCLE)) clock = 1'b1;
#(PERIOD*DUTY_CYCLE);
end
end
testbench UUT (
.addr(addr),
.data(data),
.readmem(readmem),
.writemem(writemem),
.readio(readio),
.writeio(writeio),
.intr(intr),
.inta(inta),
.waitr(waitr),
.r(r),
.g(g),
.b(b),
.hsync_n(hsync_n),
.vsync_n(vsync_n),
.reset(reset),
.clock(clock));
integer TX_FILE = 0;
integer TX_ERROR = 0;
initial begin // Annotation process for clock clock
#0;
ANNOTATE_addr;
ANNOTATE_readmem;
ANNOTATE_writemem;
ANNOTATE_readio;
ANNOTATE_writeio;
ANNOTATE_intr;
ANNOTATE_inta;
ANNOTATE_r;
ANNOTATE_g;
ANNOTATE_b;
ANNOTATE_hsync_n;
ANNOTATE_vsync_n;
#OFFSET;
forever begin
#115;
ANNOTATE_addr;
ANNOTATE_readmem;
ANNOTATE_writemem;
ANNOTATE_readio;
ANNOTATE_writeio;
ANNOTATE_intr;
ANNOTATE_inta;
ANNOTATE_r;
ANNOTATE_g;
ANNOTATE_b;
ANNOTATE_hsync_n;
ANNOTATE_vsync_n;
#85;
end
end
initial begin // Open the annotations file...
TX_FILE = $fopen("C:\\Xilinx\\ISEexamples\\cpu8080\\cpu_tbw.ano");
#100200 // Final time: 100200 ns
$display("Success! Annotation Simulation Complete.");
$fdisplay(TX_FILE, "Total[%d]", TX_ERROR);
$fclose(TX_FILE);
$finish;
end
initial begin
// ------------- Current Time: 85ns
#85;
reset = 1'b1;
reset = 1'b0;
// -------------------------------------
end
task ANNOTATE_addr;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,addr,%b]", $time, addr);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_readmem;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,readmem,%b]", $time, readmem);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_writemem;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,writemem,%b]", $time, writemem);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_readio;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,readio,%b]", $time, readio);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_writeio;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,writeio,%b]", $time, writeio);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_intr;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,intr,%b]", $time, intr);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_inta;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,inta,%b]", $time, inta);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_r;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,r,%b]", $time, r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_g;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,g,%b]", $time, g);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_b;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,b,%b]", $time, b);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_hsync_n;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,hsync_n,%b]", $time, hsync_n);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
task ANNOTATE_vsync_n;
#0 begin
$fdisplay(TX_FILE, "Annotate[%d,vsync_n,%b]", $time, vsync_n);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
endtask
endmodule