--- Quote Start ---
example pwm_adj<= counter + 1 // that mean the increment value is "1" every clock rising edge or high
pwm_adj <= counter[25:20];how i know the increment value?
--- Quote End ---
There's no increment involved.
This simply assign to PWM_adj the same value as bits 25 to 20 of counter array
--- Quote Start ---
for make easy to understand how could make it in vhdl
PWM_width <= PWM_width[5:0]+ PWM_adj;
and
PWM_adj <= counter[25:20];
--- Quote End ---
I'm not versed in VHDL. I rather use verilog.
I think you should use something like:
PWM_width <= ('0' & PWM_width(5 downto 0)) + ('0' & PWM_adj);
PWM_adj <= counter(25 downto 20);
--- Quote Start ---
is it like this "pwm_width <= pwm_width[5]+ pwm_adj"?
--- Quote End ---
No. pwm_width[5] only adds a 1bit value, by taking the 5th bit from pwm_width.
--- Quote Start ---
i think verilog it's quite diffucult to understand than vhdl
--- Quote End ---
People usually thinks the opposite way.
Verilog is simpler, especially for users with a C programming background.
vhdl is more powerful but syntax is somehow very different from what sw programmers are used to.
Moreover vhdl requires a strong type consistency, where verilog has looser rules.