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

Subversion Repositories lcd_block

[/] [lcd_block/] [trunk/] [hdl/] [iseProject/] [top_hw_testbench.v] - Blame information for rev 14

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

Line No. Rev Author Line
1 11 leonardoar
`timescale 1ns / 1ps
2
/*
3
Top module that will instantiate and connect our DUT (lcd_controller) the ICON, VIO , ILA cores
4 14 leonardoar
For more information refer to this tutorial (Search in docs if link is broken)
5
http://www.stanford.edu/~phartke/chipscope_tutorial.pdf
6
http://www.stanford.edu/class/ee183/handouts.shtml
7 11 leonardoar
*/
8
module top_hw_testbench(
9 13 leonardoar
    input clk,
10 12 leonardoar
         output hw_lcd_e,
11
         output hw_lcd_rs,
12
         output hw_lcd_rw,
13
         output [3:0] hw_lcd_nibble,
14 13 leonardoar
         output hw_strata_flash_disable
15 11 leonardoar
    );
16
 
17
        // Declare some wires to connect the components
18
        wire rst;
19
        wire rs_in,strobe_in;
20
        wire[7:0] data_in, period_clk_ns;
21
        wire [3:0] lcd_nibble;
22
        wire lcd_e,lcd_rs,lcd_rw,disable_flash,done;
23
 
24
        // Declare the ICON wires
25
        wire [35: 0] control0;
26
        wire [35: 0] control1;
27
        // Declare VIO wires
28
        wire [18: 0] async_out;
29
        // Declare ILA wires
30
        wire trig_0;
31
        wire [16:0] data;
32
 
33
        // Instantiate our Device under test
34
        lcd_controller DUT (
35
                rst,
36
                clk,
37
                rs_in,
38
                data_in,
39
                strobe_in,
40
                period_clk_ns,
41
                lcd_e,
42
                lcd_nibble,
43
                lcd_rs,
44
                lcd_rw,
45
                disable_flash,
46
                done
47
                );
48
 
49
        coreICON integratedController (
50
      .CONTROL0(control0), // INOUT BUS [35:0]
51
      .CONTROL1(control1)
52
                ); // INOUT BUS [35:0]
53
 
54
 
55
        coreILA integratedLogicAnalyser (
56
      .CONTROL(control0), // INOUT BUS [35:0]
57
      .CLK(clk), // IN
58
      .DATA(data), // DATA [16:0];
59
      .TRIG0(trig_0)
60
        ); // IN BUS [0:0]
61
 
62
        coreVIO VIO_inst
63
    (
64 14 leonardoar
      .CONTROL(control1), // INOUT BUS [35:0]
65
                .CLK(clk),
66
                .SYNC_OUT(async_out)
67
      //.ASYNC_OUT(async_out)
68 11 leonardoar
        ); // IN BUS [18:0]
69
 
70
        assign trig_0 = lcd_e;
71
        assign {rst, rs_in, data_in, strobe_in, period_clk_ns} = async_out;
72
        assign data = {7'd1,lcd_e, lcd_nibble[3:0], lcd_rs, lcd_rw, disable_flash, done, strobe_in};
73 12 leonardoar
 
74
        // Send all interest output to outside
75 13 leonardoar
        assign hw_lcd_e = lcd_e;
76 12 leonardoar
        assign hw_lcd_rs = lcd_rs;
77
        assign hw_lcd_rw = lcd_rw;
78
        assign hw_lcd_nibble = lcd_nibble;
79 13 leonardoar
        assign hw_strata_flash_disable = disable_flash;
80 11 leonardoar
 
81
endmodule

powered by: WebSVN 2.1.0

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