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:
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
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