>> +
>> +/* The minidriver contains inline versions of JTAG fn's */
>> +#include "minidriver.h"
>> +
>
> This is bad, as you are creating a new layering violation that will need
> to be removed.  You should move this #include to somewhere other than
> what should be our public API, probably inside the C files that need it.
> Presently, this change exposes _more_ internals, not less.

I'm not quite sure how you define a layer violation here. How can I tell
that there is a violation happening?

A minidriver must be able to inline jtag_add_dr_out() into inner loops,
this is what broke in the refactoring. All the rest of the refactoring is
great stuff!

jtag_add_dr_out() is also at the same time an API, so what was done in
minidrivers was a carefully controlled "layer violation" that took
advantage of the
tight coupling between the CPU and the hardware => two pokes
for some jtag_add_dr_out() cases.

The jtag_add_dr_out() API was engineered with this specifically in mind.

Do you have any thoughts on how to get back the functionality of
letting the minidriver provide an inline version of jtag_add_dr_out()?

Inlining is important because, not because of the fn call overhead,
but because the arguments to jtag_add_dr_out() are often constants,
so there is *significant* constant propagation going on that will
reduce jtag_add_dr_out() to two pokes in many cases. Important
on low latency low processing power(embedded) environments.

-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to