Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Unexpected Output in Simple Configuration

Hello,

I am working with a TI TSW1400 board, which has a Stratix IV FPGA on it. Right now, I am trying to something quite simple. I have a 16-bit counter connected to a 32-bit ROM with 16 address bits. I am initializing the ROM with a pattern that alternates:

FFFF0000 --> 0000FFFF --> FFFF0000 --> 0000FFFF

Its a simple pattern I am using to generate two separate square waves that are 16-bits wide, and 180 degrees out of phase (the first 16 bits are signal A, the second signal B). Every time the counter counts, the square waves should invert. The code I am using is as follows:

counter counter_inst(
	.clock (data_clk),
	.q (signal_address)
);
wire  chA;
wire  chB;
signalROM signalROM_inst(
		.address	 (signal_address),
		.clock (output_clk),		
		.q	({chA,chB})
);
assign sma = chA;
assign sma = chB;

Please note, the output_clk and data_clk are 90 degrees out of phase. Right now, I am taking the first bit of both chA and chB and looking at them on an oscilloscope. However, when I measure the signals I am getting signals that are 90 degrees out of phase, instead of 180 degrees out of phase!

Picture of O-Scope measurement:

http://imgur.com/myc36m7

Does anyone have any insight on why this may be happening?

Thank you!

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You never got a response to this so I'll chime in ...

    It should not be possible to get a 90 degree phase difference between the output clocks given your circuit. The delay between the clocks in the oscilloscope trace is only about 2ns. I'm guessing that's just differences in the routing paths from the ROM through the fabric to the output pins. 2ns seems like a large difference just due to routing, but if you constrain the output paths, or reclock the sma outputs with output_clk and place those registers in the IOBs, then you should see the phase difference disappear.

    Have you already resolved this for yourself? If so, please post back what you found.