Skip to content

Commit

Permalink
Update zybo_z7_10.vhdl
Browse files Browse the repository at this point in the history
Better solution to time division.
  • Loading branch information
philipabbey committed Nov 5, 2022
1 parent 64afb3c commit f39b1e7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions design/Zybo_Z7_10/src/zybo_z7_10.vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ architecture rtl of zybo_z7_10 is
if sim then
return 10;
else
-- 500 ms / 8 ns, but Vivado is unable to perform this calculation even when the result
-- is assigned to a constant.
return 62500000;
-- ERROR: [Synth 8-27] Division of physical type values not supported
-- return positive(500 ms / 8 ns);
-- Vivado does not support division of physical quantites, even when the result is
-- assigned to a constant. You can't even convert to real by dividing by "1 ns".
-- Using real literals instead.
return positive(500.0e-3 / 8.0e-9);
end if;
end function;

Expand Down

0 comments on commit f39b1e7

Please sign in to comment.