Re: Or1ksim and tlm2.0

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Or1ksim and tlm2.0

by Jeremy Bennett-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 2009-02-23 at 00:09 +0000, Licínio Sousa wrote:

> Hi jeremy,
> Over the past weeks i have been experimenting with or1ksim. But i am
> new in systemc and TLM2.0
>
> I am looking for a solution where it can be possible to Model hardware
> in systemc tlm2.0 and develop application software for that same
> model. For example design a peripheral that performs DMA access  to a
> memory and create a c++ application to configure the peripheral and
> exercise it ( like, fill the memory, configure the peripheral to fetch
> memory data and process it).
>
> After reading AN1 it seems i can acheive that with or1ksim.
>
> - With or1ksim i can compile and execute  code for a specific
> peripheral, like the UART.
> - The application can be coded and compiled in C++ not only C.
> - I can play with interrupts from the peripheral...so i have a
> realistic scenario from the behavioral point of view
> - I can only play with loossley tlm models
>
>
> Do you agree with these basic observations?
>  

Hi Licínio,

All but the last of these observations are correct. You can now also
have cycle accurate SystemC models, using Verilator. These are in the
or1k/orpsoc-models directory on OpenCores CVS and described in Embecosm
Application Note 6:

        http://www.embecosm.com/download/ean6.html

> Do you agree with my approach or am i missing something and i could
> acheive these goals ( Model hardware and run real software over it)
> with a easier solution?

Like many others, I use OpenRISC because it is the easiest solution. I
do not know of any other open source processor with the same tool chain,
model and IP availability.

>  What about aprox timed models...is it possible to use Or1ksim?

I am not a great believer in approximately timed models. Forget the
industry hype, when it comes to the real world the estimates can be out
by a factor 3. Either use loosely timed, which gives you functional
correctness, or use fully cycle accurate from the Verilog, which gives
you exact timing.

But the great thing about open source is if you disagree you are
encouraged to write your own and contribute it!

> Again sorry to disturbe you exclusively :) OPENCORES still down

Seems to be back. I've copied the answer there.

ATB,


Jeremy

--
Tel:      +44 (1202) 416955
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@...
Web:     www.embecosm.com


_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

Parent Message unknown Re: Re: Or1ksim and tlm2.0

by lsousa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeremy,
Focusing on the software development.
Still making sure it makes sense to invest in this framework.
What about simulation performance? Is it possible to compile a full
c++ software stack (like a usb device  application) and still
maintaining an interesting simulation performance? how interesting,
comparing with using a real linux an real hardware environment?
Can you or anyone describe me a real successful example of compiling
a big application and running it on linux with the or1ksim... and
simulation timings?
   
What about software debug? how should it be done...printing stuff??? :)

Many thanks
LSousa


----- Original Message -----
From: Jeremy Bennett<jeremy.bennett@e...>
To:
Date: Mon Feb 23 15:38:50 CET 2009
Subject: [openrisc] Re: Or1ksim and tlm2.0

> On Mon, 2009-02-23 at 00:09 +0000, Licínio Sousa wrote:
> > Hi jeremy,
> > Over the past weeks i have been experimenting with or1ksim.
> But i am
> > new in systemc and TLM2.0
> >
> > I am looking for a solution where it can be possible to Model
> hardware
> > in systemc tlm2.0 and develop application software for that
> same
> > model. For example design a peripheral that performs DMA
> access to a
> > memory and create a c++ application to configure the
> peripheral and
> > exercise it ( like, fill the memory, configure the peripheral
> to fetch
> > memory data and process it).
> >
> > After reading AN1 it seems i can acheive that with or1ksim.
> >
> > - With or1ksim i can compile and execute code for a specific
> > peripheral, like the UART.
> > - The application can be coded and compiled in C++ not only C.
> > - I can play with interrupts from the peripheral...so i have a
> > realistic scenario from the behavioral point of view
> > - I can only play with loossley tlm models
> >
> >
> > Do you agree with these basic observations?
> >
> Hi Licínio,
> All but the last of these observations are correct. You can now
> also
> have cycle accurate SystemC models, using Verilator. These are in
> the
> or1k/orpsoc-models directory on OpenCores CVS and described in
> Embecosm
> Application Note 6:
>  http://www.embecosm.com/download/ean6.html 
> > Do you agree with my approach or am i missing something and i
> could
> > acheive these goals ( Model hardware and run real software
> over it)
> > with a easier solution?
> Like many others, I use OpenRISC because it is the easiest
> solution. I
> do not know of any other open source processor with the same tool
> chain,
> model and IP availability.
> > What about aprox timed models...is it possible to use Or1ksim?
> I am not a great believer in approximately timed models. Forget the
> industry hype, when it comes to the real world the estimates can be
> out
> by a factor 3. Either use loosely timed, which gives you functional
> correctness, or use fully cycle accurate from the Verilog, which
> gives
> you exact timing.
> But the great thing about open source is if you disagree you are
> encouraged to write your own and contribute it!
> > Again sorry to disturbe you exclusively :) OPENCORES still
> down
> Seems to be back. I've copied the answer there.
> ATB,
> Jeremy
> --
> Tel: +44 (1202) 416955
> Cell: +44 (7970) 676050
> SkypeID: jeremybennett
> Email: jeremy.bennett at embecosm.com
> Web: www.embecosm.com
>
>
_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

