State the structure of verilog code you follow, Computer Engineering

State the structure of Verilog code you follow?

A good template for your Verilog file is shown below.

// timescale directive tells the simulator the base units and precision of the simulation

'timescale 1 ns / 10 ps

module name (input and outputs);

// parameter declarations

parameter parameter_name = parameter value;

// Input output declarations

input in1;

input in2; // single bit inputs

output [msb:lsb] out; // a bus output

// internal signal register type declaration  -  register types (only assigned within always statements).

reg register variable 1;

reg [msb:lsb] register variable 2;

// internal signal. net type declaration - (only assigned outside always statements) wire net variable 1;

// hierarchy - instantiating another module

reference name instance name (

.pin1 (net1),

.pin2 (net2),

.

.pinn (netn)

);

// synchronous procedures

always @ (posedge clock)

begin

.

end

// combinatinal procedures

always @ (signal1 or signal2 or signal3)

begin

.

end

assign net variable = combinational logic;

endmodule

 

Posted Date: 9/17/2013 3:01:24 AM | Location : United States







Related Discussions:- State the structure of verilog code you follow, Assignment Help, Ask Question on State the structure of verilog code you follow, Get Answer, Expert's Help, State the structure of verilog code you follow Discussions

Write discussion on State the structure of verilog code you follow
Your posts are moderated
Related Questions
Update -task updates are Asynchronous updates.

Cache-Only Memory Access Model (COMA) As we have discussed previous, shared memory multiprocessor systems may use cache memories with each processor for deducting the execution

Explain Recursive Descent Parsing It is a top down parsing with no backtracking. This parsing method uses a set of recursive processes to perform parsing. Most important advant

Prove the following Boolean identities using the laws of Boolean algebra (A + B)(A  + C) = A + BC Ans. (A+B)(A+C)=A+BC LHS AA+AC+AB+BC=A+AC+AB+BC OR  A((C+1)+A(B+1))+BC

Introduction Our research methodology requires gathering relevant data from the specified documents in order to analyze the material and arrive at more complete understanding

Sometime you may have to reset your computer (i.e., Reboot DOS) when it is still running because DOS does not work accurately. To reset your computer you have two choices: 1. P

The A/D converter whose conversion time is independent of the number of bits is ? Ans. Parallel conversion is the A/D converter whose conversion time is independent of the Numbe

Grounding a variable - first-order logic: The perform of making ourselves clear about a variable by introducing an exists or a forall sign is called quantifying the variable.

Q. What is Capacitor-Based Keyboards? These keyboards are based on the idea of Capacitance. A simple capacitor comprises a pair of conductive plates having opposite charges and

Explain characteristics of Latch and Flip-Flop. Latches are level-sensitive and transparent While the clock is high it passes input value to Output While the clock is l