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

Subversion Repositories brsfmnce

[/] [brsfmnce/] [trunk/] [Sim/] [tb_BRSFmnCE.v] - Diff between revs 2 and 3

Only display areas with differences | Details | Blame | View Log

Rev 2 Rev 3
`timescale 1ns / 1ps
`timescale 1ns / 1ps
 
 
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Company:         M. A. Morris & Associates
// Company:         M. A. Morris & Associates
// Engineer:        Michael A. Morris
// Engineer:        Michael A. Morris
//
//
// Create Date:     17:33:56 07/27/2008
// Create Date:     17:33:56 07/27/2008
// Design Name:     BRSFmnCE
// Design Name:     BRSFmnCE
// Module Name:     C:/XProjects/ISE10.1i/BRAMFIFO/tb_BRSFmnCE.v
// Module Name:     C:/XProjects/ISE10.1i/BRAMFIFO/tb_BRSFmnCE.v
// Project Name:    BRAMFIFO
// Project Name:    BRAMFIFO
// Target Device:   SRAM-based FPGA: XC3S1400AN-4FGG656I, XC3S700AN-4FGG484I  
// Target Device:   SRAM-based FPGA: XC3S1400AN-4FGG656I, XC3S700AN-4FGG484I  
// Tool versions:   ISE 10.1i SP3  
// Tool versions:   ISE 10.1i SP3  
// Description: 
// Description: 
//
//
// Verilog Test Fixture created by ISE for module: BRSFmnCE
// Verilog Test Fixture created by ISE for module: BRSFmnCE
//
//
// Dependencies:    None
// Dependencies:    None
// 
// 
// Revision:
// Revision:
//
//
//  1.00    08F27   MAM     File Created
//  1.00    08F27   MAM     File Created
//
//
//  1.10    13G12   MAM     Prepared for release on Opencore.com.
//  1.10    13G12   MAM     Prepared for release on Opencore.com.
//
//
// Additional Comments:
// Additional Comments:
// 
// 
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
 
 
module tb_BRSFmnCE;
module tb_BRSFmnCE;
 
 
// Inputs
// Inputs
reg Rst;
reg     Rst;
reg Clk;
reg Clk;
 
 
 
reg     Clr;
 
 
reg WE;
reg WE;
reg RE;
 
reg [7:0] DI;
reg [7:0] DI;
 
 
// Outputs
reg     RE;
wire [7:0] DO;
wire [7:0] DO;
wire ACK;
wire ACK;
 
 
wire FF;
wire FF;
wire AF;
wire    AF;
wire HF;
wire    HF;
wire AE;
wire    AE;
wire EF;
wire EF;
 
 
wire [10:0] Cnt;
wire [10:0] Cnt;
 
 
integer i;
integer i;
 
 
// Instantiate the Unit Under Test (UUT)
// Instantiate the Unit Under Test (UUT)
 
 
BRSFmnCE    uut (
BRSFmnCE    uut (
                .Rst(Rst),
                .Rst(Rst),
                .Clk(Clk),
                .Clk(Clk),
 
 
 
                .Clr(Clr),
 
 
                .WE(WE),
                .WE(WE),
                .DI(DI),
                .DI(DI),
 
 
                .RE(RE),
                .RE(RE),
                .DO(DO),
                .DO(DO),
                .ACK(ACK),
                .ACK(ACK),
 
 
                .FF(FF),
                .FF(FF),
                .AF(AF),
                .AF(AF),
                .HF(HF),
                .HF(HF),
                .AE(AE),
                .AE(AE),
                .EF(EF),
                .EF(EF),
 
 
                .Cnt(Cnt)
                .Cnt(Cnt)
            );
            );
 
 
initial begin
initial begin
    // Initialize Inputs
    // Initialize Inputs
    Rst = 1;
    Rst = 1;
    Clk = 1;
    Clk = 1;
 
    Clr = 0;
    WE = 0;
    WE = 0;
    RE = 0;
    RE  = 0;
    DI = $random(5);
    DI  = $random(5);
 
 
    i = 0;
    i   = 0;
 
 
    // Wait 100 ns for global reset to finish
    // Wait 100 ns for global reset to finish
    #106 Rst = 0;
    #101 Rst = 0;
 
 
    // Add stimulus here
    // Add stimulus here
 
 
    while (AF != 1) begin
    while (AF != 1) begin
        @(posedge Clk) #1;
        @(posedge Clk) #1;
        if(AF != 1) begin
        if(AF != 1) begin
            DI = $random;
            DI = $random;
            WE = ~FF;
            WE = ~FF;
            i = i + 1;
            i = i + 1;
        end
        end
    end
    end
 
 
    WE = 0; DI = 0;
    WE = 0; DI = 0;
 
 
    RE = ~EF;
    RE = ~EF;
    while (AE != 1) begin
    while (AE != 1) begin
        @(posedge Clk) #1;
        @(posedge Clk) #1;
        if (AE != 1) begin
        if (AE != 1) begin
            RE = ~EF;
            RE = ~EF;
            i = i - 1;
            i = i - 1;
        end
        end
    end
    end
    RE = 0; i = i - 1;
    RE = 0; i = i - 1;
 
 
    @(negedge ACK);
    @(negedge ACK);
    @(posedge Clk) #1; WE = 1; DI = $random; i = i + 1;
    @(posedge Clk) #1; WE = 1; DI = $random; i = i + 1;
    @(posedge Clk) #1; WE = 0;
    @(posedge Clk) #1; WE = 0;
 
 
    @(posedge Clk) #1; RE = 1;
    @(posedge Clk) #1; RE = 1;
    @(posedge Clk) #1; RE = 0; i = i - 1;
    @(posedge Clk) #1; RE = 0; i = i - 1;
 
 
end
end
 
 
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
//
//  Clock
//  Clock
//
//
 
 
    always #5 Clk = ~Clk;
    always #5 Clk = ~Clk;
 
 
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
 
 
endmodule
endmodule
 
 
 
 

powered by: WebSVN 2.1.0

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