Re: Re: Or1ksim and tlm2.0

by Jeremy Bennett-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-02-26 at 17:09 +0100, licinios@... wrote:
> Hi Jeremy,
>
> Focusing on the software development.
>
> Still making sure it makes sense to invest in this framework.
> What about simulation performance? Is it possible to compile a full
> c++ software stack (like a usb device  application) and still
> maintaining an interesting simulation performance? how interesting,
> comparing with using a real linux an real hardware environment?

Hi Licínio,

I reckon I get around 5-10MIPS out of Or1ksim running on my PC (low-end
Core-2 Duo, about 18 months old). Given that Or1ksim is designed to
clock at 25-30kHz on an FPGA that's pretty good for any software
development.

For detailed timing, you have the option of the Verilator model, which
for a full ORPSoC runs at 130kHz on my machine - the processor alone
would probably hit 200-300kHz.
>
> Can you or anyone describe me a real successful example of compiling
> a big application and running it on linux with the or1ksim... and
> simulation timings?

Well Linux itself is a pretty big application, and includes the BusyBox
application set. Rich D'Addio is the expert on what has been built.
>  
> What about software debug? how should it be done...printing stuff??? :)

GDB 6.8. The current port is aimed at bare metal OpenRISC, which is good
for embedded use. If you want to run it into the Linux environment, then
I would suggest porting GDBServer (should not be difficult) and
compiling that to run under Linux, connecting through the serial port.
That would be a very valuable contribution.

HTH,


Jeremy

--
Tel:      +44 (1202) 416955
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@...
Web:     www.embecosm.com


_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc

Re: Re: Or1ksim and tlm2.0

by lsousa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok i will try to take a look at it in the near future

On Thu, Feb 26, 2009 at 4:33 PM, Jeremy Bennett <jeremy.bennett@...> wrote:
On Thu, 2009-02-26 at 17:09 +0100, licinios@... wrote:
> Hi Jeremy,
>
> Focusing on the software development.
>
> Still making sure it makes sense to invest in this framework.
> What about simulation performance? Is it possible to compile a full
> c++ software stack (like a usb device  application) and still
> maintaining an interesting simulation performance? how interesting,
> comparing with using a real linux an real hardware environment?

Hi Licínio,

I reckon I get around 5-10MIPS out of Or1ksim running on my PC (low-end
Core-2 Duo, about 18 months old). Given that Or1ksim is designed to
clock at 25-30kHz on an FPGA that's pretty good for any software
development.

For detailed timing, you have the option of the Verilator model, which
for a full ORPSoC runs at 130kHz on my machine - the processor alone
would probably hit 200-300kHz.
>
> Can you or anyone describe me a real successful example of compiling
> a big application and running it on linux with the or1ksim... and
> simulation timings?

Well Linux itself is a pretty big application, and includes the BusyBox
application set. Rich D'Addio is the expert on what has been built.
>
> What about software debug? how should it be done...printing stuff??? :)

GDB 6.8. The current port is aimed at bare metal OpenRISC, which is good
for embedded use. If you want to run it into the Linux environment, then
I would suggest porting GDBServer (should not be difficult) and
compiling that to run under Linux, connecting through the serial port.
That would be a very valuable contribution.

HTH,


Jeremy

--
Tel:      +44 (1202) 416955
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@...
Web:     www.embecosm.com




_______________________________________________
http://www.opencores.org/mailman/listinfo/openrisc