// Filename : subtractor.h
//
// This file was initially generated by SpaceStudio but is meant to be modified
// by the user.
#ifndef SUBTRACTOR_H
#define SUBTRACTOR_H

#include "spacecomp.h"
#include "abstract_module.h"
#include "application_definitions.h"

#include <stdint.h>

class subtractor: public abstract_module {
	SPACECOMP_START(subtractor, INDEX, subtractor);

public:
	subtractor(SPACECOMP_CTOR_PARAMS(subtractor, INDEX));

	void thread(SPACECOMP_THREAD_PARAMS(subtractor, INDEX, thread));

private:

	int32_t read_operand();
	int32_t subtract(int32_t operand1, int32_t operand2);
	void send_result(int32_t data);

	SPACECOMP_END(subtractor, INDEX, subtractor);
};

#endif
