diff --git a/AXOL1TL_v1/Makefile b/AXOL1TL_v1/Makefile index 2d0f1a3..dd0deee 100644 --- a/AXOL1TL_v1/Makefile +++ b/AXOL1TL_v1/Makefile @@ -1,10 +1,10 @@ .PHONY: clean -GTADModel_v1.so: ./GTADModel_hls/GTADModel.o GTADModel_v1.o +GTADModel.so: GTADModel_emulator.o GTADModel.o $(CXX) $(CXXFLAGS) $(LD_FLAGS) -shared $^ -o $@ %.o: %.cpp $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ clean: - rm GTADModel_v1.so + rm GTADModel.so diff --git a/AXOL1TL_v1/main.cpp b/AXOL1TL_v1/main.cpp deleted file mode 100644 index 2feeeb3..0000000 --- a/AXOL1TL_v1/main.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "emulator.h" -#include -#include "ap_fixed.h" -//#include "path/to/anomaly_detection_defs.h" // Note that this is optional if you don't know the types (unlikely) - -int main() { - - ModelLoader loader = ModelLoader("./anomaly_detection"); - // ModelLoader loader = ModelLoader("./jet_tagger"); - - HLS4MLModel* model = loader.load_model(); - - ap_fixed<8, 6, AP_RND_CONV, AP_SAT> input[57] = { - -0.12011719, 0.40527344, -1.04101562, -0.82519531, -0.75585938, -0.58105469, 1.98632812, 1.53710938, 1.98632812, 0.63085938, 0.3828125, -0.20214844, 1.05957031, 0.40820312, -1.02050781, -0.18066406 - }; - ap_fixed<10,7> result[13]; - model->prepare_input(input); - model->predict(); - model->read_result(result); - std::cout << "Emulated predictions: [ "; - for (int i = 0; i < 5; i++) { - std::cout << result[i].to_float() << ", "; - } - std::cout << "]" << std::endl; - - loader.destroy_model(); - -}