	.section .text.m0, "ax"
	.file	"ModulationAsm.m0.asm"
	// DO NOT MODIFY THE CONTENT ABOVE


	.global	ModulationAsm


ModulationAsm:
		R1: M[0] -> BIU1.T0;
		NOP;
		NOP;
		NOP;
		BIU1:Load(T0)(A++) -> M[1](Mode0);	//KI
		BIU1:Load(T0)(A++) -> M[2](Mode0);	//Input
		BIU1:Load(T0)(A++) -> M[3](Mode0);	//Output
		BIU1:Load(T0)(A++) -> M[4](Mode0);	//SHU1.T2
		BIU1:Load(T0)(A++) -> M[5](Mode0);	//IMA0.T1
		BIU1:Load(T0)(A++) -> M[6](Mode0);	//IMA0.T5 & IMA1.T5
		BIU1:Load(T0)(A++) -> M[7](Mode0);	//IMA0.T4 & IMA1.T4
		BIU1:Load(T0)(A++) -> M[8](Mode0);	//SHU2.T4
		NOP;
		R5:PreConfig(M[1]);
		R0:M[2]->BIU0.T0(Mode0)||R5:WriteConf(Mfetch)->KI[0-15](Mode0);
		R3:M[3]->BIU3.T1(Mode0);
		R1:M[4]->IMA0.T0(Mode0);
		R1:M[5]->IMA0.T1(Mode0);
		R0:M[6]->IMA0.T5(Mode0)||R1:M[6]->IMA1.T5(Mode0);
		R0:M[7]->IMA0.T4(Mode0)||R1:M[7]->IMA1.T4(Mode0);
		R2:M[8]->SHU2.T4(Mode0);
		IMA0:T0->SHU1.T2(Mode0);
		IMA0:T0+T1(B)->SHU3.T2(Mode0);
		IMA0:Ttmp+T1(B)->SHU1.T3(Mode0);
		IMA0:Ttmp+T1(B)->SHU3.T3(Mode0);
		NOP;
		NOP;
		BIU0:wait 0 || SHU0:wait 10 || R1:wait 11 || SHU1:wait 14 || IMA0:wait 17 || IMA2:wait 20 || R3:wait 12 || SHU3:wait 15 || IMA1:wait 18 || IMA3:wait 21 || SHU2:wait 23 || BIU3:wait 26;
		MFetch:LPTO %ModulationAsmCyc @(KI0 - 0);

		BIU0:Load(T0)(A++)->SHU0.T0(Mode0) || SHU0:StepExt(T0,T0,1)->M[1](Mode0) || R1:M[1]->SHU1.T0(Mode0) || SHU1:Index(T0,T2)(Mode0) || IMA0:T0>>T5(S)->IMA0.T3(Mode0) || IMA2:T0<<8(S)(U)(T)->IMA2.T4(Mode0) || R3:M[1]->SHU3.T0(Mode0) || SHU3:Index(T0,T2)(Mode0) || IMA1:T0>>T5(S)->IMA1.T3(Mode0) || IMA3:T0<<8(S)(U)(T)->IMA3.T4(Mode0) || SHU2:Index(T4,T4,T0)->BIU3.T0(Mode0) || BIU3:Store(T0,T1)(A++)(Mask)(Mode0);
		SHU0:StepExt(T0,T0,1)(Odd)->M[2](Mode0) || R1:M[2]->SHU1.T1(Mode0) || SHU1:Index(T1,T2)->IMA0.T0(Mode0) || IMA0:Ttmp&T4->IMA2.T0(Mode0) || IMA2:T0|Ttmp->SHU2.T0(Mode0) || R3:M[2]->SHU3.T1(Mode0) || SHU3:Index(T1,T2)->IMA1.T0(Mode0) || IMA1:Ttmp&T4->IMA3.T0(Mode0) || IMA3:T0|Ttmp->SHU2.T0(Mode0) || SHU2:Index(T4,T4,T0)->BIU3.T0(Mode0) || BIU3:Store(T0,T1)(A++)(Mask)(Mode0);
		SHU1:Index(T0,T3)(Mode0) || IMA0:T0>>T5(S)->IMA0.T3(Mode0) || IMA2:T0<<8(S)(U)(T)->IMA2.T4(Mode0) || SHU3:Index(T0,T3)(Mode0) || IMA1:T0>>T5(S)->IMA1.T3(Mode0) || IMA3:T0<<8(S)(U)(T)->IMA3.T4(Mode0) || SHU2:Index(T4,T4,T0)->BIU3.T0(Mode0) || BIU3:Store(T0,T1)(A++)(Mask)(Mode0);
		SHU1:Index(T1,T3)->IMA0.T0(Mode0) || IMA0:Ttmp&T4->IMA2.T0(Mode0) || IMA2:T0|Ttmp->SHU2.T0(Mode0) || SHU3:Index(T1,T3)->IMA1.T0(Mode0) || IMA1:Ttmp&T4->IMA3.T0(Mode0) || IMA3:T0|Ttmp->SHU2.T0(Mode0) || SHU2:Index(T4,T4,T0)->BIU3.T0(Mode0) || BIU3:Store(T0,T1)(A++)(Mask)(Mode0);

		ModulationAsmCyc:
		BIU0:wait 0 || SHU0:wait 0 || R1:wait 0 || SHU1:wait 0 || IMA0:wait 0 || IMA2:wait 0 || R3:wait 0 || SHU3:wait 0 || IMA1:wait 0 || IMA3:wait 0 || SHU2:wait 0 || BIU3:wait 0;

		MFetch:REPEAT @(35);

		MFetch:MPU.STOP;
