Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > how to set delays on signa;s in VHDL

Reply
Thread Tools

how to set delays on signa;s in VHDL

 
 
Viswan
Guest
Posts: n/a
 
      10-06-2004
hi,

I have a question regarding inserting delays for signals in design. I
know that there are these transport delay statements to specify
certain time. But I believe they are not synthesizable and won't
produce the same result after implementing onto any FPGA.Is there any
way to set delays on signals in design to get the exact synthesized
result?

Thanks
V.N
 
Reply With Quote
 
 
 
 
Pieter Hulshoff
Guest
Posts: n/a
 
      10-06-2004
Viswan wrote:
> I have a question regarding inserting delays for signals in design. I
> know that there are these transport delay statements to specify
> certain time. But I believe they are not synthesizable and won't
> produce the same result after implementing onto any FPGA.Is there any
> way to set delays on signals in design to get the exact synthesized
> result?


No, not really. The best you can hope for is by instantiating a specific
component of which you can predict the delay, but even that delay will vary
with temperature, power, etc. What did you want to use it for anyway?

Regards,

Pieter Hulshoff

 
Reply With Quote
 
 
 
 
Viswan
Guest
Posts: n/a
 
      10-07-2004
Pieter Hulshoff <> wrote in message news:<416461f5$0$130$4all .nl>...
> Viswan wrote:
> > I have a question regarding inserting delays for signals in design. I
> > know that there are these transport delay statements to specify
> > certain time. But I believe they are not synthesizable and won't
> > produce the same result after implementing onto any FPGA.Is there any
> > way to set delays on signals in design to get the exact synthesized
> > result?

>
> No, not really. The best you can hope for is by instantiating a specific
> component of which you can predict the delay, but even that delay will vary
> with temperature, power, etc. What did you want to use it for anyway?
>
> Regards,
>
> Pieter Hulshoff



I am designing a hardware unit that can be used as an interface to a
sensor and the FPGA on which my rest of the hardware exists. I have
to generate some synchronizing clock signals at certain delays, to
start the communication.

for example 2 siignals are needed to be sent to sensor as follows.
data is bidirectional.

data <---> ----| |-------
|----------|
|-----| |----|
sclk <---- --| |----| |-----

I thought it would be better if I could generate it using delays..
ANother idea I have in my mind is to use counters and generate these
waveforms. But i doubt if there is any other good idea for this.

Thanks a lot.
 
Reply With Quote
 
Pieter Hulshoff
Guest
Posts: n/a
 
      10-07-2004
Viswan wrote:

> I am designing a hardware unit that can be used as an interface to a
> sensor and the FPGA on which my rest of the hardware exists. I have
> to generate some synchronizing clock signals at certain delays, to
> start the communication.
>
> for example 2 siignals are needed to be sent to sensor as follows.
> data is bidirectional.
>
> data <---> ----| |-------
> |----------|
> |-----| |----|
> sclk <---- --| |----| |-----
>
> I thought it would be better if I could generate it using delays..
> ANother idea I have in my mind is to use counters and generate these
> waveforms. But i doubt if there is any other good idea for this.


Do you have any information on how stable your clock should be? I think it's
probably wisest to put a clock crystal on your board, and either use that
clock or derive a clock from that clock. Creating one directly from logic
within your FPGA will most likely not give you a workable clock, unless you
have a very very loose timing specification.

Regards,

Pieter Hulshoff

 
Reply With Quote
 
Technology Consultant
Guest
Posts: n/a
 
      10-07-2004
Viswan wrote:

> I am designing a hardware unit that can be used as an interface to a
> sensor and the FPGA on which my rest of the hardware exists. I have
> to generate some synchronizing clock signals at certain delays, to
> start the communication.
>
> for example 2 siignals are needed to be sent to sensor as follows.
> data is bidirectional.
>
> data <---> ----| |-------
> |----------|
> |-----| |----|
> sclk <---- --| |----| |-----
>
> I thought it would be better if I could generate it using delays..
> ANother idea I have in my mind is to use counters and generate these
> waveforms. But i doubt if there is any other good idea for this.



Hello,

I remember your post about the SHT7x, and thought this piece of code might
help you:

library ieee ;
use ieee.std_logic_1164.all ;

entity driver is
port (
rstb : in std_logic; -- Reset Active Low
clk : in std_logic; -- Clk Input
SCK : out std_logic; -- SCK
DATA : inout std_logic -- DATA
) ;
end driver ;

architecture rtl of driver is

begin
main : process (rstb, clk)
type state_t is (
idle,
start1,start2,start3,start4,start5,start6,
address1, --to be continued
ack1, --to be continued
waiting --to be continued
);
variable state : state_t;

begin
if rstb = '0' then
state := idle;
DATA <= 'Z';
SCK <= '0';
elsif clk'event and clk='1' then
case state is
when idle =>
state := start1;
when start1 =>
DATA <= '1';
SCK <= '1';
state := start2;
when start2 =>
DATA <= '0';
SCK <= '1';
state := start3;
when start3 =>
DATA <= '0';
SCK <= '0';
state := start4;
when start4 =>
DATA <= '0';
SCK <= '1';
state := start5;
when start5 =>
DATA <= '1';
SCK <= '1';
state := start6;
when start6 =>
DATA <= '1';
SCK <= '0';
state := address1;
when others =>
--to be continued
end case;
end if;
end process main;


If you need further help, contact me through e-mail, why is yours not working?

TechCon
 
Reply With Quote
 
Paulo Valentim
Guest
Posts: n/a
 
      10-07-2004
(Viswan) wrote in message
>
> I am designing a hardware unit that can be used as an interface to a
> sensor and the FPGA on which my rest of the hardware exists. I have
> to generate some synchronizing clock signals at certain delays, to
> start the communication.
>
> for example 2 siignals are needed to be sent to sensor as follows.
> data is bidirectional.
>
> data <---> ----| |-------
> |----------|
> |-----| |----|
> sclk <---- --| |----| |-----
>
> I thought it would be better if I could generate it using delays..
> ANother idea I have in my mind is to use counters and generate these
> waveforms. But i doubt if there is any other good idea for this.
>
> Thanks a lot.


The best way to do this is to drive the data on the falling edge of
the clock so the the data is interpreted by the sensor on the rising
edge.

If the clock is too fast, then the best way is, like somebody already
said, to use a crystal or internal FPGA PLL. Then you would use (if
clock'falling_edge) expression.

If the clock is slow enough then it can be generated using logic with
the FPGA.

Take care,

- Paulo Valentim
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delays-delays-delays Colin Palmer Computer Support 5 02-26-2008 04:41 AM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
VHDL Simulation delays stoyan.shopov@gmail.com VHDL 5 04-13-2005 09:19 AM
delays: inertial delays vs. transport delays Neil Zanella VHDL 2 10-20-2003 07:27 AM
Synchronous processes and delays Thomas VHDL 2 07-06-2003 10:24 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57