stanford-ppl / spatial

Spatial: "Specify Parameterized Accelerators Through Inordinately Abstract Language"
https://spatial.stanford.edu
MIT License
274 stars 32 forks source link

fix the issue of reloading AFI for different runs #178

Open hzhang86 opened 5 years ago

hzhang86 commented 5 years ago

I found the cause of having to reload AFI for runs with different input. It's because the FringeContextAWS.h falsely reset the register in the beginning of ''load'' when fpga_pci is not attached yet. These two statements should be moved to right before starting the fpga execution (inside "run"), then result will be updated for new input in each run.

aws_poke(SCALAR_CMD_BASE_ADDR + RESET_REG_ADDR, 1); aws_poke(SCALAR_CMD_BASE_ADDR + RESET_REG_ADDR, 0);

Besides, check_slot_config(slot_id) should be called before fpga_pci_attach(..) logically.

Thanks

mattfel1 commented 5 years ago

Thanks for the help!