The Verilog always statement, namely
always @(/* condition */)
/* block of code */
executes the block of code whenever condition is satisfied. How is such an always block implemented in hardware?
|
The Verilog
executes the |
||||
|
First, note that not all Verilog designs are synthesizable. Usually, only a very specific subset of constructs can be used in a design that is to be realized in hardware. One important restriction that pops up is that every The following types of
In the former case, the Registers that have affinity to Consider the following, somewhat contrived example.
Here, Depending on the hardware you have available, other types of constructs can be used. For example, if the flip-flops have asynchronous resets, the following construct is also synthesizable.
|
|||||||
|
|
An In an FPGA a flip-flop and a latch are generally just two different configurations of a more general-purpose register device. A multiplexer would be constructed from one or more general-purpose logic elements (LUTs). In general, there's two ways to go about design with Verilog:
EDIT Avakar's answer is a much better one for your question, but this spurred some interesting discussion about the differences between Xilinx and Altera so I won't delete it. |
|||||||||||
|
block of codeis.. – m.Alin Apr 9 '12 at 13:36posedge xor justx– Justin Apr 9 '12 at 14:26posedge. – Randomblue Apr 9 '12 at 15:14