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

Subversion Repositories cpu8080

[/] [cpu8080/] [trunk/] [project/] [cpu8080_tbw.tfw] - Diff between revs 11 and 18

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 11 Rev 18
Line 6... Line 6...
//  /   /\/   /
//  /   /\/   /
// /___/  \  /    Vendor: Xilinx
// /___/  \  /    Vendor: Xilinx
// \   \   \/     Version : 8.2.02i
// \   \   \/     Version : 8.2.02i
//  \   \         Application : ISE
//  \   \         Application : ISE
//  /   /         Filename : cpu8080_tbw.tfw
//  /   /         Filename : cpu8080_tbw.tfw
// /___/   /\     Timestamp : Sat Oct 28 22:18:07 2006
// /___/   /\     Timestamp : Sat Nov 04 23:09:57 2006
// \   \  /  \
// \   \  /  \
//  \___\/\___\
//  \___\/\___\
//
//
//Command:
//Command:
//Design Name: cpu8080_tbw
//Design Name: cpu8080_tbw
Line 26... Line 26...
    wire writemem;
    wire writemem;
    wire readio;
    wire readio;
    wire writeio;
    wire writeio;
    wire intr;
    wire intr;
    wire inta;
    wire inta;
    reg waitr = 1'b0;
    wire waitr;
    wire [2:0] r;
    wire [2:0] r;
    wire [2:0] g;
    wire [2:0] g;
    wire [2:0] b;
    wire [2:0] b;
    wire hsync_n;
    wire hsync_n;
    wire vsync_n;
    wire vsync_n;
    reg reset_n = 1'b1;
    reg ps2_clk = 1'b0;
 
    reg ps2_data = 1'b0;
 
    reg reset_n = 1'b0;
    reg clock = 1'b0;
    reg clock = 1'b0;
 
 
    parameter PERIOD = 40;
    parameter PERIOD = 40;
    parameter real DUTY_CYCLE = 0.5;
    parameter real DUTY_CYCLE = 0.5;
    parameter OFFSET = 100;
    parameter OFFSET = 100;
Line 65... Line 67...
        .r(r),
        .r(r),
        .g(g),
        .g(g),
        .b(b),
        .b(b),
        .hsync_n(hsync_n),
        .hsync_n(hsync_n),
        .vsync_n(vsync_n),
        .vsync_n(vsync_n),
 
        .ps2_clk(ps2_clk),
 
        .ps2_data(ps2_data),
        .reset_n(reset_n),
        .reset_n(reset_n),
        .clock(clock));
        .clock(clock));
 
 
    integer TX_FILE = 0;
    integer TX_FILE = 0;
    integer TX_ERROR = 0;
    integer TX_ERROR = 0;
Line 89... Line 93...
 
 
    initial begin
    initial begin
        // -------------  Current Time:  110ns
        // -------------  Current Time:  110ns
        #110;
        #110;
        reset_n = 1'b0;
        reset_n = 1'b0;
 
        ps2_clk = 1'b1;
 
        ps2_data = 1'b1;
        data$inout$reg = 8'bZZZZZZZZ;
        data$inout$reg = 8'bZZZZZZZZ;
        // -------------------------------------
        // -------------------------------------
 
        // -------------  Current Time:  130ns
 
        #20;
 
        CHECK_intr(1'b0);
 
        // -------------------------------------
        // -------------  Current Time:  270ns
        // -------------  Current Time:  270ns
        #160;
        #140;
        reset_n = 1'b1;
        reset_n = 1'b1;
        // -------------------------------------
        // -------------------------------------
 
        // -------------  Current Time:  390ns
 
        #120;
 
        ps2_data = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  510ns
 
        #120;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  590ns
 
        #80;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  670ns
 
        #80;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  830ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  990ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  1150ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  1310ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  1470ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  1630ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        ps2_data = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  1790ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  1950ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  1990ns
 
        #40;
 
        ps2_data = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  2110ns
 
        #120;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  2270ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  2430ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  2590ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  2750ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  2910ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  3070ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  3230ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  3310ns
 
        #80;
 
        ps2_data = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  3390ns
 
        #80;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  3550ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  3590ns
 
        #40;
 
        ps2_data = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  3710ns
 
        #120;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  3870ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  5910ns
 
        #2040;
 
        ps2_data = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  6070ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  6230ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  6390ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  6550ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  6630ns
 
        #80;
 
        ps2_data = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  6710ns
 
        #80;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  6870ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  6910ns
 
        #40;
 
        ps2_data = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  7030ns
 
        #120;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  7190ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  7350ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  7510ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  7550ns
 
        #40;
 
        ps2_data = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  7670ns
 
        #120;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  7830ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  7910ns
 
        #80;
 
        ps2_data = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  7990ns
 
        #80;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  8150ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  8310ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  8470ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  8630ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  8790ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  8950ns
 
        #160;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  9110ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  9190ns
 
        #80;
 
        ps2_data = 1'b1;
 
        // -------------------------------------
 
        // -------------  Current Time:  9270ns
 
        #80;
 
        ps2_clk = 1'b0;
 
        // -------------------------------------
 
        // -------------  Current Time:  9430ns
 
        #160;
 
        ps2_clk = 1'b1;
 
        // -------------------------------------
    end
    end
 
 
    task CHECK_addr;
    task CHECK_addr;
        input [15:0] NEXT_addr;
        input [15:0] NEXT_addr;
 
 
Line 181... Line 412...
                $fflush(TX_FILE);
                $fflush(TX_FILE);
                TX_ERROR = TX_ERROR + 1;
                TX_ERROR = TX_ERROR + 1;
            end
            end
        end
        end
    endtask
    endtask
 
    task CHECK_waitr;
 
        input NEXT_waitr;
 
 
 
        #0 begin
 
            if (NEXT_waitr !== waitr) begin
 
                $display("Error at time=%dns waitr=%b, expected=%b", $time, waitr, NEXT_waitr);
 
                $fdisplay(TX_FILE, "Error at time=%dns waitr=%b, expected=%b", $time, waitr, NEXT_waitr);
 
                $fflush(TX_FILE);
 
                TX_ERROR = TX_ERROR + 1;
 
            end
 
        end
 
    endtask
    task CHECK_r;
    task CHECK_r;
        input [2:0] NEXT_r;
        input [2:0] NEXT_r;
 
 
        #0 begin
        #0 begin
            if (NEXT_r !== r) begin
            if (NEXT_r !== r) begin

powered by: WebSVN 2.1.0

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