Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Verilog delay modelling

Hi,

My verilog code is shown below,

Code:

module tq ( input a, output reg b);

always (*)

b =# 5 a;

endmodule

I am unable to make out the waveform, what actually this statement does.

Can anyone share your thoughts.

Regards,

freak

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    is that what you want?

    by the way sim_tq is simulation base project.

    //--------------------------------------------------------------------

    `timescale 1ns/1ns

    module tq ( input a, output reg b);

    always @ ( * )

    begin

    b <=# 5 a;

    end

    endmodule

    module sim_tq;

    reg a;

    initial

    fork

    # 0 a = 1;

    # 105 a = 0;

    # 200 a = 1;

    join

    tq obj

    (

    .a(a),

    .b()

    );

    endmodule

    //--------------------------------------------------------------------