URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/or1ksim/tick
- from Rev 460 to Rev 538
- ↔ Reverse comparison
Rev 460 → Rev 538
/Makefile.in
1,4 → 1,4
# Makefile.in generated by automake 1.11.1 from Makefile.am. |
# Makefile.in generated by automake 1.11 from Makefile.am. |
# @configure_input@ |
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
/tick.c
92,7 → 92,7
{ |
cpu_state.sprs[SPR_TTCR] = 0; |
cycles_start = runtime.sim.cycles; |
SCHED_ADD (tick_restart, NULL, cpu_state.sprs[SPR_TTMR] & SPR_TTMR_PERIOD); |
SCHED_ADD (tick_restart, NULL, cpu_state.sprs[SPR_TTMR] & SPR_TTMR_TP); |
} |
|
/*! Stops the timer */ |
99,7 → 99,7
static void |
tick_one_shot (void *dat) |
{ |
cpu_state.sprs[SPR_TTCR] = cpu_state.sprs[SPR_TTMR] & SPR_TTMR_PERIOD; |
cpu_state.sprs[SPR_TTCR] = cpu_state.sprs[SPR_TTMR] & SPR_TTMR_TP; |
tick_count = 0; |
} |
|
108,8 → 108,8
sched_timer_job (uorreg_t prev_ttmr) |
{ |
uorreg_t ttmr = cpu_state.sprs[SPR_TTMR]; |
uint32_t match_time = ttmr & SPR_TTMR_PERIOD; |
uint32_t ttcr_period = spr_read_ttcr () & SPR_TTCR_PERIOD; |
uint32_t match_time = ttmr & SPR_TTMR_TP; |
uint32_t ttcr_period = spr_read_ttcr () & SPR_TTCR_CNT; |
|
/* Remove previous jobs if they exists */ |
if ((prev_ttmr & SPR_TTMR_IE) && !(ttmr & SPR_TTMR_IP)) |
196,7 → 196,7
tick_count = value & SPR_TTMR_M; |
|
if ((tick_count == 0xc0000000) && |
(cpu_state.sprs[SPR_TTCR] == (value & SPR_TTMR_PERIOD))) |
(cpu_state.sprs[SPR_TTCR] == (value & SPR_TTMR_TP))) |
{ |
tick_count = 0; |
} |