Forum Discussion
Altera_Forum
Honored Contributor
11 years agoRule number 1 of coding: Make it readable :). Please use meaningful signal names. '_t1' doesn't tell me anything.
A tip when posting code: wrap the code tags around any text you post. e.g.module convert_Ref(input clk, input in, output reg out);
reg _t1, _t2, _t3, _i1;
reg _tA, _tB;
Then you won't end up with unwanted smilies B) littered about your code and it will maintain any (very helpful) indentation you may have included in your original code... As for the actual problem with the code - I'm really not sure what you're trying to achieve. You mention PWM in the title but I really can't see what you're trying to do. For starters: counter '_t2' increments under certain conditions but nothing is dependent on it. So, what is it there for? Perhaps a description of what it is you're trying to do would be the place to start... Regards, Alex