generator quick fix
This commit is contained in:
@ -43,7 +43,8 @@ module generator
|
||||
cnt_pulse_num <= '0;
|
||||
cnt_period <= '0;
|
||||
sample_req <= 0;
|
||||
end else begin
|
||||
end
|
||||
else begin
|
||||
if (start & !enable) begin
|
||||
enable <= 1'b1;
|
||||
cnt_pulse_num <= '0;
|
||||
@ -77,12 +78,12 @@ module generator
|
||||
end
|
||||
else begin
|
||||
|
||||
if (cnt_period <= pulse_width_reg) begin
|
||||
if (cnt_period < pulse_width_reg - 1) begin
|
||||
pulse_height_out_reg <= pulse_height_reg;
|
||||
end else begin
|
||||
pulse_height_out_reg <= ZERO_LEVEL;
|
||||
end
|
||||
if (cnt_period == pulse_period_reg) begin
|
||||
if (cnt_period == pulse_period_reg - 1) begin
|
||||
cnt_period <= 0;
|
||||
end else begin
|
||||
cnt_period <= cnt_period + 1;
|
||||
|
||||
Reference in New Issue
Block a user