@@ -99,7 +99,6 @@ def __init__(self, i1, i2, o, clk):
99
99
o_dataout = o ,
100
100
)
101
101
102
-
103
102
class AlteraDDROutput :
104
103
@staticmethod
105
104
def lower (dr ):
@@ -147,3 +146,73 @@ def lower(dr):
147
146
SDROutput : AlteraSDROutput ,
148
147
SDRInput : AlteraSDRInput ,
149
148
}
149
+
150
+ # Agilex5 DDROutput --------------------------------------------------------------------------------
151
+
152
+ class Agilex5DDROutputImpl (Module ):
153
+ def __init__ (self , i1 , i2 , o , clk ):
154
+ self .specials += Instance ("tennm_ph2_ddio_out" ,
155
+ p_mode = "MODE_DDR" ,
156
+ p_asclr_ena = "ASCLR_ENA_NONE" ,
157
+ p_sclr_ena = "SCLR_ENA_NONE" ,
158
+ o_dataout = o ,
159
+ i_datainlo = i2 ,
160
+ i_datainhi = i1 ,
161
+ i_clk = clk ,
162
+ i_ena = Constant (1 , 1 ),
163
+ i_areset = Constant (1 , 1 ),
164
+ i_sreset = Constant (1 , 1 ),
165
+ )
166
+
167
+ class Agilex5DDROutput :
168
+ @staticmethod
169
+ def lower (dr ):
170
+ return Agilex5DDROutputImpl (dr .i1 , dr .i2 , dr .o , dr .clk )
171
+
172
+ # Agilex5 DDRInput ---------------------------------------------------------------------------------
173
+
174
+ class Agilex5DDRInputImpl (Module ):
175
+ def __init__ (self , i , o1 , o2 , clk ):
176
+ self .specials += Instance ("tennm_ph2_ddio_in" ,
177
+ p_mode = "MODE_DDR" ,
178
+ p_asclr_ena = "ASCLR_ENA_NONE" ,
179
+ p_sclr_ena = "SCLR_ENA_NONE" ,
180
+ i_clk = clk ,
181
+ i_datain = i ,
182
+ o_regouthi = o1 ,
183
+ o_regoutlo = o2 ,
184
+ i_ena = Constant (1 , 1 ),
185
+ i_areset = Constant (1 , 1 ),
186
+ i_sreset = Constant (1 , 1 ),
187
+ )
188
+
189
+ class Agilex5DDRInput :
190
+ @staticmethod
191
+ def lower (dr ):
192
+ return Agilex5DDRInputImpl (dr .i , dr .o1 , dr .o2 , dr .clk )
193
+
194
+ # Agilex5 SDROutput --------------------------------------------------------------------------------
195
+
196
+ class Agilex5SDROutput :
197
+ @staticmethod
198
+ def lower (dr ):
199
+ return Agilex5DDROutputImpl (dr .i , dr .i , dr .o , dr .clk )
200
+
201
+ # Agilex5 SDRInput ---------------------------------------------------------------------------------
202
+
203
+ class Agilex5SDRInput :
204
+ @staticmethod
205
+ def lower (dr ):
206
+ return Agilex5DDRInputImpl (dr .i , dr .o , Signal (), dr .clk )
207
+
208
+ # Agilex5 Special Overrides ------------------------------------------------------------------------
209
+
210
+ agilex5_special_overrides = {
211
+ AsyncResetSynchronizer : AlteraAsyncResetSynchronizer ,
212
+ DifferentialInput : AlteraDifferentialInput ,
213
+ DifferentialOutput : AlteraDifferentialOutput ,
214
+ DDROutput : Agilex5DDROutput ,
215
+ DDRInput : Agilex5DDRInput ,
216
+ SDROutput : Agilex5SDROutput ,
217
+ SDRInput : Agilex5SDRInput ,
218
+ }
0 commit comments