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

Subversion Repositories 8051

[/] [8051/] [tags/] [rel_12/] [syn/] [src/] [verilog/] [oc8051_fpga_top.v] - Diff between revs 46 and 71

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

Rev 46 Rev 71
Line 42... Line 42...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.3  2002/09/30 17:34:02  simont
 
// prepared header
 
//
//
//
 
 
// synopsys translate_off
// synopsys translate_off
`include "oc8051_timescale.v"
`include "oc8051_timescale.v"
// synopsys translate_on
// synopsys translate_on
 
 
module oc8051_fpga_top (clk, rst, int1, int2, dispout, p0_out, p1_out, p2_out, p3_out, data_out, ext_addr, rom_addr,
module oc8051_fpga_top (clk, rst,
                      rxd, txd, t0, t1);
//
 
// interrupt interface
 
//
 
   int1, int2,
 
//
 
// 2x7 led display output (port 0)
 
//
 
   dispout,
 
//
 
// ports
 
//
 
   p0_out, p1_out, p2_out, p3_out,
 
//
 
// external instruction rom interface
 
//
 
   ea, iadr_o, istb_o, iack_i, icyc_o, idat_i,
 
//
 
// external data ram interface
 
//
 
   stb_o, cyc_o, dat_i, dat_o, adr_o, ack_i, we_o,
 
//
 
// serial interface
 
//
 
   rxd, txd,
 
//
 
// timer/counter interface
 
//
 
   t0, t1);
 
 
input clk, rst, int1, int2, rxd, t0, t1;
input clk, rst, int1, int2, ea, iack_i, ack_i, rxd, t0, t1;
output txd;
input [7:0] dat_i;
 
input [31:0] idat_i;
 
output txd, istb_o, icyc_o, stb_o, cyc_o, we_o;
output [13:0] dispout;
output [13:0] dispout;
output [7:0] p0_out, p1_out, p2_out, p3_out, data_out;
output [7:0] p0_out, p1_out, p2_out, p3_out, dat_o;
output [15:0] ext_addr, rom_addr;
output [15:0] adr_o, iadr_o;
 
 
 
 
 
wire cstb_o, ccyc_o, cack_i;
 
wire [15:0] cadr_o;
 
wire [31:0] cdat_i;
 
 
 
 
wire write, stb_o, cyc_o;
 
wire [7:0] data_out, op1, op2, op3;
 
wire nrst;
wire nrst;
 
 
assign nrst = ~rst;
assign nrst = ~rst;
 
 
assign op1 = 8'h00;
oc8051_top oc8051_top_1(.rst(nrst), .clk(clk),
assign op2 = 8'h00;
//
assign op3 = 8'h00;
// interrupt interface
 
//
oc8051_top oc8051_top_1(.rst(nrst), .clk(clk), .int0(int1), .int1(int2), .ea(1'b1), .rom_addr(rom_addr), .dat_i(8'h00), .dat_o(data_out),
    .int0(int1), .int1(int2),
         .op1(op1), .op2(op2), .op3(op3), .adr_o(ext_addr), .we_o(write), .ack_i(1'b1), .stb_o(stb_o), .cyc_o(cyc_o),
//
         .p0_in(8'hb0), .p1_in(8'hb1), .p2_in(8'hb2), .p3_in(8'hb3), .p0_out(p0_out),
// external rom interface
         .p1_out(p1_out), .p2_out(p2_out), .p3_out(p3_out), .rxd(rxd), .txd(txd), .t0(t0), .t1(t1));
//
 
    .ea(ea), .iadr_o(cadr_o),  .idat_i(cdat_i), .istb_o(cstb_o), .iack_i(cack_i), .icyc_o(ccyc_o),
 
//
 
// external ram interface
 
//
 
    .dat_i(dat_i), .dat_o(dat_o), .adr_o(adr_o), .we_o(we_o), .ack_i(ack_i), .stb_o(stb_o),
 
    .cyc_o(cyc_o),
 
//
 
//  ports interface
 
//
 
     .p0_in(8'hb0), .p1_in(8'hb1), .p2_in(8'hb2), .p3_in(8'hb3),
 
     .p0_out(p0_out), .p1_out(p1_out), .p2_out(p2_out), .p3_out(p3_out),
 
//
 
// serial interface
 
//
 
     .rxd(rxd), .txd(txd),
 
//
 
// timer/counter interface
 
//
 
     .t0(t0), .t1(t1));
 
 
 
 
 
 
 
 
 
 
 
oc8051_icache oc8051_icache1(.rst(rst), .clk(clk),
 
// oc8051
 
        .adr_i(cadr_o), .dat_o(cdat_i), .stb_i(cstb_o), .ack_o(cack_i),
 
        .cyc_i(ccyc_o),
 
// external rom
 
        .dat_i(idat_i), .stb_o(istb_o), .adr_o(iadr_o), .ack_i(iack_i),
 
        .cyc_o(icyc_o));
 
 
 
 
 
defparam oc8051_icache1.ADR_WIDTH = 6;  // cache address wihth
 
defparam oc8051_icache1.LINE_WIDTH = 3; // line address width (2 => 4x32)
 
defparam oc8051_icache1.BL_NUM = 7; // number of blocks (2^BL_WIDTH-1); BL_WIDTH = ADR_WIDTH - LINE_WIDTH
 
defparam oc8051_icache1.CACHE_RAM = 64; // cache ram x 32 (2^ADR_WIDTH)
 
 
 
 
 
 
  disp disp1(.in(p0_out), .out(dispout));
  disp disp1(.in(p0_out), .out(dispout));
 
 
endmodule
endmodule

powered by: WebSVN 2.1.0

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