abs-tudelft / fletcher

Fletcher: A framework to integrate FPGA accelerators with Apache Arrow
https://abs-tudelft.github.io/fletcher/
Apache License 2.0
217 stars 31 forks source link

[Fletchgen] Fletchgen seems to ignore the `-f` or `--force` switches #175

Closed EraYaN closed 5 years ago

EraYaN commented 5 years ago

Describe the bug -f and --force seem to be ignored, resulting in vhdt files.

To Reproduce

docker run --rm -v /<pathto>/fletcherfiltering_test_workspace/Float:/source -v /<pathto>/FloatSnapAction/hw:/output -t fletchgen:develop -o /output -i /source/ff_in.fbs /source/ff_out.fbs -l vhdl --axi --sim -r /source/Float_data.rb -s /source/Float_data.srec --force -n FletcherFloat

or

docker run --rm -v /<pathto>/fletcherfiltering_test_workspace/Float:/source -v /<pathto>/FloatSnapAction/hw:/output --entrypoint /bin/bash -it fletchgen:develop
fletchgen -o /output -i /source/ff_in.fbs /source/ff_out.fbs -l vhdl --axi --sim -r /source/Float_data.rb -s /source/Float_data.srec --force -n FletcherFloat

Expected behavior FletcherFloat.vhd should be overwritten.

Additional context using a build of version 142f6de

This seems to just hard code the overwrite option to false, the options->overwrite is only ever used to overwrite the AxiTop and the like. https://github.com/abs-tudelft/fletcher/blob/142f6de/codegen/fletchgen/src/fletchgen/design.cc#L97

It also does not like --axi or --sim for some reason. Different issue #176

Source docker file:

FROM mbrobbel/libarrow:0.14.1

RUN curl -L curl -L https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.tar.gz | tar xz -C $HOME

WORKDIR /fletcher
ADD . .

WORKDIR /fletcher/codegen/fletchgen
RUN mkdir -p build && cd build && $HOME/cmake-3.14.5-Linux-x86_64/bin/cmake .. && make -j && make install

ENV FLETCHER_DIR="/fletcher"

ENV FLETCHER_RUNTIME_DIR=$FLETCHER_DIR/runtime
ENV FLETCHER_CODEGEN_DIR=$FLETCHER_DIR/codegen
ENV FLETCHER_HARDWARE_DIR=$FLETCHER_DIR/hardware
ENV FLETCHER_PLATFORM_DIR=$FLETCHER_DIR/platforms
ENV FLETCHER_EXAMPLES_DIR=$FLETCHER_DIR/examples

ENTRYPOINT ["fletchgen"]