1 |
19 |
sybreon |
/*
|
2 |
|
|
* $Id: aeMB_ucore.v,v 1.1 2007-04-13 13:02:34 sybreon Exp $
|
3 |
|
|
*
|
4 |
|
|
* AEMB Unified 32-bit Microprocessor Core
|
5 |
|
|
* Copyright (C) 2006-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
6 |
|
|
*
|
7 |
|
|
* This library is free software; you can redistribute it and/or modify it
|
8 |
|
|
* under the terms of the GNU Lesser General Public License as published by
|
9 |
|
|
* the Free Software Foundation; either version 2.1 of the License,
|
10 |
|
|
* or (at your option) any later version.
|
11 |
|
|
*
|
12 |
|
|
* This library is distributed in the hope that it will be useful, but
|
13 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
14 |
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
15 |
|
|
* License for more details.
|
16 |
|
|
*
|
17 |
|
|
* You should have received a copy of the GNU Lesser General Public License
|
18 |
|
|
* along with this library; if not, write to the Free Software Foundation, Inc.,
|
19 |
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
20 |
|
|
*
|
21 |
|
|
* DESCRIPTION
|
22 |
|
|
* This is the top level core with integrated cache and unified memory.
|
23 |
|
|
*
|
24 |
|
|
* HISTORY
|
25 |
|
|
* $Log: not supported by cvs2svn $
|
26 |
|
|
*/
|
27 |
|
|
|
28 |
|
|
// 691@60
|
29 |
|
|
module aeMB_ucore (/*AUTOARG*/
|
30 |
|
|
// Outputs
|
31 |
|
|
wb_wre_o, wb_stb_o, wb_sel_o, wb_dat_o, wb_adr_o,
|
32 |
|
|
// Inputs
|
33 |
|
|
wb_dat_i, wb_ack_i, sys_rst_i, sys_int_i, sys_exc_i, sys_clk_i
|
34 |
|
|
);
|
35 |
|
|
/* Bus Address Width */
|
36 |
|
|
parameter ASIZ = 32;
|
37 |
|
|
parameter CSIZ = 7;
|
38 |
|
|
/* DO NOT TOUCH */
|
39 |
|
|
parameter DSIZ = ASIZ;
|
40 |
|
|
parameter ISIZ = ASIZ;
|
41 |
|
|
|
42 |
|
|
/*AUTOOUTPUT*/
|
43 |
|
|
// Beginning of automatic outputs (from unused autoinst outputs)
|
44 |
|
|
output [ASIZ-1:0] wb_adr_o; // From wbbus of aeMB_wbbus.v
|
45 |
|
|
output [31:0] wb_dat_o; // From wbbus of aeMB_wbbus.v
|
46 |
|
|
output [3:0] wb_sel_o; // From wbbus of aeMB_wbbus.v
|
47 |
|
|
output wb_stb_o; // From wbbus of aeMB_wbbus.v
|
48 |
|
|
output wb_wre_o; // From wbbus of aeMB_wbbus.v
|
49 |
|
|
// End of automatics
|
50 |
|
|
/*AUTOINPUT*/
|
51 |
|
|
// Beginning of automatic inputs (from unused autoinst inputs)
|
52 |
|
|
input sys_clk_i; // To wbbus of aeMB_wbbus.v, ...
|
53 |
|
|
input sys_exc_i; // To cpu of aeMB_core.v
|
54 |
|
|
input sys_int_i; // To cpu of aeMB_core.v
|
55 |
|
|
input sys_rst_i; // To wbbus of aeMB_wbbus.v, ...
|
56 |
|
|
input wb_ack_i; // To wbbus of aeMB_wbbus.v
|
57 |
|
|
input [31:0] wb_dat_i; // To wbbus of aeMB_wbbus.v
|
58 |
|
|
// End of automatics
|
59 |
|
|
/*AUTOWIRE*/
|
60 |
|
|
// Beginning of automatic wires (for undeclared instantiated-module outputs)
|
61 |
|
|
wire dwb_ack_i; // From wbbus of aeMB_wbbus.v
|
62 |
|
|
wire [DSIZ-1:0] dwb_adr_o; // From cpu of aeMB_core.v
|
63 |
|
|
wire [31:0] dwb_dat_i; // From wbbus of aeMB_wbbus.v
|
64 |
|
|
wire [31:0] dwb_dat_o; // From cpu of aeMB_core.v
|
65 |
|
|
wire dwb_stb_o; // From cpu of aeMB_core.v
|
66 |
|
|
wire dwb_we_o; // From cpu of aeMB_core.v
|
67 |
|
|
wire iwb_ack_i; // From wbbus of aeMB_wbbus.v
|
68 |
|
|
wire [ISIZ-1:0] iwb_adr_o; // From cpu of aeMB_core.v
|
69 |
|
|
wire [31:0] iwb_dat_i; // From wbbus of aeMB_wbbus.v
|
70 |
|
|
wire iwb_stb_o; // From cpu of aeMB_core.v
|
71 |
|
|
// End of automatics
|
72 |
|
|
|
73 |
|
|
aeMB_wbbus #(ASIZ, CSIZ, ISIZ, DSIZ)
|
74 |
|
|
wbbus (/*AUTOINST*/
|
75 |
|
|
// Outputs
|
76 |
|
|
.wb_adr_o (wb_adr_o[ASIZ-1:0]),
|
77 |
|
|
.wb_dat_o (wb_dat_o[31:0]),
|
78 |
|
|
.wb_sel_o (wb_sel_o[3:0]),
|
79 |
|
|
.wb_stb_o (wb_stb_o),
|
80 |
|
|
.wb_wre_o (wb_wre_o),
|
81 |
|
|
.dwb_ack_i (dwb_ack_i),
|
82 |
|
|
.dwb_dat_i (dwb_dat_i[31:0]),
|
83 |
|
|
.iwb_ack_i (iwb_ack_i),
|
84 |
|
|
.iwb_dat_i (iwb_dat_i[31:0]),
|
85 |
|
|
// Inputs
|
86 |
|
|
.wb_dat_i (wb_dat_i[31:0]),
|
87 |
|
|
.wb_ack_i (wb_ack_i),
|
88 |
|
|
.dwb_adr_o (dwb_adr_o[DSIZ-1:0]),
|
89 |
|
|
.dwb_dat_o (dwb_dat_o[31:0]),
|
90 |
|
|
.dwb_stb_o (dwb_stb_o),
|
91 |
|
|
.dwb_we_o (dwb_we_o),
|
92 |
|
|
.iwb_adr_o (iwb_adr_o[ISIZ-1:0]),
|
93 |
|
|
.iwb_stb_o (iwb_stb_o),
|
94 |
|
|
.sys_clk_i (sys_clk_i),
|
95 |
|
|
.sys_rst_i (sys_rst_i));
|
96 |
|
|
|
97 |
|
|
aeMB_core #(ISIZ, DSIZ)
|
98 |
|
|
cpu (/*AUTOINST*/
|
99 |
|
|
// Outputs
|
100 |
|
|
.dwb_adr_o (dwb_adr_o[DSIZ-1:0]),
|
101 |
|
|
.dwb_dat_o (dwb_dat_o[31:0]),
|
102 |
|
|
.dwb_stb_o (dwb_stb_o),
|
103 |
|
|
.dwb_we_o (dwb_we_o),
|
104 |
|
|
.iwb_adr_o (iwb_adr_o[ISIZ-1:0]),
|
105 |
|
|
.iwb_stb_o (iwb_stb_o),
|
106 |
|
|
// Inputs
|
107 |
|
|
.dwb_ack_i (dwb_ack_i),
|
108 |
|
|
.dwb_dat_i (dwb_dat_i[31:0]),
|
109 |
|
|
.iwb_ack_i (iwb_ack_i),
|
110 |
|
|
.iwb_dat_i (iwb_dat_i[31:0]),
|
111 |
|
|
.sys_clk_i (sys_clk_i),
|
112 |
|
|
.sys_exc_i (sys_exc_i),
|
113 |
|
|
.sys_int_i (sys_int_i),
|
114 |
|
|
.sys_rst_i (sys_rst_i));
|
115 |
|
|
|
116 |
|
|
endmodule // aeMB_ucore
|