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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [axi4_stream_lib/] [syn/] [src/] [axis_if.sv] - Blame information for rev 31

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 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
 
29
interface
30
  axis_if
31
  #(
32
    N = 8,  // data bus width in bytes
33
    I = 1,  // TID width
34
    D = 1,  // TDEST width
35
    U = 1   // TUSER width
36
  )
37
  (
38
    input             aclk,
39
    input             aresetn
40
  );
41
    wire              tvalid;
42
    wire              tready;
43
    wire  [(8*N)-1:0] tdata;
44
    wire  [N-1:0]     tstrb;
45
    wire  [N-1:0]     tkeep;
46
    wire              tlast;
47
    wire  [I-1:0]     tid;
48
    wire  [D-1:0]     tdest;
49
    wire  [U-1:0]     tuser;
50
 
51
 
52 31 qaztronic
// --------------------------------------------------------------------
53
// synthesis translate_off
54
    default clocking cb_m @(posedge aclk iff aresetn);
55
      output  tvalid;
56
      input   tready;
57
      output  tdata;
58
      output  tstrb;
59
      output  tkeep;
60
      output  tlast;
61
      output  tid;
62
      output  tdest;
63
      output  tuser;
64
    endclocking
65
 
66
 
67 28 qaztronic
    // --------------------------------------------------------------------
68
    //
69 31 qaztronic
    clocking cb_s @(posedge aclk iff aresetn);
70
      input   tvalid;
71
      output  tready;
72
      input   tdata;
73
      input   tstrb;
74
      input   tkeep;
75
      input   tlast;
76
      input   tid;
77
      input   tdest;
78
      input   tuser;
79
    endclocking
80
 
81
 
82
    // --------------------------------------------------------------------
83
    //
84 28 qaztronic
    modport
85
      master
86
      (
87
        input     aresetn,
88
        input     aclk,
89
        output    tvalid,
90
        input     tready,
91
        output    tdata,
92
        output    tstrb,
93
        output    tkeep,
94
        output    tlast,
95
        output    tid,
96
        output    tdest,
97 31 qaztronic
        output    tuser,
98
        clocking  cb_m
99 28 qaztronic
      );
100
 
101
 
102
    // --------------------------------------------------------------------
103
    //
104
    modport
105
      slave
106
      (
107
        input     aresetn,
108
        input     aclk,
109
        input     tvalid,
110
        output    tready,
111
        input     tdata,
112
        input     tstrb,
113
        input     tkeep,
114
        input     tlast,
115
        input     tid,
116
        input     tdest,
117 31 qaztronic
        input     tuser,
118
        clocking  cb_s
119 28 qaztronic
      );
120
 
121
 
122 31 qaztronic
// synthesis translate_on
123
// --------------------------------------------------------------------
124
 
125
 
126 28 qaztronic
endinterface: axis_if
127
 
128
 

powered by: WebSVN 2.1.0

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