Commit 835859a9 authored by Jan Pospisil's avatar Jan Pospisil

fixed rounding problem

parent decd2b22
......@@ -28,6 +28,10 @@ architecture syn of PulseGeneratorTime is
variable Result: integer;
begin
Result := PulseMinWidthInTime / ClkPeriod;
if (Result * ClkPeriod) < PulseMinWidthInTime then
-- instead of ceil() function
Result := Result + 1;
end if;
if Result < 1 then
Result := 1;
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment