OpenCores
First Prev 3/3 no use no use
RE: start with openrisc
by filepang on Sep 3, 2011
filepang
Posts: 23
Joined: Jul 2, 2009
Last seen: May 17, 2012
Hi There

Thanks for previous response, will be very helpful.
But I asked another question which was about writing Interrupts function in C++ program for or1ksim. I don't know how should I refer a function to my interrupt? For example in some U-Processors' C compiler we have #pragma interrupt_vector = 0x03 or something like that to introduce an operation to compiler to do that operation whenever our Interrupt hints! For example in my application program If I want to read GPIO BUS as soon as getting data on it's router, what should I do?

Cheers,


I don't know much about a interrupt_vector directive, but Accoding to OpenRISC architecture manual,
address of external interrupt vector is 0x800. All external interrupt start at this address.
Detailed informations are described in OpenRISC archtecture manual.

Also, you can find a good reference code from Opencores SVN.

Here is a link for you.

http://opencores.org/ocsvn/openrisc/openrisc/trunk/orpsocv2/sw/drivers/or1200/crt0.S
http://opencores.org/ocsvn/openrisc/openrisc/trunk/orpsocv2/sw/drivers/or1200/exceptions.c
http://opencores.org/ocsvn/openrisc/openrisc/trunk/orpsocv2/sw/drivers/or1200/int.c


RE: start with openrisc
by rfajardo on Sep 4, 2011
rfajardo
Posts: 277
Joined: Jun 12, 2008
Last seen: May 22, 2012
RE: start with openrisc
by jeremybennett on Sep 8, 2011
jeremybennett
Posts: 718
Joined: May 29, 2008
Last seen: May 22, 2012

Hi There

Thanks for previous response, will be very helpful.

But I asked another question which was about writing Interrupts function in C++ program for or1ksim. I don't know how should I refer a function to my interrupt? For example in some U-Processors' C compiler we have #pragma interrupt_vector = 0x03 or something like that to introduce an operation to compiler to do that operation whenever our Interrupt hints! For example in my application program If I want to read GPIO BUS as soon as getting data on it's router, what should I do?

Cheers,

Hi mffpga_2,

Currently there is no compiler support. In the future we may have interrupt attributes, to indicate that a particular function is an interrupt service routine (something that is commonly provided in GCC).

I don't expect we will provide pragmas to enforce a particular interrupt line. That seems to me too close to specific hardware implementation (what PIC are you using). You'll need to handle this sort of thing by writing code to configure your particular PIC.

HTH

Jeremy

First Prev 3/3 no use no use
© copyright 1999-2012 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.