Home.Verilog.Digital Design.Digital Basics.Python.RF Basics.
Previous.
Next.
Custom Search

Feedback ? Send it to admin@fullchipdesign.com or join me at fullchip@gmail.com

Legal Disclaimer

Chip Designing for ASIC/ FPGA Design engineers and Students
FULLCHIPDESIGN
Digital-logic Design...  Dream for many students… start learning front-end…

Legal Disclaimer

PICS
Verilog Tutorial.

Register transfer level (RTL) is used to create a high level description of a synchronous digital circuit.

If  - Else are used to generate priority logic in RTL. It can be used in both synchronous and combinational logic.

Synchronous priority logic generation

In this scenario entire logic within always block is executed in parallel with respect to a reference clock. ‘<=‘ operator is called non-blocking operator.

In this scenario the logic is implemented independent to clock. All statements in this block are executed in sequence. ‘=‘ is called blocking operator.

reg r_packet_in;

reg packet_in;

 

always@(posedge clk_1fs or negedge rst_n)

begin

    if (!rst_n) begin

        r_packet_in <= 'b0;

    end

    else begin

        r_packet_in <= packet_in;

    end

End

 

 

Check the complete implementation of the above logic in verilog testbench example.

Conditional if-else statements in Verilog

Home Verilog Initial stmts IF-ELSE Case stms Readmemh Function Testbench Binary to Gray Clock Crossing Half-adder Full-adder Tristate buffer Adder tb Counter_enable Blocking Operators Shift LSR Random Nos Sync RAM Verilog Tutorial