verilogfpgaxilinxspartan

MIG MCB Unexpected Write Behavior


So I recently inhereted a project that has a generated MCB implemented in the design. I have never debugged IP cores before so you'll have to forgive me is the solution to my problem is obvious. I've been working on this problem for a day or two and can't seem to figure it out.

First off, I have read the documentation UG388, UG406, UG416 a few times through and done a bit of research with no luck.

As I understand the parameters, the MCB is setup in configuration-1 is what I get from:

    localparam C3_PORT_ENABLE             = 6'b111111;
    localparam C3_PORT_CONFIG             =  "B32_B32_R32_R32_R32_R32";
    localparam C3_P0_PORT_MODE             =  "BI_MODE";
    localparam C3_P1_PORT_MODE             =  "BI_MODE";
    localparam C3_P2_PORT_MODE             =  "RD_MODE";
    localparam C3_P3_PORT_MODE             =  "RD_MODE";
    localparam C3_P4_PORT_MODE             =  "RD_MODE";
    localparam C3_P5_PORT_MODE             =  "RD_MODE";

And is set to interface with DDR2 memory. I'm not sure what other information would be important for this problem, but I can post more if you need it. Here is some additional parameters that I think will be helpful:

localparam C3_NUM_DQ_PINS          = 16;
localparam C3_MEM_ADDR_WIDTH       = 13;
localparam C3_MEM_BANKADDR_WIDTH   = 3;
localparam C3_MEM_ADDR_ORDER       = "ROW_BANK_COLUMN";
localparam C3_P0_MASK_SIZE          = 4;
localparam C3_P0_DATA_PORT_SIZE     = 32;

Also, I should mention that the design only uses a single port (p0). Onto the behavior, the generated MCB comes with an Example_design that includes a TB and I have ran than to my success with no errors.

Now I'm trying to setup my own tb that performs a simple write and read. I'm able to write 32 bits in and read the same the 32 bits out, but the problem is that the Memory unit reads in sequence of 4 - 16 bit values everytime. This means half the data it writes is "XXXX" and can't figure out how to fill that space with meaningful data. Here is my output (Last few lines show the problem, the first part is just inititailization stuff that might be helpful):

ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 438401.0 ps WARNING: 200 us is required before CKE goes active.
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 460801.0 ps INFO: Precharge All
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 486401.0 ps INFO: Load Mode 2
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 486401.0 ps INFO: Load Mode 2 High Temperature Self Refresh rate = 1X (0C-85C)
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 499201.0 ps INFO: Load Mode 3
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 DLL Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 Output Drive Strength = Full
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 ODT Rtt = 50 Ohm
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 Additive Latency =           0
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 OCD Program = OCD Exit
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 DQS_N Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 RDQS Enable = Disabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 512001.0 ps INFO: Load Mode 1 Output Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0 Burst Length =  4
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0 Burst Order = Sequential
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0 CAS Latency =           5
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0 Test Mode = Normal
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0 DLL Reset = Reset DLL
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0 Write Recovery =           5
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 524801.0 ps INFO: Load Mode 0 Power Down Mode = Fast Exit
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 537601.0 ps INFO: Precharge All
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 563201.0 ps INFO: Refresh  
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 691201.0 ps INFO: Refresh  
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0 Burst Length =  4
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0 Burst Order = Sequential
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0 CAS Latency =           5
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0 Test Mode = Normal
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0 DLL Reset = Normal
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0 Write Recovery =           5
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 819201.0 ps INFO: Load Mode 0 Power Down Mode = Fast Exit
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 DLL Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 Output Drive Strength = Full
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 ODT Rtt = 50 Ohm
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 Additive Latency =           0
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 OCD Program = OCD Default
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 DQS_N Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 RDQS Enable = Disabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 832001.0 ps INFO: Load Mode 1 Output Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 DLL Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 Output Drive Strength = Full
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 ODT Rtt = 50 Ohm
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 Additive Latency =           0
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 OCD Program = OCD Exit
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 DQS_N Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 RDQS Enable = Disabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Load Mode 1 Output Enable = Enabled
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 844801.0 ps INFO: Initialization Sequence is complete
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 864001.0 ps INFO: Precharge All
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 1382401.0 ps INFO: Activate  bank 0 row 0000
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .cmd_task: at time 1395201.0 ps INFO: Write     bank 0 col 080, auto precharge 0
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .main: at time 1401601.0 ps INFO: Sync On Die Termination = 1
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .data_task: at time 1409601.0 ps INFO: WRITE @ DQS= bank = 0 row = 0000 col = 00000080 data = 5678
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .data_task: at time 1411201.0 ps INFO: WRITE @ DQS= bank = 0 row = 0000 col = 00000081 data = 1234
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .data_task: at time 1412801.0 ps INFO: WRITE @ DQS= bank = 0 row = 0000 col = 00000082 data = xxxx
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .data_task: at time 1414401.0 ps INFO: WRITE @ DQS= bank = 0 row = 0000 col = 00000083 data = xxxx
ReadWrite_MIG_tb.\MEM_INST3.u_mem_c3 .main: at time 1422401.0 ps INFO: Sync On Die Termination = 0

At the time the p0_cmd is put into the cmd FIFO, the p0_wr_count is 3 (I filled it with a few extra in case that was the problem). The example_design tb also performs 4 consecutive writes, but their isn't "XXXX".

I've been comparing my waveform to the tb and to UG388 and it really seems like I'm replicating it correctly, but not sure what's causing this behavior. How can I fill the "XXXX" with data or stop it from writing the extra values?

Any help would be greatly appreciated!


Solution

  • It would seem that after a few days and restarting my computer, the issue seems to have resolved itself. I can't recall making any significant changes and am now unable to replicate the behavior that I previously described.

    For now, I can consider this issue resolved, but I will update this if I discover anything new. I thought it would be something trivial, but this is just unexplainable.