






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
These lecture slides are from pakistani unvieristy. These are helpful in Data Communication Network course. I hope Instructor M. Mohisn Rahmattulah wont mind me making these public. I got it from my friend. Its points are: Expression, Posedge, Negedge, Generating, Reset, Executaion, Parameter, Built, Gate, Wire
Typology: Slides
1 / 10
This page cannot be seen from the preview
Don't miss anything!







HDL Based Digital Design using Verilog By M. Mohsin Rahmatullah @ SS-CARE School of Engineering $time A built-in variable that represents simulated time a unit less integer $display($time, “a=%d”, a); Delay-Based Timing Control # Delay-based timing control in an expression specifies thetime duration between when the statement isencountered and when it is executed #
HDL Based Digital Design using Verilog By M. Mohsin Rahmatullah @ SS-CARE School of Engineering
@(expression) @(expression or expression or …) @(posedge onebit) @(negedge onebit) do not execute statement until event occurs @(clk) is same as @(posedge clk or negedge clk) @(clock) q = d; //q = d is executed whenever signal clock changes value @(posedge clock) q = d; //q = d is executed whenever signal clock does a positive transition @(negedge clock) q = d; //q = d is executed whenever signal clock does a negative transition q = @(posedge clock) d; //d is evaluated immediately and assigned to q at the positive edge of clock
HDL Based Digital Design using Verilog By M. Mohsin Rahmatullah @ SS-CARE School of Engineering
Delay # Event Control @ Delay execution until event occurs
HDL Based Digital Design using Verilog By M. Mohsin Rahmatullah @ SS-CARE School of Engineering
//A level-sensitive latch with asynchronous reset always @( reset or clock or d) //Wait for reset or clock or d to change begin if (reset) //if reset signal is high, set q to 0. q = 1'b0; else if(clock) //if clock is high, latch input q = d; end
HDL Based Digital Design using Verilog By M. Mohsin Rahmatullah @ SS-CARE School of Engineering
//A level-sensitive latch with asynchronous reset always @( reset, clock, d) //Wait for reset or clock or d to change begin if (reset) //if reset signal is high, set q to 0. q = 1'b0; else if(clock) //if clock is high, latch input q = d; end
HDL Based Digital Design using Verilog By M. Mohsin Rahmatullah @ SS-CARE School of Engineering We must reset all the feedbackregisters in the design. Example: reset (active low) the systemafter 5 time units: initial begin rst_n = 1’b1; # 5 rst_n = 1’b0; end