Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
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.

Time delay

Altera_Forum
Honored Contributor II
1,861 Views

Hello 

I want to create time delay using logic gates (not flip-flops) 

When I put carry gates, or any other gates, the time analyzer shows 0 delay 

 

 

Can anyone help 

 

 

I can use only max-plus (version 10.2)
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
1,106 Views

I guess you want to cascade 'AND' gates :-) (70's technology inside ;-)) 

I think it is optimized at the synthesis task : it is just simplified by using a simple interconnection. 

 

Maybe use a delayed clock. I am not sure it is a good idea.
0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

Cascading logic cannot create a guaranteed time delay because the routing can vary. Never rely on it to create a specific time delay.  

 

The only way to create a reliable time delay is with flip-flops.
0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

A useful answer, I hope: 

 

You can apply a 'keep' setting to restrain the compiler from optimizing it away. 

In VHDL: 

signal wire_to_keep : std_logic; attribute keep: boolean; attribute keep of wire_to_keep: signal is true;  

There is similar setting in Verilog. It is 'stuffed' into a comment in the declaration, before the closing semi-colon. 

wire keep_wire /* synthesis keep */;  

AHDL is very Spartan (no pun intended): 

output = LCELL( input ) ;
0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

thank you for response 

my work is based on time difference between delay of carry gate and flip-flop 

I use devise EPM7160ELC84-12 and when i program it, the timing simulator shows 0 delay between the gates 

 

unfortunately i cant post images... 

 

do anyone knows why is it happening, and what should i do?
0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

Im guessing the synthesisor removed your logic as it was seen as redundant. Have you used the keep attributes (outlined above) to stop it doing this?

0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

 

--- Quote Start ---  

Have you used the keep attributes (outlined above) to stop it doing this? 

--- Quote End ---  

 

Do you know, if these synthesis attrubutes are working with MaxPlus? 

 

In addition, it's known that the CPLD synthesizer works partly different from FPGA. With Quartus, additional settings are required for CPLD: 

http://www.alteraforum.com/forum/showthread.php?t=22110
0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

so, you say that there no way to see delay from logic elements in maxplus? 

what about quartus, do the simulation shows the delay?
0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

I said, I don't know if it works in MaxPlus. In Quartus, follow the method reported in the said post, using a keep attribute for the respective signals and setting Ignore LCELL Buffers to off. The delay will be shown in simulation, also the compilation report indicates the additional macro cell usage.

0 Kudos
Altera_Forum
Honored Contributor II
1,106 Views

ok thank you

0 Kudos
Reply