OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_52/] [or1ksim/] [tick/] [tick.c] - Diff between revs 100 and 102

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 100 Rev 102
Line 25... Line 25...
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
 
 
#include "tick.h"
#include "tick.h"
#include "../cpu/or1k/spr_defs.h"
#include "../cpu/or1k/spr_defs.h"
 
#include "pic.h"
 
 
/* Reset. It initializes TTCR register. */
/* Reset. It initializes TTCR register. */
void tick_reset()
void tick_reset()
{
{
        printf("Resetting Tick Timer.\n");
        printf("Resetting Tick Timer.\n");
Line 50... Line 51...
                return;
                return;
 
 
        if ((ttir & SPR_TTCR_PERIOD) == (ttcr & SPR_TTCR_PERIOD)) {
        if ((ttir & SPR_TTCR_PERIOD) == (ttcr & SPR_TTCR_PERIOD)) {
                if (ttcr & SPR_TTCR_IE) {
                if (ttcr & SPR_TTCR_IE) {
                        setsprbits(SPR_TTCR, SPR_TTCR_IP, 1);
                        setsprbits(SPR_TTCR, SPR_TTCR_IP, 1);
                        report_interrupt();
                        report_interrupt(INT_TICK);
                }
                }
                if (ttcr & SPR_TTCR_SR)
                if (ttcr & SPR_TTCR_SR)
                        return;
                        return;
        }
        }
        ttir++;
        ttir++;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.