2008 Oct 18
Compiler Directives | FAQ | Hints | Keywords | Links |
Modeling | Notes | PLI | Quick Ref. | Syntax | Syntax P1 P2 |
Created by Gateway Design Automation in 1983, acquired by Cadence Design Systems. Is case sensitive. Has file IO capabilities. The module is the basic unit of description, and can be one of the following styles:
A delay is specified in time units, e.g.assign #2 sum = a^b;or assign sum = #2 a^b; |
Absolute time is specifed as follows:
assign #2 sum <= a^b;or assign sum <= #2 a^b; |
The arbitrary time units are related to physical time with the following
compiler directive:
`timescale 1ns / 100 pswhich means each time unit is 1ns with a precision of 100ps (0.1ns). Without the above compiler directive the simulator uses the default time unit specified by the IEEE std. |
module decoder2x4 (a, b, wn, z); input a, b, en; output [0:3]z; wire abar, bbar; assign @1 abar = ~a; assign @2 z[0] = ~(abar & bbar &en); assign @2 z[1] = ~(abar & b &en); assign @2 z[2] = ~(a & bbar &en); assign @2 z[3] = ~(a & b &en); endmodule
module fa_seq (a, b, cin, sum, cout); input a, b, cin; output sum. cout; reg t1, t2, t3; always assign @1 abar = ~a; assign @2 z[0] = ~(abar & bbar &en); assign @2 z[1] = ~(abar & b &en); assign @2 z[2] = ~(a & bbar &en); assign @2 z[3] = ~(a & b &en); end endmodule
Allows access to a verilog module.
2005-2008