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

Subversion Repositories spacewire

[/] [spacewire/] [trunk/] [rtl/] [SPW_I_vlogcore.v] - Blame information for rev 27

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 btltz
//2005-1-18      btltz@mail.china.com      btltz from CASIC,China  
2
//File=Module=SPW_I_vlogcore    2005-2-18      btltz@mail.china.com      btltz from CASIC,China 
3 22 btltz
//Description:   SpaceWire RxTx top module with Wishbone interface to node device(the host) or communication memory.    
4 2 btltz
//                "A SpaceWire node comprise one or more SpaceWire link interfaces
5
//                (encoder-decoders) and an interface to the host system,represents an interface between 
6
//                a SpaceWire network and an application system using the network services."
7
//Approximate area:
8
//Origin:        SpaceWire Std-Draft-1 of ECSS(European Cooperation for Space Standardization),ESTEC,ESA
9
//               
10
//--     TODO:
11
////////////////////////////////////////////////////////////////////////////////////
12
//
13
 
14
/*synthesis translate off*/
15 22 btltz
`include "timescale.v"
16 2 btltz
/*synthesis translate on */
17 22 btltz
`define reset     1                              // WISHBONE style reset
18
`define USE_XIL_DEVICE                           // If use Xilinx device
19
`define TOOL_NOTSUP_PORT_ARRAY  //if the tools not support port array declaration 
20 2 btltz
 
21
module SPW_I_vlogcore #(parameter CH_NUM = 3)                              //Triple Modulo Redundant (TMR)
22
                      ( output [CH_NUM-1:0] Dout,Doutb, Sout,Soutb,   //LVDS pad
23
                        input  [CH_NUM-1:0] Sin, Sinb,  Din, Dinb,        //LVDS pad. 8 pads/pin for 1 channel
24
 
25
                                                          output int_LnkErr_o,
26
                                                          output TICK_o, TICK_i,
27
 
28
                       input  reset,gclk
29
                        );
30
 
31
 
32
//////////////
33
// LVDS IO
34
//
35
`ifdef USE_XIL_DEVICE
36
wire [CH_NUM-1:0] Si,Di,  So,Do;
37
 
38
generate
39
begin:Gen_LVDS_PADS
40
genvar k;
41
 for (k=0; k<CH_NUM, k=k+1)
42
 IBUFDS_LVDS_25   inst_LVDS_Di ( .I(Din[k])                 // P-channel data 
43
                                 .IB(Dinb[k])       // N-channel data 
44
                                                                                   .O(Di[k]) );     // Non-differential data input
45
 IBUFDS_LVDS_25   inst_LVDS_Si ( .I(Sin[k])                 // P-channel strobe 
46
                                 .IB(Sinb[k])       // N-channel strobe 
47
                                                                                   .O(Si[k]) );     // Non-differential strobe input
48
 
49
 
50
 OBUFDS_LVDS_25   inst_LVDS_Do ( .I(Do[k]),                      //Non-differential data output
51
                                .O(Dout[k]),                     //P-channel output 
52
                                .OB(Doutb[k])  );        //N-channel output
53
 OBUFDS_LVDS_25   inst_LVDS_So ( .I(So[k]),                      //Non-differential strobe output
54
                                .O(Sout[k]),                     //P-channel output
55
                                .OB(Soutb[k])  );        //N-channel output
56
end    //end block Gen_LVDS_PADS
57
endgenerate
58
`endif
59
 
60
//////////////////////////
61
// Synchronizer 
62
// between 2 clock domain 
63
synchronizer_flop  #(WIDTH*2) inst_Syn_flops(.sync_data_out(),
64
                                      .data_in(),
65
                                      .clk(),
66
                                      .async_reset()
67
                                      );
68
 
69
/********** Instantiations of low level modules ****************/
70
////// Channels //////
71
generate
72
begin:G_channel
73
genvar i;
74
 for(i=0; i<CHANNEL_NUM; i=i+1)
75
   SPW_CODEC  #() CODEC_xChannels  (
76
                                 );
77
end
78
endgenerate
79
 
80
Gluelogic inst_fifo_crc  ();
81
 
82
WB_COMI_HOCI inst_WB_IF  ();
83
 
84
JTAG_spw  inst_JTAG_IO  ();
85
 
86
 
87
endmodule
88 22 btltz
 
89
`undef reset
90
`undef USE_XIL_DEVICE
91
`undef TOOL_NOTSUP_PORT_ARRAY
92
 

powered by: WebSVN 2.1.0

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