I am trying to design a counter whose value might vary based on the frequency of the reference clock. So if I want to observe the count value for 5 cycles of time, how do I save those values?
for example if I have something like
Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
always@(posedge clk)
begin
count=count+1;
if(count==some value)
begin
count=0;
high=1;
end
if(high==1)
begin
newcount1<=count2; // Count2 is another counter which detects the edges in a signal and increments.
end
end
Now my problem is I want to observe the value of newcount1,newcount2newcount3,newcount4,newcount5 etc., so how do I store the values like this usine VERILOG?
Now my problem is I want to observe the value of newcount1,newcount2newcount3,newcount4,newcount5 etc., so how do I store the values like this usine VERILOG?
But my "newcount1" is a 32 bit register. So the value of this 32 bit register isn't going to the mem variable. Am i missing out something? please help. thanks in advance