harvard-acc / gem5-aladdin

End-to-end SoC simulation: integrating the gem5 system simulator with the Aladdin accelerator simulator.
BSD 3-Clause "New" or "Revised" License
203 stars 59 forks source link

Can we simulate 8-bit integer by using Gem5-Aladdin? #11

Open donghn opened 4 years ago

donghn commented 4 years ago

Hi. As the title. I wonder can we make the simulation with datawidth=1byte (8bits). such as 8-bit fixed-point. and system_bus =32 or 64 bits?

xyzsam commented 4 years ago

Sure, you can replace the power and area models with 8 bit ALUs/multipliers yourself. Is that enough? Or do you actually want to model 8 bit arithmetic datapaths so you can get the memory savings?

donghn commented 4 years ago

Hi @xyzsam Thanks for your reply. I want to model 8 bit arithmetic datapaths and memory also. In my system, I use 8-bit integer for memory and operation. I want to trace the DRAM operation and estimate the energy of DRAM.

xyzsam commented 4 years ago

For 8-bit math, you're in luck. You can do this easily - just replace all your ints with chars in your code. LLVM will generate instructions that operate on 8-bit values and that will be reflected in the dynamic trace. Be careful of truncation of course. You will still need to replace the power models in Aladdin though since Aladdin assumes all integer math is 32-bit at least, and only changes per-operation energy based on the cycle time.

donghn commented 4 years ago

@xyzsam I got it. Thanks so much for your help.