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

Subversion Repositories potato

[/] [potato/] [trunk/] [benchmarks/] [sha256/] [main.c] - Diff between revs 20 and 58

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

Rev 20 Rev 58
Line 22... Line 22...
// - epc: exception return address
// - epc: exception return address
// - regbase: base of the stored context, can be used for printing all
// - regbase: base of the stored context, can be used for printing all
//            registers with regbase[0] = x1 and upwards.
//            registers with regbase[0] = x1 and upwards.
void exception_handler(uint32_t cause, void * epc, void * regbase)
void exception_handler(uint32_t cause, void * epc, void * regbase)
{
{
        if(cause == (CAUSE_IRQ_BASE + 5)) // Timer interrupt
        if(cause == ((1 << CAUSE_INTERRUPT_BIT) | (CAUSE_IRQ_BASE + 5))) // Timer interrupt
        {
        {
                uart_puts(IO_ADDRESS(UART_BASE), "Hashes per second: ");
                uart_puts(IO_ADDRESS(UART_BASE), "Hashes per second: ");
                uart_puth(IO_ADDRESS(UART_BASE), hashes_per_second);
                uart_puth(IO_ADDRESS(UART_BASE), hashes_per_second);
                uart_puts(IO_ADDRESS(UART_BASE), "\n\r");
                uart_puts(IO_ADDRESS(UART_BASE), "\n\r");
 
 

powered by: WebSVN 2.1.0

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