URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [rtl/] [core/] [neorv32_gptmr.vhd] - Diff between revs 67 and 68
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 67 |
Rev 68 |
Line 174... |
Line 174... |
timer_core: process(clk_i)
|
timer_core: process(clk_i)
|
begin
|
begin
|
if rising_edge(clk_i) then
|
if rising_edge(clk_i) then
|
if (timer.cnt_we = '1') then -- write access
|
if (timer.cnt_we = '1') then -- write access
|
timer.count <= data_i;
|
timer.count <= data_i;
|
elsif (ctrl(ctrl_en_c) = '1') then -- enabled
|
elsif (ctrl(ctrl_en_c) = '1') and (gptmr_clk_en = '1') then -- enabled and clock tick
|
if (timer.match = '1') then
|
if (timer.match = '1') then
|
if (ctrl(ctrl_mode_c) = '1') then -- reset counter if continuous mode
|
if (ctrl(ctrl_mode_c) = '1') then -- reset counter if continuous mode
|
timer.count <= (others => '0');
|
timer.count <= (others => '0');
|
end if;
|
end if;
|
else
|
else
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.