; Were'synced
; calculate output part 1
; wait 2300 cycles
; Read inputs
; Choose output port
; calculate output part 2
; 170 cycles after read write output

This same routine runs parallel in 3 different MCUs?
So they have to be hardware synced.

Make MCU0 the master, slaves are MCU1 and MCU2 then.

MCU0 needs 2 sync-signal input port pins.

MCU1+2 need 1 sync-signal output port pin.

MCU1 and MCU2 need a ready input pin.

When R is done, MCU1+2 set their sync signal port bit.

Connect MCU2-sync-out --> MCU0-sync2-in
Connect MCU1-sync-out --> MCU0-sync1-in
Connect MCU0-ready-out --> MCU1+2-ready-in

When Master MCU0 is ready, it pulls those incomming sync-bits until all 
are set. Now master sets his ready port pin for MCU2 and MCU3. Now you 
are synced again. Proceed...

Is that what was on your mind?
Michael


Am 02.11.2015 um 17:43 schrieb pito:
> http://bretmulvey.com/avrdelay.html
>
> ______________________________________________________________
>> Od: Hannu Vuolasaho <vuo...@msn.com>
>> Komu: "amforth-devel@lists.sourceforge.net" 
>> <amforth-devel@lists.sourceforge.net>
>> Datum: 02.11.2015 17:06
>> Předmět: [Amforth] OT: Cycle accurate balanced assemly?
>>
> Hello!
>
> This is bit off-topic. I believe here are some crazy bit bangers who know a 
> lot of assemly.
>
> My asm template looks like this
>
>
> ; Were'synced
> ; calculate output part 1
> ; wait 2300 cycles
> ; Read inputs
> ; Choose output port
> ; calculate output part 2
> ; 170 cycles after read write output
>
> And program continues... I have three AVRs working on parallel and they all 
> have same
> clock signal.
>
> Normally this kind of thing would be done with timers, but I've already use 
> for them.
> On the bright side I have enough registers. And I have written program in C 
> which fails
> badly with timing but has shown the system fits and is able to calculate all 
> the decisions.
>
> Now I need to just write terrible optimized assembly spaghetti code which 
> does its job
> without interrupts. (No interrupts comes from spec)
>
> So is there tool which could help in this task. lowest level would be writing 
> the cycle count
> as comment at the end of line and highest level would be some sort of tool 
> which would
> take cycle count blocks and fill their end blocks with NOPS or busy loops.
>
> Best regards,
> Hannu Vuolasaho
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/ <http://amforth.sf.net/>
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel 
> <https://lists.sourceforge.net/lists/listinfo/amforth-devel>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>

------------------------------------------------------------------------------
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to