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

Subversion Repositories mips789

[/] [mips789/] [branches/] [avendor/] [rtl/] [verilog/] [altera/] [mips_top.v] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 10 mcupro
module mips_top (
2
 input clk,
3
 input rst,
4
 input ser_rxd,
5
 output ser_txd,
6
 output [6:0]seg7led1,
7
 output [6:0]seg7led2,
8
 output [7:0] lcd_data,
9
 output lcd_rs,
10
 output lcd_rw,
11
 output lcd_en,
12
 output led1,
13
 output led2,
14
 input  key1,
15
 input  key2
16
);
17
 
18
wire [31:0] data2core;
19
wire [31:0] data2mem;
20
wire [31:0] ins2core;
21
wire [31:0] mem_Addr;
22
wire [31:0] pc;
23
wire [3:0] wr_en;
24
wire CLK;
25 15 mcupro
reg r_rst;
26
 
27 10 mcupro
 
28 15 mcupro
//wire sys_rst=rst;     
29
always @(posedge CLK)
30
if (rst) r_rst<=1'b1; else r_rst<=1'b0;
31
//wire sys_rst = r_rst;  
32
 
33
reg rr_rst;
34
always @(posedge CLK)
35
rr_rst<=r_rst;
36 10 mcupro
 
37 15 mcupro
wire sys_rst = rr_rst;
38 10 mcupro
 
39 15 mcupro
//assign CLK = clk;
40
 
41
 pll50 Ipll(
42 10 mcupro
        .inclk0(clk),
43
        .c0(CLK)
44
        );
45 15 mcupro
 
46 10 mcupro
mem_array ram_8k
47
(
48
        .clk(CLK),
49
        .din(data2mem),
50
        .dout(data2core),
51
        .ins_o(ins2core),
52
        .pc_i(pc),
53
        .rd_addr_i(mem_Addr),
54
        .wr_addr_i(mem_Addr),
55
        .wren(wr_en)
56
);
57
 
58 15 mcupro
mips_sys isys
59 10 mcupro
(
60
 
61
        .zz_addr_o(mem_Addr),
62
        .zz_din(data2core),
63
        .zz_dout(data2mem),
64
        .zz_ins_i(ins2core),
65
        .zz_pc_o(pc),
66
        .zz_wr_en_o(wr_en),
67
 
68
  .clk(CLK),
69
  .rst(sys_rst),
70
 
71
  .ser_rxd(ser_rxd),
72
  .ser_txd(ser_txd),
73
 
74
  .seg7led1(seg7led1),
75
  .seg7led2(seg7led2),
76
 
77
        .lcd_data(lcd_data),
78
        .lcd_rs(lcd_rs),
79
        .lcd_rw(lcd_rw),
80
        .lcd_en(lcd_en),
81
 
82
        .led1(led1),
83
        .led2(led2),
84
 
85
        .key1(key1),
86
        .key2(key2)
87
);
88
 
89 15 mcupro
endmodule

powered by: WebSVN 2.1.0

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