Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Reset pins are used to put all your registers, FSM states into known state.
if (reset == 1'b0)
a <= 1'b0;
else
a <= b;
a - output; b as input.when reset is applied a will be assigned to 0. a will not vary wrt b until reset is removed.
For loop is synthesizable only.
for loop, if statements should be within always block.
put "count" also inside always block.
without using assign.
Do this changes along with what "FboDigit" suggested.
1. Synchronous reset will consume more area than asynchronous.
Check this links https://asic-world.com/tidbits/all_reset.html
2. synthesizer can able to infer synchronous reset.
Consider below Directory Format, in which under RTL folder each directory has one file needs to be included
Project
RTL
Func_1
Sub_func_1
Top
Func_2
TB
you can...
Problem is for loop will give you end result only. It wont give intermediate results.
You need to try some other way to get the results.
example you can try FSM to track no of zero's for this.
There may be some better way to implement this
Then put outside the "for loop".
In FOR LOOP output will be updated after one complete run.
You cant see the intermediate results.
Since you are assigning the counter value to zero, it overrides the original value.
Even if you initialize the "o" as 1 also, it will give result as zero only
if(i[j]==0)
begin
count=count+1;
end
else
begin
o=count;
count=0; --- remove or comment this part and check. you are assigning count value zero here. It is under for loop. so it is causing the issue
end
end
end
endmodule
we need to make sure that data 0 is atleast stable for two clocks in the receiver domain before sending 1.
If the receiver fails to receive correct data, we need to use different type of synchronizer to get the correct value.
Output is not initialized to any value.
So it will take XX only.
If you perform any operation with X's you will get x only.
If it is synthesizable code
use one pin to reset the value of registers
else
you can use initial(it will execute only once not always) or the way you have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.