how to generate delay in fpga ? (2025)

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

RegisterLog in

  • Digital Design and Embedded Programming
  • PLD, SPLD, GAL, CPLD, FPGA Design
  • Thread starterhm_fa_da
  • Start dateDec 23, 2006
Status
Not open for further replies.
  • Dec 23, 2006
  • #1

hm_fa_da

Full Member level 5
how to generate delay in fpga ? (2)
Joined
Sep 16, 2003
Messages
287
Helped
10
Reputation
20
Reaction score
4
Trophy points
1,298
Activity points
3,217

fpga delay

Hello all ,

is this a 50 ns delay in fpga ?:
clock := not clock after 50 ns ;

?

what range could be used for time ? is it dependent on device oscilator ? how long can it be maximum and minimum ? and how is it done in gates ??? i mean how a delay is done in fpga or cpld gates .... ?

Thanks & Best Regards

  • Dec 23, 2006
  • #2

rakesh_aadhimoolam

Full Member level 4
how to generate delay in fpga ? (4)
Joined
Mar 14, 2006
Messages
206
Helped
19
Reputation
38
Reaction score
2
Trophy points
1,298
Activity points
2,751

delay in fpga

Better go through this link.........

all the best......

  • Dec 23, 2006
  • #3

gliss

Advanced Member level 2
how to generate delay in fpga ? (6)
Joined
Apr 22, 2005
Messages
691
Helped
75
Reputation
150
Reaction score
16
Trophy points
1,298
Activity points
5,892

delay fpga

Maybe you can use a ring oscillator.
Usually FPGAs have clock generators or PLLs has hard macros. Check the FPGA datasheet

  • Dec 23, 2006
  • #4

salma ali bakr

Advanced Member level 3
how to generate delay in fpga ? (8)
Joined
Jan 27, 2006
Messages
969
Helped
104
Reputation
206
Reaction score
21
Trophy points
1,298
Activity points
7,491

using delay in fpga

The "After" keyword used for delays is ignored by the synthesis tool, because the tool knows that it's not synthesizable at this point in time.
It just mostly gives designers the ability to add delays into the RTL for modeling while still allowing the synthesizer to build circuit logic

  • Dec 25, 2006
  • #5

E

echo47

Advanced Member level 6
how to generate delay in fpga ? (9)
Joined
Apr 7, 2002
Messages
3,933
Helped
638
Reputation
1,274
Reaction score
90
Trophy points
1,328
Location
USA
Activity points
33,176

implementing delay in fpga

Yes, modern FPGA synthesis tools generally ignore HDL delay values.

It is usually possible to build a crude time delay into an FPGA by using vendor-specific techniques (such as a chain of carefully-placed gates with optimization disabled), but the accuracy would be difficult to control, and 50ns is a long time in a modern fast FPGA. Such designs are generally not recommended. Instead, try to design your project using synchronous techniques. For example, you could generate a 50ns delay by feeding your signal through a 5-tap shift register clocked at 100MHz.

  • Dec 25, 2006
  • #6

hm_fa_da

Full Member level 5
how to generate delay in fpga ? (11)
Joined
Sep 16, 2003
Messages
287
Helped
10
Reputation
20
Reaction score
4
Trophy points
1,298
Activity points
3,217

making delay with fpga

Dear all ,

Thanks for your replies ,

i am new to VHDL programming , i wanted to make a digital counter for example with my cpld - fpga board , one seven segment is connected to the MAX 7000 s CPLD , and the oscillator is 20 MHz , i wrote this program :

libraryieee;
useieee.std_logic_1164.all;

entity test_uni2 is
port (
s1 : out std_logic_vector ( 7 downto 0 ):= "00000011";
clk: in std_logic );
end test_uni2;

architecture counter of test_uni2 is
signalcounter : integer range 0 to 20000005 := 0;
signalcounter2 : integer range 0 to 15 := 0;
begin
process ( clk )
begin
if ( clk'event and clk = '1' ) then
counter <= counter+1 ;
if ( counter=20000000 ) then
counter <= 0;
counter2 <= counter2 + 1;
case counter2 is
when 0 => s1<= "00000011";
when 1 => s1<= "10011111";
when 2 => s1<= "00100101";
when 3 => s1<= "00001101";
when 4 => s1<= "10011001";
when 5 => s1<= "01001001";
when 6 => s1<= "01000001";
when 7 => s1<= "00011111";
when 8 => s1<= "00000001";
when 9 => s1<= "00001001";
counter2<= 0 ;
when others => counter2<= 0 ;
end case;
end if;
end if;
end process ;
end;

i haven't tested it in my board yet , but it works in Quartus simulator as i want ...,
but the problem is that in report of compilation , it says 51 of 128 macrocells are used for this program and i think it is too large for this ....
i used a counter to count 20,000,000 cycles of oscillator which is 20 MHz to make 1 second delay ...

What would you do if you were in my shoes ?!

  • Dec 26, 2006
  • #7

E

echo47

Advanced Member level 6
how to generate delay in fpga ? (12)
Joined
Apr 7, 2002
Messages
3,933
Helped
638
Reputation
1,274
Reaction score
90
Trophy points
1,328
Location
USA
Activity points
33,176

fpga how to delay signal

I don't have Altera tools, but I'll try some guesses.

Your design doesn't fill up the device, so maybe your synthesizer didn't bother optimizing for smallest size.

Maybe you synthesizer is set to optimize for fastest speed instead of smallest size. Look for a switch.

Your design has 21 counter bits plus four counter2 bits, plus eight s1 encoder output bits. That explains 33 macrocells. Perhaps your synthesizer needed two macrocells to get enough product terms for the longer equations. Try implementing each section separately to see how many macrocells each section consumes.

  • Dec 26, 2006
  • #8

hm_fa_da

Full Member level 5
how to generate delay in fpga ? (14)
Joined
Sep 16, 2003
Messages
287
Helped
10
Reputation
20
Reaction score
4
Trophy points
1,298
Activity points
3,217

how to provide delay in fpga

Thanks for your reply ,

i changed the optimazation from speed to area , now it uses 38 Macrocells, it is 30 % of cpld density .
however did i use a true way to make 1 second delay ? is there another way with fewer needed macrocells ... ?

Thanks & Best Regards.

Status
Not open for further replies.

Similar threads

  • Generate random number in range using LFSR

    • Started by neanton28
    • Replies: 41

    PLD, SPLD, GAL, CPLD, FPGA Design

  • A

    [SOLVED]How to test FPGA before soldering it?

    • Started by aminpix
    • Replies: 12

    PLD, SPLD, GAL, CPLD, FPGA Design

  • S

    Image fusion how to implementing on FPGA

    • Started by Sanila P
    • Replies: 1

    PLD, SPLD, GAL, CPLD, FPGA Design

  • B

    [SOLVED]Writing a verilog code to generate a single pulse?

    • Started by BALU@FPGA
    • Replies: 1

    PLD, SPLD, GAL, CPLD, FPGA Design

  • I

    Handling signal rate error in FPGA

    • Started by Igloo2
    • Replies: 4

    PLD, SPLD, GAL, CPLD, FPGA Design

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

  • Digital Design and Embedded Programming
  • PLD, SPLD, GAL, CPLD, FPGA Design
how to generate delay in fpga ? (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 5648

Rating: 4.3 / 5 (74 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.