Continue to Site

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.

Delay statement and clock generation in Verilog

Status
Not open for further replies.

ds18s20

Full Member level 3
Joined
Jun 13, 2006
Messages
171
Helped
13
Reputation
26
Reaction score
11
Trophy points
1,298
Location
San Francisco
Activity points
2,511
Hi everyone,

Since we know that FPGA in general CAN NOT generate clock, but instead a clock must be fed into them from another source.

Then why is there # xx delay statement in Verilog or to put it another way - why are there so many examples of how we can "generate" a clock with:

Code:
@always #10 q= ~q

That never made sense to me? How would the FPGA know what the length of 10 time units is and where do the time units come from in the first place? Is this some evil compiler thing or does it exist PURELY SYNTHENICALLY only within the software environment for the purpose of testing and simulation?

And even if this is synthetic concept, how does one tell the compiler what one time unit is and where is the counting kept for this to work? Is it all transparent to the Quartus2 user?

In my mind I see serious conceptual problems when I encounter “assign # xx” statements.

Thanks much
~B
 

It's necessary for a test bench though.
 

Well!

This is indeed for test and simulation purposes ...
so that you can test your design yourself in the Software itself ....


and see if your design meets timing requirements




This thing is not at all synthesizeable .... at all

As for the time units you will have noticed they are specified in form of 'timescale ' to the tool we are using (I use Xilinx ISE )


You are right in that it is purely within software .....
That would indeed be a magic if a black box of hardware knows about seconds and nanosecs by itself
 

u r question is nice,but dnt give clk signal in the ckt,instead introduce some combinational ckt which is having delay.
 

Delay statement and clock generation in HDL i think

it for designer to get some hint about signal and delayed signal due to path,

so that he will at least think in that direction .
 

verification required those delay a lot...

when creating behavioral models... when doing testbench.

but when you are FPGA user, we won't use that as those delay statement is unsynthesizable...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top