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

Subversion Repositories 8051

[/] [8051/] [tags/] [rel_2/] [bench/] [verilog/] [oc8051_tb.v] - Diff between revs 165 and 166

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

Rev 165 Rev 166
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.14  2003/06/05 12:54:38  simont
 
// remove dumpvars.
 
//
// Revision 1.13  2003/06/05 11:13:39  simont
// Revision 1.13  2003/06/05 11:13:39  simont
// add FREQ paremeter.
// add FREQ paremeter.
//
//
// Revision 1.12  2003/04/16 09:55:56  simont
// Revision 1.12  2003/04/16 09:55:56  simont
// add support for external rom from xilinx ramb4
// add support for external rom from xilinx ramb4
Line 312... Line 315...
  clk = 0;
  clk = 0;
  forever #DELAY clk <= ~clk;
  forever #DELAY clk <= ~clk;
end
end
 
 
 
 
 
always @(ext_addr or write or stb_o or data_out)
initial
 
  $readmemh("../../../bench/vec/oc8051_test.vec", buff);
 
 
 
initial
 
  $readmemb("../oc8051_ea.in", ea);
 
 
 
 
 
initial num= 0;
 
 
 
always @(p0_out or p1_out or p2_out)
 
begin
 
  if ({p0_out, p1_out, p2_out} != buff[num])
 
  begin
  begin
    $display("time ",$time, " faulire: mismatch on ports in step %d", num);
  if ((ext_addr==16'h0010) & write & stb_o) begin
    $display(" p0_out %h", p0_out, " p1_out %h", p1_out, " p2_out %h", p2_out);
    if (data_out==8'h7f) begin
    $display(" testvecp %h", buff[num]);
      $display("");
    $display(" p_out   %h%h%h", p0_out, p1_out, p2_out);
      $display("time ",$time, " Passed");
#22
 
    $finish;
    $finish;
  end
 
  else begin
    end else begin
    $display("time ",$time, " step %d", num, ": pass");
 
    num =  num+1;
 
    if (buff[num]===24'hxxxxxx)
 
    begin
 
      $display("");
      $display("");
      $display(" Done!");
      $display("time ",$time," Error: %h", data_out);
      $finish;
      $finish;
    end
    end
  end
  end
end
end
 
 
 
 
 
 
endmodule
endmodule
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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