|
3 | 3 | *
|
4 | 4 | ************* DATAPATH SIGNALS ***********
|
5 | 5 | * Assert dfi_wrdata_en and present the data
|
6 |
| - * on dfi_wrdata_mask/dfi_wrdata one cycle after |
7 |
| - * a write command. |
| 6 | + * on dfi_wrdata_mask/dfi_wrdata in the same |
| 7 | + * cycle as the write command. |
8 | 8 | *
|
9 |
| - * Assert dfi_rddata_en one cycle after a read |
| 9 | + * Assert dfi_rddata_en in the same cycle as the read |
10 | 10 | * command. The data will come back on dfi_rddata
|
11 |
| - * 3 cycles later, along with the assertion of |
| 11 | + * 4 cycles later, along with the assertion of |
12 | 12 | * dfi_rddata_valid.
|
13 | 13 | *
|
14 | 14 | * This PHY only supports CAS Latency 3.
|
@@ -340,22 +340,26 @@ endgenerate
|
340 | 340 | * DQ/DQS/DM control
|
341 | 341 | */
|
342 | 342 |
|
| 343 | +reg d_dfi_wrdata_en_p1; |
| 344 | +always @(posedge sys_clk) |
| 345 | + d_dfi_wrdata_en_p1 <= dfi_wrdata_en_p1; |
| 346 | + |
343 | 347 | reg r_dfi_wrdata_en;
|
344 | 348 | always @(posedge clk2x_270)
|
345 |
| - r_dfi_wrdata_en <= dfi_wrdata_en_p1; |
| 349 | + r_dfi_wrdata_en <= d_dfi_wrdata_en_p1; |
346 | 350 |
|
347 | 351 | reg r2_dfi_wrdata_en;
|
348 | 352 | always @(posedge clk2x_270)
|
349 | 353 | r2_dfi_wrdata_en <= r_dfi_wrdata_en;
|
350 | 354 |
|
351 | 355 | assign drive_dqs = r2_dfi_wrdata_en;
|
352 |
| -assign drive_dq = dfi_wrdata_en_p1; |
| 356 | +assign drive_dq = d_dfi_wrdata_en_p1; |
353 | 357 |
|
354 | 358 | wire rddata_valid;
|
355 |
| -reg [3:0] rddata_sr; |
| 359 | +reg [4:0] rddata_sr; |
356 | 360 | assign dfi_rddata_valid_w0 = rddata_sr[0];
|
357 | 361 | assign dfi_rddata_valid_w1 = rddata_sr[0];
|
358 | 362 | always @(posedge sys_clk)
|
359 |
| - rddata_sr <= {dfi_rddata_en_p0, rddata_sr[3:1]}; |
| 363 | + rddata_sr <= {dfi_rddata_en_p0, rddata_sr[4:1]}; |
360 | 364 |
|
361 | 365 | endmodule
|
0 commit comments