x393
1.0
FPGAcodeforElphelNC393camera
iserdes_mem.v
Go to the documentation of this file.
1
39
`timescale 1ns/1ps
40
//`define IVERILOG // uncomment just to chenck syntax (by the editor) in the corresponding branch
41
module
iserdes_mem
#
42
(
43
parameter
DYN_CLKDIV_INV_EN
=
"FALSE"
,
44
parameter
IOBDELAY
=
"IFD"
,
// "NONE", "IBUF", "IFD", "BOTH"
45
parameter
MSB_FIRST
=
0
// 0 - lowest bit is received first, 1 - highest is received first
46
) (
47
input
iclk
,
// source-synchronous clock
48
input
oclk
,
// system clock, phase should allow iclk-to-oclk jitter with setup/hold margin
49
input
oclk_div
,
// oclk divided by 2, front aligned
50
input
inv_clk_div
,
// invert oclk_div (this clock is shared between iserdes and oserdes
51
input
rst
,
// reset
52
input
d_direct
,
// direct input from IOB, normally not used, controlled by IOBDELAY parameter (set to "NONE")
53
input
ddly
,
// serial input from idelay
54
output
[
3
:
0
]
dout
,
55
output
comb_out
// combinatorial output copies selected input to be used in the fabric
56
);
57
wire
[
3
:
0
]
dout_le
;
58
assign
dout
=
MSB_FIRST
? {
dout_le
[
0
],
dout_le
[
1
],
dout_le
[
2
],
dout_le
[
3
]} :
dout_le
;
59
`ifndef
OPEN_SOURCE_ONLY
// Not using simulator - instantiate actual ISERDESE2 (can not be simulated because of encrypted )
60
ISERDESE2
#(
61
.
DATA_RATE
(
"DDR"
),
62
.
DATA_WIDTH
(
4
),
63
.
DYN_CLKDIV_INV_EN
(
DYN_CLKDIV_INV_EN
),
64
.
DYN_CLK_INV_EN
(
"FALSE"
),
65
.
INIT_Q1
(
1'b0
),
66
.
INIT_Q2
(
1'b0
),
67
.
INIT_Q3
(
1'b0
),
68
.
INIT_Q4
(
1'b0
),
69
.
INTERFACE_TYPE
(
"MEMORY"
),
70
.
NUM_CE
(
1
),
71
.
IOBDELAY
(
IOBDELAY
),
72
73
.
OFB_USED
(
"FALSE"
),
74
.
SERDES_MODE
(
"MASTER"
),
75
.
SRVAL_Q1
(
1'b0
),
76
.
SRVAL_Q2
(
1'b0
),
77
.
SRVAL_Q3
(
1'b0
),
78
.
SRVAL_Q4
(
1'b0
)
79
)
80
iserdes_i
81
(
82
.
O
(
comb_out
),
83
.
Q1
(
dout_le
[
3
]),
84
.
Q2
(
dout_le
[
2
]),
85
.
Q3
(
dout_le
[
1
]),
86
.
Q4
(
dout_le
[
0
]),
87
.
Q5
(),
88
.
Q6
(),
89
.
Q7
(),
90
.
Q8
(),
91
.
SHIFTOUT1
(),
92
.
SHIFTOUT2
(),
93
.
BITSLIP
(
1'b0
),
94
.
CE1
(
1'b1
),
95
.
CE2
(
1'b1
),
96
.
CLK
(
iclk
),
97
.
CLKB
(!
iclk
),
98
.
CLKDIVP
(),
// used with phasers, source-sync
99
.
CLKDIV
(
oclk_div
),
100
.
DDLY
(
ddly
),
101
.
D
(
d_direct
),
// direct connection to IOB bypassing idelay
102
.
DYNCLKDIVSEL
(
inv_clk_div
),
103
.
DYNCLKSEL
(
1'b0
),
104
.
OCLK
(
oclk
),
105
.
OCLKB
(!
oclk
),
106
.
OFB
(),
107
.
RST
(
rst
),
108
.
SHIFTIN1
(
1'b0
),
109
.
SHIFTIN2
(
1'b0
)
110
);
111
`else
// OPEN_SOURCE_ONLY : Simulating, use Virtex 6 module that does not have encrypted functionality
112
ISERDESE1
#(
113
.DATA_RATE
("DDR"),
114
.DATA_WIDTH
(4),
115
.DYN_CLKDIV_INV_EN
(DYN_CLKDIV_INV_EN),
116
.DYN_CLK_INV_EN
("FALSE"),
117
.INIT_Q1
(1'b0),
118
.INIT_Q2
(1'b0),
119
.INIT_Q3
(1'b0),
120
.INIT_Q4
(1'b0),
121
.INTERFACE_TYPE
("MEMORY"),
122
.NUM_CE
(1),
123
.IOBDELAY
(IOBDELAY),
124
.OFB_USED
("FALSE"),
125
.SERDES_MODE
("MASTER"),
126
.SRVAL_Q1
(1'b0),
127
.SRVAL_Q2
(1'b0),
128
.SRVAL_Q3
(1'b0),
129
.SRVAL_Q4
(1'b0)
130
)
131
iserdes_i
132
(
133
.O
(comb_out),
134
.Q1
(dout_le[3]),
135
.Q2
(dout_le[2]),
136
.Q3
(dout_le[1]),
137
.Q4
(dout_le[0]),
138
.Q5
(),
139
.Q6
(),
140
.SHIFTOUT1
(),
141
.SHIFTOUT2
(),
142
143
.BITSLIP
(1'b0),
144
.CE1
(1'b1),
145
.CE2
(1'b1),
146
.CLK
(iclk),
147
.CLKB
(!iclk),
148
.CLKDIV
(oclk_div),
149
.DDLY
(ddly),
150
.D
(d_direct),
// direct connection to IOB bypassing idelay
151
.DYNCLKDIVSEL
(inv_clk_div),
152
.DYNCLKSEL
(1'b0),
153
.OCLK
(oclk),
154
.OFB
(),
155
.RST
(rst),
156
.SHIFTIN1
(1'b0),
157
.SHIFTIN2
(1'b0)
158
);
159
`endif
160
endmodule
161
162
iserdes_mem.11300ddly
11300ddly
Definition:
iserdes_mem.v:53
iserdes_mem.11297inv_clk_div
11297inv_clk_div
Definition:
iserdes_mem.v:50
iserdes_mem.11303dout_le
11303dout_lewire[3:0]
Definition:
iserdes_mem.v:57
iserdes_mem.11295oclk
11295oclk
Definition:
iserdes_mem.v:48
iserdes_mem.11302comb_out
11302comb_out
Definition:
iserdes_mem.v:55
iserdes_mem.11299d_direct
11299d_direct
Definition:
iserdes_mem.v:52
iserdes_mem.11301dout
[3:0] 11301dout
Definition:
iserdes_mem.v:54
iserdes_mem
Definition:
iserdes_mem.v:41
iserdes_mem.11298rst
11298rst
Definition:
iserdes_mem.v:51
iserdes_mem.11292IOBDELAY
11292IOBDELAY"IFD"
Definition:
iserdes_mem.v:44
iserdes_mem.11291DYN_CLKDIV_INV_EN
11291DYN_CLKDIV_INV_EN"FALSE"
Definition:
iserdes_mem.v:43
iserdes_mem.11294iclk
11294iclk
Definition:
iserdes_mem.v:47
iserdes_mem.11296oclk_div
11296oclk_div
Definition:
iserdes_mem.v:49
iserdes_mem.11293MSB_FIRST
11293MSB_FIRST0
Definition:
iserdes_mem.v:45
iserdes_mem.ISERDESE2
iserdes_i ISERDESE2
Definition:
iserdes_mem.v:60
wrap
iserdes_mem.v
Generated by
1.8.12