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

Subversion Repositories 8051

[/] [8051/] [tags/] [rel_12/] [bench/] [verilog/] [oc8051_tb.v] - Diff between revs 103 and 111

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

Rev 103 Rev 111
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.9  2003/04/02 15:08:59  simont
 
// rename signals
 
//
// Revision 1.8  2003/01/13 14:35:25  simont
// Revision 1.8  2003/01/13 14:35:25  simont
// remove wb_bus_mon
// remove wb_bus_mon
//
//
// Revision 1.7  2002/10/28 16:43:12  simont
// Revision 1.7  2002/10/28 16:43:12  simont
// add module oc8051_wb_iinterface
// add module oc8051_wb_iinterface
Line 130... Line 133...
                  .txd(rxd), .ow(p3_out[1]), .intr(int_uart), .stb(stb_o), .ack(ack_uart));
                  .txd(rxd), .ow(p3_out[1]), .intr(int_uart), .stb(stb_o), .ack(ack_uart));
 
 
//
//
// exteranl program rom
// exteranl program rom
//
//
//    cache
 
//
 
//
 
wire istb_i, icyc_i, iack_o;
 
wire [15:0] iadr_i;
 
wire [31:0] idat_o;
 
 
 
`ifdef OC8051_CACHE
 
 
 
 
 
oc8051_icache oc8051_icache1(.rst(rst), .clk(clk),
 
// oc8051
 
        .adr_i(iadr_o), .dat_o(idat_i), .stb_i(istb_o), .ack_o(iack_i),
 
        .cyc_i(icyc_o),
 
// external rom
 
        .dat_i(idat_o), .stb_o(istb_i), .adr_o(iadr_i), .ack_i(iack_o),
 
        .cyc_o(icyc_i));
 
 
 
oc8051_xrom oc8051_xrom1(.rst(rst), .clk(clk), .addr(iadr_i), .data(idat_o),
 
             .stb_i(istb_i), .cyc_i(icyc_i), .ack_o(iack_o));
 
 
 
defparam oc8051_icache1.ADR_WIDTH = 7;  // cache address wihth
 
defparam oc8051_icache1.LINE_WIDTH = 2; // line address width (2 => 4x32)
 
defparam oc8051_icache1.BL_NUM = 15; // number of blocks (2^BL_WIDTH-1); BL_WIDTH = ADR_WIDTH - LINE_WIDTH
 
defparam oc8051_icache1.CACHE_RAM = 128; // cache ram x 32 (2^ADR_WIDTH)
 
 
 
 
 
//
 
//    no cache
 
//
 
`else
 
 
 
oc8051_wb_iinterface oc8051_wb_iinterface(.rst(rst), .clk(clk),
 
// oc8051
 
        .adr_i(iadr_o), .dat_o(idat_i), .stb_i(istb_o), .ack_o(iack_i),
 
        .cyc_i(icyc_o),
 
// external rom
 
        .dat_i(idat_o), .stb_o(istb_i), .adr_o(iadr_i), .ack_i(iack_o),
 
        .cyc_o(icyc_i));
 
 
 
oc8051_xrom oc8051_xrom1(.rst(rst), .clk(clk), .addr(iadr_i), .data(idat_o),
oc8051_xrom oc8051_xrom1(.rst(rst), .clk(clk), .addr(iadr_o), .data(idat_i),
             .stb_i(istb_i), .cyc_i(icyc_i), .ack_o(iack_o));
             .stb_i(istb_o), .cyc_i(icyc_o), .ack_o(iack_i));
 
 
 
 
`endif
 
//
//
//
//
//
//
 
 
defparam oc8051_xrom1.DELAY = 5;
defparam oc8051_xrom1.DELAY = 5;
Line 215... Line 178...
  p1_in = 8'h00;
  p1_in = 8'h00;
  p2_in = 8'h00;
  p2_in = 8'h00;
#220
#220
  rst = 1'b0;
  rst = 1'b0;
 
 
#7000000
#40000000
  $fclose(log_file);
  $fclose(log_file);
  $display("time ",$time, "\n faulire: end of time\n \n");
  $display("time ",$time, "\n faulire: end of time\n \n");
  $finish;
  $finish;
end
end
 
 
 
 
initial
initial
begin
begin
  clk = 0;
  clk = 0;
  forever #70 clk <= ~clk;
  forever #30 clk <= ~clk;
end
end
 
 
 
 
 
 
initial
initial

powered by: WebSVN 2.1.0

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