quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../../images/main/bullet_green_ball.gif 8-Bit Simple Up Counter
   

space.gif


  1 //-----------------------------------------------------
  2 // Design Name : up_counter
  3 // File Name   : up_counter.sv
  4 // Function    : Up counter
  5 // Coder      : Deepak
  6 //-----------------------------------------------------
  7 module up_counter    (
  8 output reg [7:0] out     ,  // Output of the counter
  9 input  wire      enable  ,  // enable for counter
 10 input  wire      clk     ,  // clock Input
 11 input  wire      reset      // reset Input
 12 );
 13 //-------------Code Starts Here-------
 14 always_ff @(posedge clk)
 15 if (reset) begin
 16   out <= 8'b0 ;
 17 end else if (enable) begin
 18   out ++;
 19 end
 20 
 21 endmodule 
You could download file sv_examples here
   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com