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

Subversion Repositories a-z80

[/] [a-z80/] [trunk/] [cpu/] [control/] [test_sequencer.sv] - Blame information for rev 4

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

Line No. Rev Author Line
1 3 gdevic
//==============================================================
2
// Test sequencer
3
//==============================================================
4
`timescale 100 ns/ 100 ns
5
 
6
module test_sequencer;
7
 
8
// ----------------- CLOCKS AND RESET -----------------
9
// Define one full T-clock cycle delay
10
`define T #2
11
bit clk = 1;
12
initial repeat (100) #1 clk = ~clk;
13
 
14
logic nreset = 0;
15
 
16
// ----------------- CONTROL ----------------
17
logic nextM_sig;
18
logic setM1_sig;
19
logic hold_clk_iorq_sig=0;
20
logic hold_clk_wait_sig=0;
21
logic hold_clk_busrq_sig=0;
22
 
23
wire T6_sig;
24
wire M6_sig;
25
assign nextM_sig = T6_sig;      // Restart when reaching T6
26
assign setM1_sig = M6_sig;      // Restart when reaching M6
27
 
28
// ----------------- TEST -------------------
29
initial begin
30
    // Init / reset
31
    `T  nreset = 1;
32
    repeat (100) @(posedge clk); nreset <= 1;
33
 
34
    // This test does not use assert() -- we just check visually
35
 
36
    `T  $display("End of test");
37
end
38
 
39
//--------------------------------------------------------------
40
// Instantiate sequencer
41
//--------------------------------------------------------------
42
 
43
sequencer sequencer_inst
44
(
45
    .clk(clk) ,                         // input  clk
46
    .nextM(nextM_sig) ,                 // input  nextM_sig
47
    .setM1(setM1_sig) ,                 // input  setM1_sig
48
    .nreset(nreset) ,                   // input  nreset
49
    .hold_clk_iorq(hold_clk_iorq_sig) , // input  hold_clk_iorq_sig
50
    .hold_clk_wait(hold_clk_wait_sig) , // input  hold_clk_wait_sig
51
    .hold_clk_busrq(hold_clk_busrq_sig),// input  hold_clk_busrq_sig
52
    .M1(M1_sig) ,                       // output  M1_sig
53
    .M2(M2_sig) ,                       // output  M2_sig
54
    .M3(M3_sig) ,                       // output  M3_sig
55
    .M4(M4_sig) ,                       // output  M4_sig
56
    .M5(M5_sig) ,                       // output  M5_sig
57
    .M6(M6_sig) ,                       // output  M6_sig
58
    .T1(T1_sig) ,                       // output  T1_sig
59
    .T2(T2_sig) ,                       // output  T2_sig
60
    .T3(T3_sig) ,                       // output  T3_sig
61
    .T4(T4_sig) ,                       // output  T4_sig
62
    .T5(T5_sig) ,                       // output  T5_sig
63
    .T6(T6_sig) ,                       // output  T6_sig
64
    .timings_en(timings_en_sig)         // output  timings_en_sig
65
);
66
 
67
endmodule

powered by: WebSVN 2.1.0

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