Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gtxe2_gpl
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
gtxe2_gpl
Commits
9b371aa6
Commit
9b371aa6
authored
Jul 07, 2015
by
Alexey Grebenkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial files with license agreement
parent
886f1771
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1609 additions
and
1559 deletions
+1609
-1559
README.md
README.md
+3
-1
GTXE2_CHANNEL.v
gtxe2_channel/GTXE2_CHANNEL.v
+0
-752
GTXE2_CHANNEL_GPL.v
gtxe2_channel/GTXE2_CHANNEL_GPL.v
+728
-0
clock_divider.v
gtxe2_channel/clock_divider.v
+24
-0
gtxe2_chnl.v
gtxe2_channel/gtxe2_chnl.v
+20
-0
gtxe2_chnl_clocking.v
gtxe2_channel/gtxe2_chnl_clocking.v
+21
-0
gtxe2_chnl_cpll.v
gtxe2_channel/gtxe2_chnl_cpll.v
+20
-0
gtxe2_chnl_cpll_inmux.v
gtxe2_channel/gtxe2_chnl_cpll_inmux.v
+20
-0
gtxe2_chnl_outclk_mux.v
gtxe2_channel/gtxe2_chnl_outclk_mux.v
+20
-0
gtxe2_chnl_rx.v
gtxe2_channel/gtxe2_chnl_rx.v
+24
-0
gtxe2_chnl_rx_10x8dec.v
gtxe2_channel/gtxe2_chnl_rx_10x8dec.v
+21
-1
gtxe2_chnl_rx_align.v
gtxe2_channel/gtxe2_chnl_rx_align.v
+24
-1
gtxe2_chnl_rx_des.v
gtxe2_channel/gtxe2_chnl_rx_des.v
+20
-4
gtxe2_chnl_rx_oob.v
gtxe2_channel/gtxe2_chnl_rx_oob.v
+23
-1
gtxe2_chnl_tx.v
gtxe2_channel/gtxe2_chnl_tx.v
+21
-0
gtxe2_chnl_tx_8x10enc.v
gtxe2_channel/gtxe2_chnl_tx_8x10enc.v
+24
-0
gtxe2_chnl_tx_oob.v
gtxe2_channel/gtxe2_chnl_tx_oob.v
+20
-0
gtxe2_chnl_tx_ser.v
gtxe2_channel/gtxe2_chnl_tx_ser.v
+20
-2
resync_fifo_nonsynt.v
gtxe2_channel/resync_fifo_nonsynt.v
+20
-0
gtxe2_comm_clocking.v
gtxe2_common/gtxe2_comm_clocking.v
+20
-0
gtxe2_comm_qpll.v
gtxe2_common/gtxe2_comm_qpll.v
+20
-0
gtxe2_comm_qpll_inmux.v
gtxe2_common/gtxe2_comm_qpll_inmux.v
+20
-0
tb.v
tb/tb.v
+455
-796
test.v
tb/test.v
+21
-1
No files found.
README.md
View file @
9b371aa6
# gtxe2_nosecureip
GTXE2_CHANNEL_GPL.v is a non-synthesizable open-source replacement for a propriate xilinx's primitive GTXE2_CHANNEL.v
For now only basic features are implemented : OOB, comma aligment, 10-8 encoding/decoding, clocking scheme.
Still, that is enough to run SATA protocol implementation simulation.
gtxe2_channel/GTXE2_CHANNEL.v
deleted
100644 → 0
View file @
886f1771
This diff is collapsed.
Click to expand it.
gtxe2_channel/GTXE2_CHANNEL_GPL.v
0 → 100644
View file @
9b371aa6
This diff is collapsed.
Click to expand it.
gtxe2_channel/clock_divider.v
View file @
9b371aa6
/*******************************************************************************
* Module: clock_divider
* Date: 2015-07-06
* Author: Alexey
* Description: Non-sinthesizable clock divider
*
* Copyright (c) 2015 Elphel, Inc.
* clock_divider.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* clock_divider.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
/**
* Divides input clock either by input 'div' or by parameter 'divide_by' if divide_by_param
* was set to 1
**/
`ifndef
CLOCK_DIVIDER_V
`ifndef
CLOCK_DIVIDER_V
`define
CLOCK_DIVIDER_V
`define
CLOCK_DIVIDER_V
// non synthesisable!
// non synthesisable!
...
...
gtxe2_channel/gtxe2_chnl.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl
* Date: 2015-07-06
* Author: Alexey
* Description: top-level module gtxe2_chnl = tx + rx + clocking
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"gtxe2_chnl_clocking.v"
`include
"gtxe2_chnl_clocking.v"
`include
"gtxe2_chnl_tx.v"
`include
"gtxe2_chnl_tx.v"
`include
"gtxe2_chnl_rx.v"
`include
"gtxe2_chnl_rx.v"
...
...
gtxe2_channel/gtxe2_chnl_clocking.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_clocking
* Date: 2015-07-06
* Author: Alexey
* Description: channel's clocking top-level. Places muxes, plls, dividers,
* as they're depicted @ xilinx's ug476 p.36, p.46, p. 150, p. 211
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_clocking.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_clocking.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"gtxe2_chnl_cpll_inmux.v"
`include
"gtxe2_chnl_cpll_inmux.v"
`include
"gtxe2_chnl_outclk_mux.v"
`include
"gtxe2_chnl_outclk_mux.v"
`include
"gtxe2_chnl_cpll.v"
`include
"gtxe2_chnl_cpll.v"
...
...
gtxe2_channel/gtxe2_chnl_cpll.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_cpll
* Date: 2015-07-06
* Author: Alexey
* Description: non-synthesizable pll implementation
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_cpll.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_cpll.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"gtxe2_chnl_cpll_def.v"
`include
"gtxe2_chnl_cpll_def.v"
module
gtxe2_chnl_cpll
(
module
gtxe2_chnl_cpll
(
// top-level interfaces
// top-level interfaces
...
...
gtxe2_channel/gtxe2_chnl_cpll_inmux.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_cpll_inmux
* Date: 2015-07-06
* Author: Alexey
* Description: non-sinthesizable clock multiplexer, used in clocking scheme
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_cpll_inmux.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_cpll_inmux.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
// cpll reference clock mux
// cpll reference clock mux
module
gtxe2_chnl_cpll_inmux
(
module
gtxe2_chnl_cpll_inmux
(
input
wire
[
2
:
0
]
CPLLREFCLKSEL
,
input
wire
[
2
:
0
]
CPLLREFCLKSEL
,
...
...
gtxe2_channel/gtxe2_chnl_outclk_mux.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_cpll_outmux
* Date: 2015-07-06
* Author: Alexey
* Description: non-sinthesizable clock multiplexer, used in clocking scheme
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_cpll_outmux.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_cpll_outmux.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
module
gtxe2_chnl_outclk_mux
(
module
gtxe2_chnl_outclk_mux
(
input
wire
TXPLLREFCLK_DIV1
,
input
wire
TXPLLREFCLK_DIV1
,
input
wire
TXPLLREFCLK_DIV2
,
input
wire
TXPLLREFCLK_DIV2
,
...
...
gtxe2_channel/gtxe2_chnl_rx.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_rx
* Date: 2015-07-06
* Author: Alexey
* Description: reciever top-level. Also includes polarity-inversion logic
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_rx.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_rx.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
/**
* For now contains only deserializer, oob, 10x8 decoder, aligner and polarity invertor blocks
**/
`include
"gtxe2_chnl_rx_des.v"
`include
"gtxe2_chnl_rx_des.v"
`include
"gtxe2_chnl_rx_oob.v"
`include
"gtxe2_chnl_rx_oob.v"
`include
"gtxe2_chnl_rx_10x8dec.v"
`include
"gtxe2_chnl_rx_10x8dec.v"
...
@@ -144,6 +167,7 @@ aligner(
...
@@ -144,6 +167,7 @@ aligner(
.
RXMCOMMAALIGNEN
(
RXMCOMMAALIGNEN
)
.
RXMCOMMAALIGNEN
(
RXMCOMMAALIGNEN
)
)
;
)
;
// 10x8 decoder
gtxe2_chnl_rx_10x8dec
#(
gtxe2_chnl_rx_10x8dec
#(
.
iwidth
(
internal_data_width
)
,
.
iwidth
(
internal_data_width
)
,
.
owidth
(
RX_DATA_WIDTH
)
,
.
owidth
(
RX_DATA_WIDTH
)
,
...
...
gtxe2_channel/gtxe2_chnl_rx_10x8dec.v
View file @
9b371aa6
// always enabled
/*******************************************************************************
* Module: gtxe2_chnl_rx_10x8dec
* Date: 2015-07-06
* Author: Alexey
* Description: 10x8 decoder implementation, has reduced parameterization abilities
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_rx_10x8dec.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_rx_10x8dec.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
// always enabled, wasnt tested with width parameters, disctinct from 20
module
gtxe2_chnl_rx_10x8dec
#(
module
gtxe2_chnl_rx_10x8dec
#(
parameter
iwidth
=
20
,
parameter
iwidth
=
20
,
parameter
owidth
=
20
,
parameter
owidth
=
20
,
...
...
gtxe2_channel/gtxe2_chnl_rx_align.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_rx_align
* Date: 2015-07-06
* Author: Alexey
* Description: reciever's comma-aligner implementation
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_rx_align.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_rx_align.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
module
gtxe2_chnl_rx_align
#(
module
gtxe2_chnl_rx_align
#(
parameter
width
=
20
,
parameter
width
=
20
,
parameter
[
9
:
0
]
ALIGN_MCOMMA_VALUE
=
10'b1010000011
,
parameter
[
9
:
0
]
ALIGN_MCOMMA_VALUE
=
10'b1010000011
,
...
@@ -30,6 +50,7 @@ localparam window_size = width;//comma_width + width;
...
@@ -30,6 +50,7 @@ localparam window_size = width;//comma_width + width;
reg
[
width
-
1
:
0
]
indata_r
;
reg
[
width
-
1
:
0
]
indata_r
;
wire
[
width
*
2
-
1
:
0
]
data
;
wire
[
width
*
2
-
1
:
0
]
data
;
// looking for matches in all related bit history - in 'data'
assign
data
=
{
indata
,
indata_r
};
//{indata_r, indata};
assign
data
=
{
indata
,
indata_r
};
//{indata_r, indata};
always
@
(
posedge
clk
)
always
@
(
posedge
clk
)
indata_r
<=
indata
;
indata_r
<=
indata
;
...
@@ -53,7 +74,7 @@ end
...
@@ -53,7 +74,7 @@ end
endgenerate
endgenerate
// so, comma_match indicates bits, from whose comma/doublecomma (or commas) occurs in the window buffer
// so, comma_match indicates bits, from whose comma/doublecomma (or commas) occurs in the window buffer
// all we need from now is to get one of these bits
= [x]
and say [x+width-1:x] is an aligned data
// all we need from now is to get one of these bits
, [x],
and say [x+width-1:x] is an aligned data
// doing it in a hard way
// doing it in a hard way
generate
generate
...
@@ -63,6 +84,7 @@ begin: filter_comma_pos
...
@@ -63,6 +84,7 @@ begin: filter_comma_pos
end
end
endgenerate
endgenerate
assign
comma_pos
[
0
]
=
comma_match
[
0
]
;
assign
comma_pos
[
0
]
=
comma_match
[
0
]
;
// so, comma_pos's '1' indicates the first comma occurence. there is only one '1' in the vector
function
integer
clogb2
;
function
integer
clogb2
;
input
[
31
:
0
]
value
;
input
[
31
:
0
]
value
;
...
@@ -83,6 +105,7 @@ endfunction
...
@@ -83,6 +105,7 @@ endfunction
localparam
pwidth
=
clogb2
(
width
*
2
-
1
)
;
localparam
pwidth
=
clogb2
(
width
*
2
-
1
)
;
// decoding (finding an index, representing '1' in comma_pos)
wire
[
pwidth
-
1
:
0
]
pointer
;
wire
[
pwidth
-
1
:
0
]
pointer
;
reg
[
pwidth
-
1
:
0
]
pointer_latched
;
reg
[
pwidth
-
1
:
0
]
pointer_latched
;
wire
pointer_set
;
wire
pointer_set
;
...
...
gtxe2_channel/gtxe2_chnl_rx_des.v
View file @
9b371aa6
// 20-bit width only, for now
/*******************************************************************************
// assuming inclk and outclk are completely aligned (have the same source)
* Module: gtxe2_chnl_rx_des
* Date: 2015-07-06
* Author: Alexey
* Description: 1xwidth deserializer
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_rx_des.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_rx_des.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"resync_fifo_nonsynt.v"
`include
"resync_fifo_nonsynt.v"
module
gtxe2_chnl_rx_des
#(
module
gtxe2_chnl_rx_des
#(
parameter
[
31
:
0
]
width
=
20
parameter
[
31
:
0
]
width
=
20
...
@@ -9,9 +27,7 @@ module gtxe2_chnl_rx_des #(
...
@@ -9,9 +27,7 @@ module gtxe2_chnl_rx_des #(
input
wire
inclk
,
input
wire
inclk
,
input
wire
outclk
,
input
wire
outclk
,
input
wire
indata
,
input
wire
indata
,
// input wire idle_in,
output
wire
[
width
-
1
:
0
]
outdata
output
wire
[
width
-
1
:
0
]
outdata
// output wire idle_out
)
;
)
;
reg
[
31
:
0
]
bitcounter
;
reg
[
31
:
0
]
bitcounter
;
...
...
gtxe2_channel/gtxe2_chnl_rx_oob.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_rx_oob
* Date: 2015-07-06
* Author: Alexey
* Description: oob detector
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_rx_oob.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_rx_oob.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
// doesnt support global parameters for now. instead uses localparams
// in case global parameters are needed, have to translate them in terms of localparams
module
gtxe2_chnl_rx_oob
#(
module
gtxe2_chnl_rx_oob
#(
parameter
width
=
20
,
parameter
width
=
20
,
// parameters are not used for now
parameter
[
2
:
0
]
SATA_BURST_VAL
=
3'b100
,
parameter
[
2
:
0
]
SATA_BURST_VAL
=
3'b100
,
parameter
[
2
:
0
]
SATA_EIDLE_VAL
=
3'b100
,
parameter
[
2
:
0
]
SATA_EIDLE_VAL
=
3'b100
,
parameter
SATA_MIN_INIT
=
12
,
parameter
SATA_MIN_INIT
=
12
,
...
@@ -23,7 +46,6 @@ module gtxe2_chnl_rx_oob #(
...
@@ -23,7 +46,6 @@ module gtxe2_chnl_rx_oob #(
output
wire
RXCOMWAKEDET
output
wire
RXCOMWAKEDET
)
;
)
;
// parameters are not used for now
localparam
burst_min_len
=
150
;
localparam
burst_min_len
=
150
;
localparam
burst_max_len
=
340
;
localparam
burst_max_len
=
340
;
...
...
gtxe2_channel/gtxe2_chnl_tx.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_tx
* Date: 2015-07-06
* Author: Alexey
* Description: transmitter top-level, includes polarity-inversion, bit-reordering
* and elecidle logic
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_tx.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_tx.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"gtxe2_chnl_tx_ser.v"
`include
"gtxe2_chnl_tx_ser.v"
`include
"gtxe2_chnl_tx_8x10enc.v"
`include
"gtxe2_chnl_tx_8x10enc.v"
`include
"gtxe2_chnl_tx_oob.v"
`include
"gtxe2_chnl_tx_oob.v"
...
...
gtxe2_channel/gtxe2_chnl_tx_8x10enc.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_tx_8x10enc
* Date: 2015-07-06
* Author: Alexey
* Description: 8x10 encoder
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_tx_8x10enc.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_tx_8x10enc.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
// for some reason overall trasmitted disparity is tracked at the top level
module
gtxe2_chnl_tx_8x10enc
#(
module
gtxe2_chnl_tx_8x10enc
#(
parameter
iwidth
=
16
,
parameter
iwidth
=
16
,
parameter
owidth
=
20
parameter
owidth
=
20
...
@@ -26,6 +47,9 @@ wire [owidth - 1:0] oword [word_count - 1:0];
...
@@ -26,6 +47,9 @@ wire [owidth - 1:0] oword [word_count - 1:0];
wire
[
iwidth
-
1
:
0
]
iword
[
word_count
-
1
:
0
]
;
wire
[
iwidth
-
1
:
0
]
iword
[
word_count
-
1
:
0
]
;
wire
[
word_count
-
1
:
0
]
is_control
;
wire
[
word_count
-
1
:
0
]
is_control
;
// typical approach: 8x10 = 5x6 + 3x4
// word disparity[i] = calculated disparity for the i-th 8-bit word
// interm_disparity[i] - disparity after 5x6 encoding for the i-th word
genvar
ii
;
genvar
ii
;
generate
generate
for
(
ii
=
0
;
ii
<
2
;
ii
=
ii
+
1
)
for
(
ii
=
0
;
ii
<
2
;
ii
=
ii
+
1
)
...
...
gtxe2_channel/gtxe2_chnl_tx_oob.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_chnl_tx_oob
* Date: 2015-07-06
* Author: Alexey
* Description: oob block implementation
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_tx_oob.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_tx_oob.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
module
gtxe2_chnl_tx_oob
#(
module
gtxe2_chnl_tx_oob
#(
parameter
width
=
20
parameter
width
=
20
)
)
...
...
gtxe2_channel/gtxe2_chnl_tx_ser.v
View file @
9b371aa6
// 20-bit width only, for now
/*******************************************************************************
// assuming inclk and outclk are completely aligned (have the same source)
* Module: gtxe2_chnl_tx_ser
* Date: 2015-07-06
* Author: Alexey
* Description: widthx1 serializer
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_chnl_tx_ser.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_chnl_tx_ser.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"resync_fifo_nonsynt.v"
`include
"resync_fifo_nonsynt.v"
module
gtxe2_chnl_tx_ser
#(
module
gtxe2_chnl_tx_ser
#(
parameter
[
31
:
0
]
width
=
20
parameter
[
31
:
0
]
width
=
20
...
...
gtxe2_channel/resync_fifo_nonsynt.v
View file @
9b371aa6
/*******************************************************************************
* Module: resync_fifo_nonsynt
* Date: 2015-07-06
* Author: Alexey
* Description: non-synthesizable resyncronization fifo
*
* Copyright (c) 2015 Elphel, Inc.
* resync_fifo_nonsynt.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* resync_fifo_nonsynt.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
// simplified resynchronisation fifo, could cause metastability
// simplified resynchronisation fifo, could cause metastability
// because of that shall not be syntesisable
// because of that shall not be syntesisable
// TODO add shift registers and gray code to fix that
// TODO add shift registers and gray code to fix that
...
...
gtxe2_common/gtxe2_comm_clocking.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_comm_clocking
* Date: 2015-07-06
* Author: Alexey
* Description: qpll top-level, for now
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_comm_clocking.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_comm_clocking.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"gtxe2_comm_qpll_inmux.v"
`include
"gtxe2_comm_qpll_inmux.v"
`include
"gtxe2_comm_qpll.v"
`include
"gtxe2_comm_qpll.v"
module
gtxe2_comm_clocking
(
module
gtxe2_comm_clocking
(
...
...
gtxe2_common/gtxe2_comm_qpll.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_comm_qpll
* Date: 2015-07-06
* Author: Alexey
* Description: qpll non-synthesizable implementation
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_comm_qpll.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_comm_qpll.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`include
"gtxe2_comm_qpll_def.v"
`include
"gtxe2_comm_qpll_def.v"
module
gtxe2_comm_qpll
(
module
gtxe2_comm_qpll
(
// top-level interfaces
// top-level interfaces
...
...
gtxe2_common/gtxe2_comm_qpll_inmux.v
View file @
9b371aa6
/*******************************************************************************
* Module: gtxe2_comm_qpll_inmux
* Date: 2015-07-06
* Author: Alexey
* Description: non-synthesizable clock multiplexer
*
* Copyright (c) 2015 Elphel, Inc.
* gtxe2_comm_qpll_inmux.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* gtxe2_comm_qpll_inmux.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
module
gtxe2_comm_qpll_inmux
(
module
gtxe2_comm_qpll_inmux
(
input
wire
[
2
:
0
]
QPLLREFCLKSEL
,
input
wire
[
2
:
0
]
QPLLREFCLKSEL
,
input
wire
GTREFCLK0
,
input
wire
GTREFCLK0
,
...
...
tb/tb.v
View file @
9b371aa6
This diff is collapsed.
Click to expand it.
tb/test.v
View file @
9b371aa6
/*******************************************************************************
* Module: test
* Date: 2015-07-06
* Author: Alexey
* Description: Generates test payload for GTXE2_CHANNEL
*
* Copyright (c) 2015 Elphel, Inc.
* test.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* test.v file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
/*
/*
* simple align
test
* simple align
er test + oob + checking for a corrent decoding
*/
*/
module
test
(
module
test
(
output
wire
reset
,
output
wire
reset
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment