URL
https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk
Subversion Repositories open8_urisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/open8_urisc/trunk/VHDL
- from Rev 210 to Rev 211
- ↔ Reverse comparison
Rev 210 → Rev 211
/o8_rtc.vhd
140,7 → 140,6
|
signal interval : DATA_TYPE; |
signal update_interval: std_logic; |
signal new_interval : DATA_TYPE; |
|
signal shd_tens : DATA_TYPE; |
signal shd_secs : DATA_TYPE; |
210,7 → 209,6
|
interval <= x"00"; |
update_interval <= '0'; |
new_interval <= x"00"; |
|
Wr_Data_q <= (others => '0'); |
Reg_Addr_q <= (others => '0'); |
231,11 → 229,10
pit.timer_cnt <= pit.timer_cnt - uSec_Tick_i; |
pit.timer_ro <= '0'; |
if( update_interval = '1' )then |
pit.timer_cnt <= new_interval; |
pit.timer_cnt <= interval; |
elsif( or_reduce(pit.timer_cnt) = '0' )then |
pit.timer_cnt <= interval; |
pit.timer_ro <= or_reduce(interval); |
|
end if; |
|
-- Fractional decisecond counter - cycles every 10k microseconds |
358,7 → 355,7
if( Wr_En = '1' )then |
case( Reg_Addr_q )is |
when "000" => |
new_interval <= Wr_Data_q; |
interval <= Wr_Data_q; |
update_interval <= '1'; |
|
when "001" => |
/o8_sys_timer.vhd
79,7 → 79,6
|
signal Interval : DATA_TYPE := x"00"; |
signal Update_Interval : std_logic; |
signal New_Interval : DATA_TYPE := x"00"; |
signal Timer_Cnt : DATA_TYPE := x"00"; |
|
constant DLY_1USEC_VAL : integer := integer(Sys_Freq / 1000000.0); |
104,13 → 103,12
Rd_Data <= OPEN8_NULLBUS; |
Interval <= x"00"; |
Update_Interval <= '0'; |
New_Interval <= x"00"; |
elsif( rising_edge( Clock ) )then |
Wr_En <= Addr_Match and Wr_Enable; |
Wr_Data_q <= Wr_Data; |
Update_Interval <= '0'; |
if( Wr_En = '1' )then |
New_Interval <= Wr_Data_q; |
Interval <= Wr_Data_q; |
Update_Interval <= '1'; |
end if; |
|
145,8 → 143,10
elsif( rising_edge(Clock) )then |
Interrupt <= '0'; |
Timer_Cnt <= Timer_Cnt - uSec_Tick_i; |
if( or_reduce(Timer_Cnt) = '0' )then |
if( Update_Interval = '1' )then |
Timer_Cnt <= Interval; |
elsif( or_reduce(Timer_Cnt) = '0' )then |
Timer_Cnt <= Interval; |
Interrupt <= or_reduce(Interval); -- Only trigger on Int > 0 |
end if; |
end if; |