|
|
|

|
|
|
|
|
|

|
|
 |
Default Clocking
|
|
|
One clocking can be specified as the default for all cycle delay operations within a given module, interface, or program. Only one default clocking can be specified in a program, module, or interface. |
|
|

|
|
|
Any ## statment will be executed with respect to default clocking. |
|
|

|
|
|
|
|
|

|
|
 |
Example : Default Clocking
|
|
|

|
|
|
1 module clocking_default();
2
3 logic clk = 0;
4 always #10 clk++;
5
6 // Specify the default clocking
7 default clocking test @ (posedge clk);
8
9 endclocking
10
11 initial begin
12 $display("%0dns is current time",$time);
13 // Any ## is evaluated with respect to default clock
14 ##100 ;
15 $display("%0dns is current time",$time);
16 $finish;
17 end
18
19 endmodule
You could download file clocking_default.sv here
|
|
|

|
|
 |
Simulation : Default Clocking
|
|
|

|
|
|
0ns is current time
1990ns is current time
|
|
|

|
|
|

|
|
|

|
|
|
|
|
|

|
|
|
|
|
|

|
|
Copyright © 1998-2025 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|