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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [avalon_lib/] [sim/] [src/] [ast_monitor.sv] - Blame information for rev 32

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2015 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
`timescale 1 ps / 1 ps
29
 
30
module
31
  ast_monitor
32
  #(
33
    ST_SYMBOL_W,
34
    ST_NUMSYMBOLS,
35
    USE_PACKET,
36
    ST_READY_LATENCY,
37
    USE_CHANNEL = 0,
38
    USE_ERROR = 0,
39
    USE_READY = 1,
40
    USE_VALID = 1,
41
    USE_EMPTY = 1,
42
    ST_ERROR_W = 1,
43
    ST_MAX_PACKET_SIZE = 1,
44
    ST_MAX_CHANNELS = 0,
45
    ST_CHANNEL_W = $clog2(ST_MAX_CHANNELS),
46
    ST_EMPTY_W = (ST_NUMSYMBOLS == 1) ? 1 : $clog2(ST_NUMSYMBOLS)
47
  )
48
  (
49
    ast_if  src,
50
    ast_if  sink,
51
    input   clk,
52
    input   reset
53
  );
54
 
55
  altera_avalon_st_monitor
56
    #(
57
      .USE_PACKET         (USE_PACKET),
58
      .USE_CHANNEL        (USE_CHANNEL),
59
      .USE_ERROR          (USE_ERROR),
60
      .USE_READY          (USE_READY),
61
      .USE_VALID          (USE_VALID),
62
      .USE_EMPTY          (USE_EMPTY),
63
      .ST_SYMBOL_W        (ST_SYMBOL_W),
64
      .ST_NUMSYMBOLS      (ST_NUMSYMBOLS),
65
      .ST_CHANNEL_W       (ST_CHANNEL_W),
66
      .ST_ERROR_W         (ST_ERROR_W),
67
      .ST_EMPTY_W         (ST_EMPTY_W),
68
      .ST_READY_LATENCY   (ST_READY_LATENCY),
69
      .ST_BEATSPERCYCLE   (1),
70
      .ST_MAX_CHANNELS    (ST_MAX_CHANNELS),
71
      .ST_MAX_PACKET_SIZE (ST_MAX_PACKET_SIZE),
72
      .VHDL_ID            (0)
73
    )
74
    altera_avalon_st_monitor_i
75
    (
76
      .clk                (clk),                //       clk.clk
77
      .reset              (reset),              // clk_reset.reset
78
      .src_data           (src.data),           //       src.data
79
      .src_valid          (src.valid),          //          .valid
80
      .src_ready          (src.ready),          //          .ready
81
      .src_startofpacket  (src.startofpacket),  //          .startofpacket
82
      .src_endofpacket    (src.endofpacket),    //          .endofpacket
83
      .src_empty          (src.empty),          //          .empty
84
      .src_channel        (src.channel),        //          .channel
85
      .src_error          (src.error),          //          .error
86
      .sink_data          (sink.data),          //      sink.data
87
      .sink_valid         (sink.valid),         //          .valid
88
      .sink_ready         (sink.ready),         //          .ready
89
      .sink_startofpacket (sink.startofpacket), //          .startofpacket
90
      .sink_endofpacket   (sink.endofpacket),   //          .endofpacket
91
      .sink_empty         (sink.empty),         //          .empty
92
      .sink_channel       (sink.channel),       //          .channel
93
      .sink_error         (sink.error)          //          .error
94
    );
95
 
96
 
97
// --------------------------------------------------------------------
98
//
99
endmodule

powered by: WebSVN 2.1.0

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