1.1 声明(declaration)存在于
Begin:name
HERE
End
fork:name
HERE
Join
Function;
HERE
Endfunction
Task;
HERE
Endtask
Module;
HERE
Endmodule
其中声明包含:input,output,register,integer,parameter等,但并不是所有的声明都可以存在于上述的结构中.
1.2 always,initial,task和function是4中construct。
但是4中construct的结构是不同的。
1.3
module ModuleName [( Port,...)];
ModuleItems...
endmodule
macromodule ModuleName [( Port,...)];
ModuleItems...
endmodule
ModuleItem = {either}
Declaration
Defparam
ContinuousAssignment
Instance
Specify
Initial
Always
Declaration = {either}
Port
Net
Register
Parameter
Event
Task
Function
1.4 parameter声明存在于:
Begin:name
HERE
End
fork:name
HERE
Join
Function;
HERE
Endfunction
Task;
HERE
Endtask
Module;
HERE
Endmodule
参数在编译的时候被替换掉。
1.5 statements包括以下:
TimingControl Statement {语句可以为空}
Begin
Fork
ProceduralAssignment
ProceduralContinuousAssignment
Force
If
Case
For
Forever
Repeat
While
Disable
-> EventName; {事件触发器}
TaskEnable
在何处使用
initial-<HERE>
always-<HERE>
begin-<HERE>-end
fork-<HERE>-join
task-<HERE>-endtask {允许为空}
function-<HERE>-endfunction
if()-<HERE>-else-<HERE> {允许为空}
case- label:-<HERE>-endcase {允许为空}
for(<HERE>)-<HERE>
forever-<HERE>
repeat()-<HERE>
while()-<HERE>
1.6 task
Task taskname;
Declaration
statement
Endtask
其中declaration包括:
input [ Range] Name,...;
output [ Range] Name,...;
inout [ Range] Name,...;
Register
Parameter
Event
1.7 function
function [ RangeOrType] FunctionName;
Declarations...
Statement
endfunction
Declaration = {either}
input [ Range] Name,...;
Register
Parameter
Event
1.8 begin语句块
begin [: Label
[ Declarations...]]
Statements...
end
Declaration = {either} Register Parameter Event
1.9 fork语句块
fork [ : Label
[ Declarations...]]
Statements...
join
Declaration = {either} Register Parameter Event
文章评论(0条评论)
登录后参与讨论