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

Subversion Repositories 8051

[/] [8051/] [tags/] [rel_12/] [syn/] [src/] [verilog/] [oc8051_fpga_top.v] - Blame information for rev 186

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 71 simont
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  8051 fpga top module                                        ////
4
////                                                              ////
5
////  This file is part of the 8051 cores project                 ////
6
////  http://www.opencores.org/cores/8051/                        ////
7
////                                                              ////
8
////  Description                                                 ////
9
////   fpga top module                                            ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////   Nothing                                                    ////
13
////                                                              ////
14
////  Author(s):                                                  ////
15
////      - Simon Teran, simont@opencores.org                     ////
16
////                                                              ////
17
//////////////////////////////////////////////////////////////////////
18
////                                                              ////
19
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
20
////                                                              ////
21
//// This source file may be used and distributed without         ////
22
//// restriction provided that this copyright statement is not    ////
23
//// removed from the file and that any derivative work contains  ////
24
//// the original copyright notice and the associated disclaimer. ////
25
////                                                              ////
26
//// This source file is free software; you can redistribute it   ////
27
//// and/or modify it under the terms of the GNU Lesser General   ////
28
//// Public License as published by the Free Software Foundation; ////
29
//// either version 2.1 of the License, or (at your option) any   ////
30
//// later version.                                               ////
31
////                                                              ////
32
//// This source is distributed in the hope that it will be       ////
33
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
34
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
35
//// PURPOSE.  See the GNU Lesser General Public License for more ////
36
//// details.                                                     ////
37
////                                                              ////
38
//// You should have received a copy of the GNU Lesser General    ////
39
//// Public License along with this source; if not, download it   ////
40
//// from http://www.opencores.org/lgpl.shtml                     ////
41
////                                                              ////
42
//////////////////////////////////////////////////////////////////////
43
//
44
// CVS Revision History
45
//
46
// $Log: not supported by cvs2svn $
47
// Revision 1.3  2002/09/30 17:34:02  simont
48
// prepared header
49
//
50
//
51
 
52
// synopsys translate_off
53
`include "oc8051_timescale.v"
54
// synopsys translate_on
55
 
56
module oc8051_fpga_top (clk, rst,
57
//
58
// interrupt interface
59
//
60
   int1, int2,
61
//
62
// 2x7 led display output (port 0)
63
//
64
   dispout,
65
//
66
// ports
67
//
68
   p0_out, p1_out, p2_out, p3_out,
69
//
70
// external instruction rom interface
71
//
72
   ea, iadr_o, istb_o, iack_i, icyc_o, idat_i,
73
//
74
// external data ram interface
75
//
76
   stb_o, cyc_o, dat_i, dat_o, adr_o, ack_i, we_o,
77
//
78
// serial interface
79
//
80
   rxd, txd,
81
//
82
// timer/counter interface
83
//
84
   t0, t1);
85
 
86
input clk, rst, int1, int2, ea, iack_i, ack_i, rxd, t0, t1;
87
input [7:0] dat_i;
88
input [31:0] idat_i;
89
output txd, istb_o, icyc_o, stb_o, cyc_o, we_o;
90
output [13:0] dispout;
91
output [7:0] p0_out, p1_out, p2_out, p3_out, dat_o;
92
output [15:0] adr_o, iadr_o;
93
 
94
 
95
wire cstb_o, ccyc_o, cack_i;
96
wire [15:0] cadr_o;
97
wire [31:0] cdat_i;
98
 
99
 
100
wire nrst;
101
 
102
assign nrst = ~rst;
103
 
104
oc8051_top oc8051_top_1(.rst(nrst), .clk(clk),
105
//
106
// interrupt interface
107
//
108
    .int0(int1), .int1(int2),
109
//
110
// external rom interface
111
//
112
    .ea(ea), .iadr_o(cadr_o),  .idat_i(cdat_i), .istb_o(cstb_o), .iack_i(cack_i), .icyc_o(ccyc_o),
113
//
114
// external ram interface
115
//
116
    .dat_i(dat_i), .dat_o(dat_o), .adr_o(adr_o), .we_o(we_o), .ack_i(ack_i), .stb_o(stb_o),
117
    .cyc_o(cyc_o),
118
//
119
//  ports interface
120
//
121
     .p0_in(8'hb0), .p1_in(8'hb1), .p2_in(8'hb2), .p3_in(8'hb3),
122
     .p0_out(p0_out), .p1_out(p1_out), .p2_out(p2_out), .p3_out(p3_out),
123
//
124
// serial interface
125
//
126
     .rxd(rxd), .txd(txd),
127
//
128
// timer/counter interface
129
//
130
     .t0(t0), .t1(t1));
131
 
132
 
133
 
134
 
135
 
136
oc8051_icache oc8051_icache1(.rst(rst), .clk(clk),
137
// oc8051
138
        .adr_i(cadr_o), .dat_o(cdat_i), .stb_i(cstb_o), .ack_o(cack_i),
139
        .cyc_i(ccyc_o),
140
// external rom
141
        .dat_i(idat_i), .stb_o(istb_o), .adr_o(iadr_o), .ack_i(iack_i),
142
        .cyc_o(icyc_o));
143
 
144
 
145
defparam oc8051_icache1.ADR_WIDTH = 6;  // cache address wihth
146
defparam oc8051_icache1.LINE_WIDTH = 3; // line address width (2 => 4x32)
147
defparam oc8051_icache1.BL_NUM = 7; // number of blocks (2^BL_WIDTH-1); BL_WIDTH = ADR_WIDTH - LINE_WIDTH
148
defparam oc8051_icache1.CACHE_RAM = 64; // cache ram x 32 (2^ADR_WIDTH)
149
 
150
 
151
 
152
  disp disp1(.in(p0_out), .out(dispout));
153
 
154
endmodule

powered by: WebSVN 2.1.0

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