sfu-arch / muir-sim

muIR C++ Simulator
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Cannot compile muir-sim #1

Open RazvanN7 opened 4 years ago

RazvanN7 commented 4 years ago

When running the command:

make chisel NPROCS=4 NUM_PTRS=2 NUM_VALS=1 NUM_RETS=0

I get the following error: Screenshot from 2020-02-26 14-12-42

Which I was able to fix by modifying hardware/chisel/dandelion/src/main/scala/node/Alu and replacing Floor with RoundDown. I didn't make a PR as I do not have the dandelion repo which is a git submodule of muIR-sim. This made the advanced the compilation to the point where I get:

Screenshot from 2020-02-26 14-17-14

This I don't know how to bypass.

amsharifian commented 4 years ago

Hi Razvan, The first problem is probably because of the version difference in dsptools library. It seems there is an update for dsptools and they have replaced Floor with RoundDown. I updated the interface.

For the second problem, if you look at this file: muir-sim/hardware/chisel/src/test/scala/accel/VCRAccel.scala this is where we instantiate the accelerators. What you need to do is make sure your accelerator class in line: 73 is exactly what you intend to build, in DandelionSimAccelMain class. Moreover, you have to make sure the values for NUM_PTRS, NUM_VALS and NUM_RETS matches with the accelerated function. For instance, in the case of test01, we have 0 pointers, 2 values and 1 returns. So you have to make sure these values are properly set at the build time.

I'm working on a run.py file which accepts a JSON as configure file and it automatically takes care of setting these parameters for building a new accelerator. Because currently, it's very error-prone to always make sure these variables are properly set according to the actual accelerator.

amsharifian commented 4 years ago

The README doc is misleading, I updated the text, but still needs more details...