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

Subversion Repositories wbscope

[/] [wbscope/] [trunk/] [bench/] [rtl/] [wbscope_tb.v] - Blame information for rev 12

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

Line No. Rev Author Line
1 12 dgisselq
////////////////////////////////////////////////////////////////////////////////
2
//
3
// Filename:    wbscope_tb.v
4
//
5
// Project:     WBScope, a wishbone hosted scope
6
//
7
// Purpose:     
8
//
9
// Creator:     Dan Gisselquist, Ph.D.
10
//              Gisselquist Technology, LLC
11
//
12
////////////////////////////////////////////////////////////////////////////////
13
//
14
// Copyright (C) 2015-2017, Gisselquist Technology, LLC
15
//
16
// This program is free software (firmware): you can redistribute it and/or
17
// modify it under the terms of  the GNU General Public License as published
18
// by the Free Software Foundation, either version 3 of the License, or (at
19
// your option) any later version.
20
//
21
// This program is distributed in the hope that it will be useful, but WITHOUT
22
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
// for more details.
25
//
26
// You should have received a copy of the GNU General Public License along
27
// with this program.  (It's in the $(ROOT)/doc directory.  Run make with no
28
// target there if the PDF file isn't present.)  If not, see
29
// <http://www.gnu.org/licenses/> for a copy.
30
//
31
// License:     GPL, v3, as defined and found on www.gnu.org,
32
//              http://www.gnu.org/licenses/gpl.html
33
//
34
//
35
////////////////////////////////////////////////////////////////////////////////
36
//
37
//
38
module  wbscope_tb(i_clk, i_rst, i_trigger, o_data,
39
        i_wb_cyc, i_wb_stb, i_wb_we, i_wb_addr, i_wb_data,
40
        o_wb_ack, o_wb_data, o_interrupt);
41
        input                   i_clk, i_rst, i_trigger;
42
        output  wire    [31:0]   o_data;
43
        //
44
        input                   i_wb_cyc, i_wb_stb, i_wb_we;
45
        input                   i_wb_addr;
46
        input           [31:0]   i_wb_data;
47
        //
48
        output  wire            o_wb_ack;
49
        output  wire    [31:0]   o_wb_data;
50
        //
51
        output  o_interrupt;
52
 
53
        reg     [30:0]   counter;
54
        initial counter = 0;
55
        always @(posedge i_clk)
56
                counter <= counter + 1'b1;
57
 
58
        assign  o_data = { i_trigger, counter };
59
 
60
        wire    wb_stall_ignored;
61
 
62
        wbscope #(5'd6, 32, 1)
63
                scope(i_clk, 1'b1, i_trigger, o_data,
64
                        i_clk, i_wb_cyc, i_wb_stb, i_wb_we,
65
                                        i_wb_addr, i_wb_data,
66
                                o_wb_ack, wb_stall_ignored, o_wb_data,
67
                        o_interrupt);
68
 
69
endmodule

powered by: WebSVN 2.1.0

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