Loadable and unloadable counters

24 views
Skip to first unread message

Varun Malhotra

unread,
Sep 3, 2012, 3:52:12 AM9/3/12
to vlsiat...@googlegroups.com
 
 I wanted to know is there any value stored in the counters initially
 and what is the concept of loadable and unloadable counters in this?



For eg
module coun( clk,reset,enable,count_out);
input clk,reset,enable;
output reg [3:0] count_out;
initial
begin
$display(count_out);                                         //what will be the value of count_out based on  the loadable and
                                                                       // unloadable counters?
end


always@(posedge clk)
if(reset==1'b1)
count_out<=4'b0000;
 else if(enable==1'b1)
count_out<=count_out+1;
etc,etc






Reply all
Reply to author
Forward
0 new messages