I am using Xilinx ISE design suite for simuation of my Digital Circuit. I want to model delays into each individual element of my combinational circuit during simulation. I don't want to explicitly add delays into my module as it will bias my circuit. Is there a way?

  • \$\begingroup\$ Feels like a XY problem. Why do you want to do this? \$\endgroup\$ – DonFusili Mar 29 '18 at 6:54

There are at least three kind of simulations in FPGA design.

First kind is behavioral simulations, the fastest one. You really should explicitly add delays, but only to non-blocking assingment, to represent physically-existing propagation "clock-to-Q" delay on flip-flops. The value of delay should be taken from typical elements of FPGA registers, 20-50 ps is enough to get the circuit to behave correctly. Combinatorial logic doesn't need preemptive delays. As long as the prop delays are reasonably fit to used silicon thechnology, it won't "bias your circuit". Some compilers might do this job for you, but I always prefer the explicit delays.

Second kind of simulation is performed after mapping your logic into CLBs, which have known basic delays, so you don't need to change anything. Your pre-inserted delays will be ignored, so they do no harm.

The third round of simulation is run after place and routing. The tool will now know all delays nearly exactly, and back-annotate them into your netlist. Again, your artificial explicit delays will be replaced with real delays.

As you can see, the explicit delays in non-blocking assignments are harmless, but without them your design might behave incorrectly. You might make a mistake to tweak the design to meet your expectations of behavior, but this design might totally fall apart on next stages of compile process.

| improve this answer | |
  • \$\begingroup\$ One more question. Is adding explicit delays a bad practice? \$\endgroup\$ – Ashutosh Sancheti Mar 29 '18 at 16:29
  • \$\begingroup\$ @AshutoshSancheti, first, it is not "explicit delay", it is an "ordinal" delay to maintain the natural cause-effect relationship in register data transfer. As a matter of fact, in one company I used to work for, the discipline to use of flip-flop delays was eventually MANDATED by design automation management after several hick-ups and corresponding slips in development schedule. \$\endgroup\$ – Ale..chenski Mar 29 '18 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.