Øyvind Harboe wrote:
> On Fri, May 8, 2009 at 12:25 AM, Magnus Lundin <lun...@mlu.mine.nu> wrote:
>   
>> The problem is that the inhandler is called asynchronosly from the jtag
>> layer when the indata has been received.
>> When  jtag_add_dr_scan_now(2, fields, TAP_INVALID) is sent then we have
>> not even sent the jtag data to the target son the in value is not
>> available untail after the next jtag_execute_queue()
>>     
>
> actually it was a search, copy & paste error. I've committed a fix(though
> I can't test right now).
>
> jtag_add_dr_scan_now() will execute the queue so the in_value can
> be examined immediately afterwards.
>
> Clearly better testing is required, but the problem with this particular
> type of change is that it will never be tested unless committed to svn head.
> This type of patches will also be constantly out of date if not committed.
>
> Give me a chance to clean up, if not I'll revert.
>
>   
Of course you can have a chance, but still IMHO the design with 
inhandlers is VERY elegant and efficient.

We want to send out a lot of data without waiting for the individual 
return values. Incoming data must the be properly reformatted, 
bitreversed etc.   The calling function in the target code that calls a 
read_register should not have to bitreverse indata. The read_register 
code tells the jtag layer where to place the result and whet inhandler 
to use, but the caller knows nothing about this. The data is simply 
delivered in the right form after jtag_execute_queue(). 

So it is probaly possible make it work without inhandlers  , but is that 
a better solution ? I think not !!

Regards,
Magnus

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to