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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [avalon_lib/] [sim/] [src/] [ast_source.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_source
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_CHANNELS = 0,
44
    ST_CHANNEL_W = $clog2(ST_MAX_CHANNELS),
45
    ST_EMPTY_W = $clog2(ST_NUMSYMBOLS)
46
  )
47
  (
48
    ast_if  src,
49
    input   clk,
50
    input   reset
51
  );
52
 
53
  altera_avalon_st_source_bfm
54
    #(
55
      .USE_PACKET       (USE_PACKET),
56
      .USE_CHANNEL      (USE_CHANNEL),
57
      .USE_ERROR        (USE_ERROR),
58
      .USE_READY        (USE_READY),
59
      .USE_VALID        (USE_VALID),
60
      .USE_EMPTY        (USE_EMPTY),
61
      .ST_SYMBOL_W      (ST_SYMBOL_W),
62
      .ST_NUMSYMBOLS    (ST_NUMSYMBOLS),
63
      .ST_CHANNEL_W     (ST_CHANNEL_W),
64
      .ST_ERROR_W       (ST_ERROR_W),
65
      .ST_EMPTY_W       (ST_EMPTY_W),
66
      .ST_READY_LATENCY (ST_READY_LATENCY),
67
      .ST_BEATSPERCYCLE (1),
68
      .ST_MAX_CHANNELS  (ST_MAX_CHANNELS),
69
      .VHDL_ID          (0)
70
    )
71
    bfm
72
    (
73
      .clk               (clk),               //       clk.clk
74
      .reset             (reset),             // clk_reset.reset
75
      .src_data          (src.data),          //       src.data
76
      .src_valid         (src.valid),         //          .valid
77
      .src_ready         (src.ready),         //          .ready
78
      .src_startofpacket (src.startofpacket), //          .startofpacket
79
      .src_endofpacket   (src.endofpacket),   //          .endofpacket
80
      .src_empty         (src.empty),         //          .empty
81
      .src_channel       (src.channel),       //          .channel
82
      .src_error         (src.error)          //          .error
83
    );
84
 
85
// --------------------------------------------------------------------
86
//
87
endmodule

powered by: WebSVN 2.1.0

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