Tim10
New Contributor
5 years agoIs it possible to use time units of ms and ns in a BDF Symbol Property?
I attempted to use time units of ms and ns in a symbol property, but Quartus ignored them.
Snapshot from BDF schematic:
Code snippet from VHD file:
generic
(
CLOCK_PERIOD : time := 20 ns;
DEBOUNCE_PERIOD: time := 125 ms
);
...
constant MAX_COUNT: natural := DEBOUNCE_PERIOD / CLOCK_PERIOD - 1;
signal counter: natural range 0 to MAX_COUNT := 0;Code snippet from BDF file:
(parameter
"CLOCK_PERIOD"
"P\"20 ns\""
""
(type "PARAMETER_UNKNOWN") )
(parameter
"DEBOUNCE_PERIOD"
"P\"125 ms\""
""
(type "PARAMETER_UNKNOWN") )Snapshot of RTL schematic:
This produces a counter of only 3 bits, i.e. ceil(log2(125 / 20)), which means that Quartus ignored the units.
It should be 23 bits, i.e. ceil(log2(125x10^-3 / 20x10^-9))
EDIT:
I conducted an experiment to see if Quartus would accept the SI Units if I removed the space between the numerical value and the SI Unit, i.e. "20ns" and "125ms". When I compiled the design, Quartus crashed.
What's going on?