Git Product home page Git Product logo

Comments (4)

Keith-S-Thompson avatar Keith-S-Thompson commented on June 4, 2024

Which .c file? I have several versions of Dhrystone in the repo.

Do you have a C compiler for your target system? There does seem to be a gcc RISC-V cross-compiler, but I've never used it.

This is very old code, written in an old version of the C language. I haven't looked at it in years. Just now, I was unable to compile it with gcc. The code could be modernized, but I haven't bothered to do so.

from dhrystone.

umer006 avatar umer006 commented on June 4, 2024

Sorry for the late reply,
I am kind of new at this, i coded a RV32 Processor which takes in instructions in the following manner;
03000513
00000097
000080e7
00050713
000007b7
00e7a023
03000513
00000097
000080e7
00050713
000007b7
00e7a023
000007b7
0007a783
00000737
00072703

The bin file contains string like these and then they are copied in the Instruction Memory of the Processor and then they are processed one by one, My instructor told me to run the Dhrystone benchmark on my processor, right now i have RISC-V GNU Compiler Toolchain, it can convert simple c program and i can take the above kind of dump from that, but it does not really convert c programs with functions in it very well, i was wondering if there was some way that i can convert the Dhrystone benchmark into the above kind of dump so that i can run it on my processor.

from dhrystone.

Keith-S-Thompson avatar Keith-S-Thompson commented on June 4, 2024

You should use a newer version of Dhrystone (which I don't have in my repo):

https://homepages.cwi.nl/~steven/dry.c

The author updated it so it should work with modern C compilers.

The instructions at the top of the file say to do sh dry.c. The first few lines of the file are a shell script that extracts and compiles the C source. It compiles with cc by default (typically a symlink to gcc), but you can set the CC and CFLAGS environment variables.

The script compiles and run the code locally, which won't work for a cross-compiler. You'll need to modify the script and/or do some of the steps manually.

Presumably your toolchain is going to generate binary object code. Apparently you know how to get the numeric instructions you need from that.

from dhrystone.

umer006 avatar umer006 commented on June 4, 2024

Thanks man, I'll try that.

from dhrystone.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.