Changeset 9939 for firmware/FTU/counter
- Timestamp:
- 09/22/10 18:08:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FTU/counter/FTU_rate_counter.vhd
r9911 r9939 119 119 begin 120 120 if rising_edge(cntr_reset) then 121 --formula to calculate counting period from prescaling value 121 --calculate counting period from prescaling value 122 --default is 0.5s - 128s if CNTR_FREQ_DIVIDER = 1 122 123 if (prescaling = "00000000") then 123 124 counting_period <= COUNTER_FREQUENCY / (2 * CNTR_FREQ_DIVIDER); 125 elsif (prescaling = "11111111") then 126 counting_period <= 128 * (COUNTER_FREQUENCY / CNTR_FREQ_DIVIDER); 124 127 else 125 128 counting_period <= ((conv_integer(unsigned(prescaling)) + 1) / 2) * (COUNTER_FREQUENCY / CNTR_FREQ_DIVIDER);
Note:
See TracChangeset
for help on using the changeset viewer.