OpenCores
URL https://opencores.org/ocsvn/a-z80/a-z80/trunk

Subversion Repositories a-z80

[/] [a-z80/] [trunk/] [cpu/] [toplevel/] [z80.svh] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 gdevic
//============================================================================
2
// Z80 Top level interface
3
//============================================================================
4
`ifndef Z80_IFC
5
`define Z80_IFC
6
 
7
`timescale 100 ns/ 100 ns
8
 
9
// Define set and clear for the negative logic pins
10
`define CLR 1
11
`define SET 0
12
 
13
interface z80_if (input logic CLK);
14
    logic nM1, nMREQ, nIORQ, nRD, nWR, nRFSH, nHALT, nBUSACK;
15
    logic nWAIT, nINT, nNMI, nRESET, nBUSRQ;
16
    logic [15:0] A;
17
    wire  [7:0] D;
18
 
19
//=================================================
20
// Modport for the CPU module (internal) interface
21
// Also considered "design under test" port
22
//=================================================
23
modport dut (
24
    output nM1, nMREQ, nIORQ, nRD, nWR, nRFSH, nHALT, nBUSACK,
25
    input  nWAIT, nINT, nNMI, nRESET, nBUSRQ,
26
    input  CLK,
27
    output A,
28
    inout  D);
29
 
30
//=================================================
31
// Modport for the user (external) pin interface
32
// Also considered a "test bench" port
33
//=================================================
34
modport tb (
35
    input  nM1, nMREQ, nIORQ, nRD, nWR, nRFSH, nHALT, nBUSACK,
36
    output nWAIT, nINT, nNMI, nRESET, nBUSRQ,
37
    input  CLK,
38
    input  A,
39
    inout  D);
40
 
41
endinterface : z80_if
42
 
43
`endif

powered by: WebSVN 2.1.0

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