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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [fpga/] [mc/] [src/] [cpu/] [cpu.v] - Blame information for rev 333

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 hellwig
//
2
// cpu.v -- the ECO32 CPU
3
//
4
 
5
 
6 290 hellwig
`timescale 1ns/10ps
7
`default_nettype none
8 27 hellwig
 
9
 
10 290 hellwig
module cpu(clk, rst,
11
           bus_stb, bus_we, bus_addr,
12
           bus_din, bus_dout, bus_ack,
13
           bus_irq);
14
    input clk;                          // system clock
15
    input rst;                          // system reset
16
    output bus_stb;                     // bus strobe
17
    output bus_we;                      // bus write enable
18
    output [31:2] bus_addr;             // bus address (word address)
19
    input [31:0] bus_din;                // bus data input, for reads
20
    output [31:0] bus_dout;              // bus data output, for writes
21
    input bus_ack;                      // bus acknowledge
22
    input [15:0] bus_irq;                // bus interrupt requests
23 27 hellwig
 
24 290 hellwig
  wire cpu_stb;
25
  wire cpu_we;
26
  wire [1:0] cpu_size;
27
  wire [31:0] cpu_addr;
28
  wire [31:0] cpu_din;
29
  wire [31:0] cpu_dout;
30
  wire cpu_ack;
31
  wire [15:0] cpu_irq;
32 27 hellwig
 
33 290 hellwig
  cpu_bus cpu_bus_1(
34
    .clk(clk),
35
    .rst(rst),
36
    .bus_stb(bus_stb),
37
    .bus_we(bus_we),
38
    .bus_addr(bus_addr[31:2]),
39
    .bus_din(bus_din[31:0]),
40
    .bus_dout(bus_dout[31:0]),
41
    .bus_ack(bus_ack),
42
    .bus_irq(bus_irq[15:0]),
43
    .cpu_stb(cpu_stb),
44
    .cpu_we(cpu_we),
45
    .cpu_size(cpu_size[1:0]),
46
    .cpu_addr(cpu_addr[31:0]),
47
    .cpu_din(cpu_din[31:0]),
48
    .cpu_dout(cpu_dout[31:0]),
49
    .cpu_ack(cpu_ack),
50
    .cpu_irq(cpu_irq[15:0])
51
  );
52 27 hellwig
 
53 290 hellwig
  cpu_core cpu_core_1(
54
    .clk(clk),
55
    .rst(rst),
56
    .bus_stb(cpu_stb),
57
    .bus_we(cpu_we),
58
    .bus_size(cpu_size[1:0]),
59
    .bus_addr(cpu_addr[31:0]),
60
    .bus_din(cpu_din[31:0]),
61
    .bus_dout(cpu_dout[31:0]),
62
    .bus_ack(cpu_ack),
63
    .bus_irq(cpu_irq[15:0])
64
  );
65 27 hellwig
 
66
endmodule

powered by: WebSVN 2.1.0

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