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

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

#include <stdint.h>

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

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

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

private:

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

	SPACECOMP_END(divider, INDEX, divider);
};

#endif
