Comments (8)
I'm going to point you at section 2.8 of the RISC-V user level specification. https://riscv.org/specifications/ :)
from fpga-zynq.
Thanks @davidbiancolin, much appreciated! I understand why the emulator is slow, but is there anyway to know how many cycles each instruction (for example, add, sub, mul etc) takes to be executed. I tried to turn the verbose mode ON, but it doesn't have the cycle count? Or did I do anything wrong?
Also, I just figured out that we could use spike pk -s to do the same thing (understood that spike is just a functional simulator), but what would be the best (and accurate) way to profile the cycle count of a C program running on rocket chip zynq infrastructure? Thanks.
from fpga-zynq.
Hi @z419379295 - you're asking for a metric that's fundamentally ambiguous, because pipelined processors overlap latencies. Suppose MUL has 3-cycle latency and LW has 2-cycle latency:
MUL x1, x1, x2
LW x2, 0(x2)
ADD x2, x2, x1
A single-issue in-order pipeline would incur one stall cycle before the ADD, so the sequence completes over the course of four cycles. But since the ADD is stalled on both the MUL and the LW, how do you decide how to apportion those cycles between the instructions?
from fpga-zynq.
Thanks @aswaterman for your help!! Aha, that makes sense to me now. Maybe I was not able to see the big picture, maybe what I was trying to do was to identify the power consumption of a C code that is being executed in rocket chip synthesized in Zynq PL, I thought it might be good to see which instruction takes up the most cycle? Or is there any way to achieve this (i.e. power profiling of instructions)? Thanks.
from fpga-zynq.
I'm not really sure... maybe run several benchmarks, measure their power consumption and instruction mix, and then attempt to correlate power consumption with instruction mix?
from fpga-zynq.
The benchmark? You mean running on cycle-accurate C++ emulator? How do we measure the power consumption of a software algorithm running on RISC-V processor?
from fpga-zynq.
You would need some sort of RTL-based power model. The details are something of an open research question, so there's not going to be a push-button answer here.
from fpga-zynq.
Cool, thanks!
from fpga-zynq.
Related Issues (20)
- Problems with fesvr-zynq on zc702 HOT 5
- A problem when building u-boot-xlnx HOT 1
- How to extend the address size of ExtMem HOT 1
- Password not working HOT 1
- ERROR: No cores found HOT 2
- terminate called after throwing an instance of 'std::runtime_error'
- To port free rtos on rocketcore
- uEnv.txt not found
- **[error] (compile:run) Nonzero exit code: 1
- How to use update_version script
- Project Loading Failed HOT 1
- make rocket过程中遇到的问题 HOT 1
- 在rocket chip上使用buildroot配置linux时,需要账号密码 HOT 2
- Can rocket core use PS7 side FCLK0 instead of external clock input?
- How to create RAM disk image
- Compiling testchipip
- Failed to launch run 'impl_1' due to failures in the following run(s)
- PYNQ ZU support
- Newer versions of Vivado
- Newer linux kernels on bbl.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fpga-zynq.