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

Subversion Repositories next186_soc_pc

[/] [next186_soc_pc/] [trunk/] [HW/] [unit186.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ndumitrach
//////////////////////////////////////////////////////////////////////////////////
2
//
3
// This file is part of the Next186 Soc PC project
4
// http://opencores.org/project,next186
5
//
6
// Filename: unit186.v
7
// Description: Part of the Next186 SoC PC project, 80186 unit (CPU + BIU)
8
// Version 1.0
9
// Creation date: Mar2012
10
//
11
// Author: Nicolae Dumitrache 
12
// e-mail: ndumitrache@opencores.org
13
//
14
/////////////////////////////////////////////////////////////////////////////////
15
// 
16
// Copyright (C) 2012 Nicolae Dumitrache
17
// 
18
// This source file may be used and distributed without 
19
// restriction provided that this copyright statement is not 
20
// removed from the file and that any derivative work contains 
21
// the original copyright notice and the associated disclaimer.
22
// 
23
// This source file is free software; you can redistribute it 
24
// and/or modify it under the terms of the GNU Lesser General 
25
// Public License as published by the Free Software Foundation;
26
// either version 2.1 of the License, or (at your option) any 
27
// later version. 
28
// 
29
// This source is distributed in the hope that it will be 
30
// useful, but WITHOUT ANY WARRANTY; without even the implied 
31
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
32
// PURPOSE. See the GNU Lesser General Public License for more 
33
// details. 
34
// 
35
// You should have received a copy of the GNU Lesser General 
36
// Public License along with this source; if not, download it 
37
// from http://www.opencores.org/lgpl.shtml 
38
// 
39
///////////////////////////////////////////////////////////////////////////////////
40
// Additional Comments: 
41
//
42
//////////////////////////////////////////////////////////////////////////////////
43
 
44
`timescale 1ns / 1ps
45
 
46
module unit186(
47
                input [15:0]INPORT,
48
                input [31:0]DIN,
49
                output [15:0]CPU_DOUT,
50
                output [31:0]DOUT,
51
                output [19:0]ADDR,
52
                output [3:0]WMASK,
53
                output [15:0]PORT_ADDR,
54
//              output [47:0]CPU_INSTR,
55
 
56
                input CLK,
57
                input CE,
58
                output CPU_CE,
59
                input INTR,
60
                input NMI,
61
                input RST,
62
                output INTA,
63
                output LOCK,
64
                output HALT,
65
                output MREQ,
66
                output IORQ,
67
                output WR,
68
                output WORD
69
    );
70
 
71
        wire [15:0] CPU_DIN;
72
        wire [19:0] CPU_IADDR;
73
        wire [19:0] CPU_ADDR;
74
        wire [47:0] CPU_INSTR;
75
        wire CPU_MREQ; // CPU memory request
76
        wire IFETCH;
77
        wire FLUSH;
78
        wire [2:0]ISIZE;
79
        wire CE_186;
80
        assign ADDR[1:0] = CPU_ADDR[1:0];
81
        assign CPU_CE = CE_186 & CE;
82
        assign PORT_ADDR = CPU_ADDR[15:0];
83
 
84
        Next186_CPU cpu
85
        (
86
                 .ADDR(CPU_ADDR),
87
                 .DIN(IORQ | INTA ? INPORT : CPU_DIN),
88
                 .DOUT(CPU_DOUT),
89
                 .CLK(CLK),
90
                 .CE(CPU_CE),
91
                 .INTR(INTR),
92
                 .NMI(NMI),
93
                 .RST(RST),
94
                 .MREQ(CPU_MREQ),
95
                 .IORQ(IORQ),
96
                 .INTA(INTA),
97
                 .WR(WR),
98
                 .WORD(WORD),
99
                 .LOCK(LOCK),
100
                 .IADDR(CPU_IADDR),
101
                 .INSTR(CPU_INSTR),
102
                 .IFETCH(IFETCH),
103
                 .FLUSH(FLUSH),
104
                 .ISIZE(ISIZE),
105
                 .HALT(HALT)
106
   );
107
 
108
 
109
        BIU186_32bSync_2T_DelayRead BIU
110
        (
111
                 .CLK(CLK),
112
                 .INSTR(CPU_INSTR),
113
                 .ISIZE(ISIZE),
114
                 .IFETCH(IFETCH),
115
                 .FLUSH(FLUSH),
116
                 .MREQ(CPU_MREQ),
117
                 .WR(WR),
118
                 .WORD(WORD),
119
                 .ADDR(CPU_ADDR),
120
                 .IADDR(CPU_IADDR),
121
                 .CE186(CE_186),
122
                 .RAM_DIN(DIN),
123
                 .RAM_DOUT(DOUT),
124
                 .RAM_ADDR(ADDR[19:2]),
125
                 .RAM_MREQ(MREQ),
126
                 .RAM_WMASK(WMASK),
127
                 .DOUT(CPU_DIN),
128
                 .DIN(CPU_DOUT),
129
                 .CE(CE)
130
        );
131
 
132
endmodule

powered by: WebSVN 2.1.0

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