1 from litesata
.common
import *
2 from litesata
.phy
.ctrl
import *
3 from litesata
.phy
.datapath
import *
5 class LiteSATAPHY(Module
):
6 def __init__(self
, device
, pads
, revision
, clk_freq
):
8 self
.revision
= revision
10 if device
[:3] == "xc7": # Kintex 7
11 from litesata
.phy
.k7
.trx
import K7LiteSATAPHYTRX
12 from litesata
.phy
.k7
.crg
import K7LiteSATAPHYCRG
13 self
.submodules
.trx
= K7LiteSATAPHYTRX(pads
, revision
)
14 self
.submodules
.crg
= K7LiteSATAPHYCRG(pads
, self
.trx
, revision
, clk_freq
)
16 msg
= "Device" + device
+ "not (yet) supported."
17 raise NotImplementedError(msg
)
20 self
.submodules
.ctrl
= LiteSATAPHYCtrl(self
.trx
, self
.crg
, clk_freq
)
23 self
.submodules
.datapath
= LiteSATAPHYDatapath(self
.trx
, self
.ctrl
)
24 self
.sink
, self
.source
= self
.datapath
.sink
, self
.datapath
.source