Discussion:
[OpenRISC] How to pass executable arguments to Or1ksim
Ziqiang Patrick Huang
2015-01-14 21:02:20 UTC
Permalink
Is there a way to pass executable arguments to Or1ksim ?

Say I have an executable called 'foo' and it takes in a file input.txt,
simply append the file at the end of the command :

sim -f sim.cfg foo input.txt

does not work.

Thanks,
--
*Ziqiang*
Stefan Kristiansson
2015-01-15 07:13:31 UTC
Permalink
On Wed, Jan 14, 2015 at 11:02 PM, Ziqiang Patrick Huang <
Post by Ziqiang Patrick Huang
Is there a way to pass executable arguments to Or1ksim ?
Say I have an executable called 'foo' and it takes in a file input.txt,
sim -f sim.cfg foo input.txt
does not work.
Even if this would be possible, how is your program supposed to be able to
read input.txt?
Matthew Hicks
2015-01-15 08:04:08 UTC
Permalink
As far as I know, there is no file support in the or1k toolchain. I
recommend converting your input file to a character array that gets
compiled into your program; it has worked for me on several occasions.

On Wed, Jan 14, 2015 at 11:13 PM, Stefan Kristiansson <
Post by Stefan Kristiansson
On Wed, Jan 14, 2015 at 11:02 PM, Ziqiang Patrick Huang <
Post by Ziqiang Patrick Huang
Is there a way to pass executable arguments to Or1ksim ?
Say I have an executable called 'foo' and it takes in a file input.txt,
sim -f sim.cfg foo input.txt
does not work.
Even if this would be possible, how is your program supposed to be able to
read input.txt?
_______________________________________________
OpenRISC mailing list
http://lists.openrisc.net/listinfo/openrisc
Wacha Gábor
2015-01-15 08:07:10 UTC
Permalink
Perhaps it is worth to try ovpsim or the qemu Linux emulation in this case.

Regards,
Gabor Wacha
Post by Matthew Hicks
As far as I know, there is no file support in the or1k toolchain. I
recommend converting your input file to a character array that gets
compiled into your program; it has worked for me on several occasions.
On Wed, Jan 14, 2015 at 11:13 PM, Stefan Kristiansson <
Post by Stefan Kristiansson
On Wed, Jan 14, 2015 at 11:02 PM, Ziqiang Patrick Huang <
Post by Ziqiang Patrick Huang
Is there a way to pass executable arguments to Or1ksim ?
Say I have an executable called 'foo' and it takes in a file input.txt,
sim -f sim.cfg foo input.txt
does not work.
Even if this would be possible, how is your program supposed to be able to
read input.txt?
_______________________________________________
OpenRISC mailing list
http://lists.openrisc.net/listinfo/openrisc
_______________________________________________
OpenRISC mailing list
http://lists.openrisc.net/listinfo/openrisc
Ziqiang Patrick Huang
2015-01-15 19:00:18 UTC
Permalink
Hi Mattew,

Thanks for your reply, when you say converting the input file to a
character array, do you mean actually having the data declared as variables
in the source code, for example, if the input.txt has two columns of
integers, just modify the source code to have two arrays of integers
instead of reading from files.

Thanks,
Post by Matthew Hicks
As far as I know, there is no file support in the or1k toolchain. I
recommend converting your input file to a character array that gets
compiled into your program; it has worked for me on several occasions.
On Wed, Jan 14, 2015 at 11:13 PM, Stefan Kristiansson <
Post by Stefan Kristiansson
On Wed, Jan 14, 2015 at 11:02 PM, Ziqiang Patrick Huang <
Post by Ziqiang Patrick Huang
Is there a way to pass executable arguments to Or1ksim ?
Say I have an executable called 'foo' and it takes in a file input.txt,
sim -f sim.cfg foo input.txt
does not work.
Even if this would be possible, how is your program supposed to be able
to read input.txt?
_______________________________________________
OpenRISC mailing list
http://lists.openrisc.net/listinfo/openrisc
--
*Ziqiang Huang*
*Electrical and Computer Engineering*
*Hudson 213c, Duke University*
*Tel: 919-491-3677*
*Email: ***@duke.edu <***@duke.edu>*
Ziqiang Patrick Huang
2015-01-15 18:57:04 UTC
Permalink
Hi Stefan,

Thanks for your reply, I think I don't know the simulator enough to answer
your question. I'm just trying to run SPEC in or1ksim, and all the SPEC
benchmarks takes in input files. How should I get around in this situation
? A more general question would be, what standard benchmarks do openrisc
communities use or or1ksim would accept .

Thanks

2015-01-15 2:13 GMT-05:00 Stefan Kristiansson <
Post by Stefan Kristiansson
On Wed, Jan 14, 2015 at 11:02 PM, Ziqiang Patrick Huang <
Post by Ziqiang Patrick Huang
Is there a way to pass executable arguments to Or1ksim ?
Say I have an executable called 'foo' and it takes in a file input.txt,
sim -f sim.cfg foo input.txt
does not work.
Even if this would be possible, how is your program supposed to be able to
read input.txt?
--
*Ziqiang Huang*
*Electrical and Computer Engineering*
*Hudson 213c, Duke University*
*Tel: 919-491-3677*
*Email: ***@duke.edu <***@duke.edu>*
Loading...