Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17267 Discussions

How should I write Verilog to describe DDR?

Altera_Forum
Honored Contributor II
3,447 Views

I have a design, which I need make the data is launched by double data rate (DDR). In this case, should I write the Verilog like this ? : 

 

always @(posedge clk or negedge clk) 

begin 

output <= a; 

end 

 

Another approach I can think is I use PLL to create two clocks: clk1 and clk2. The period of clk2 is twice as clk1 while they have exactly same phase. Then, I use clk1 to launch data in SDR but output clk2 and data. Then the data with clk2 is DDR. But I don't think this is the right approach since this is actually still SDR. 

 

Hope anyone has experience in this can give some advices. 

 

Thanks very much.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
2,226 Views

The always block isn't synthesizable. 

You'll use a altddio_out megafunction, it can't be inferred from HDL.
0 Kudos
Altera_Forum
Honored Contributor II
2,226 Views

Just to clarify, one can describe synthesizable DDR I/O in Verilog but, as FvM said, Quartus won't infer it and won't use the DDR I/O logic embedded in the I/O elements. 

So, you should use the altddio_out megafunction.
0 Kudos
Altera_Forum
Honored Contributor II
2,226 Views

Thanks very much, both of you.

0 Kudos
Reply