On 28 April 2011 14:20, Jeff Epler <jep...@unpythonic.net> wrote:

> Looking at the mesa_7i65.comp, I am concerned about the order of
> operations.  In fact, I don't see how your design can achieve the
> desired order.

I have looked into this, and it seems to me that is should be possible
to add an extra stage to the Hostmot2 sequence, a
"tram_write_before_read" step to clock out the SPI read data.
It isn't a complicated change, and I don't anticipate it breaking
anything else. However, I would want to have some feel for whether it
will be an acceptable change before coding it.

> The implementation I'd imagined involved mesa_7i65 and other bspi
> drivers defining *NO* hal functions.  Instead, they would register
> function pointers with the hostmot2 driver to call at the appropriate
> times (when processing a read or preparing a write).  This would
> require a modification to comp, which currently always rejects a
> component with no functions.

I have made a start at coding this, but I am not sure whether it is a
good idea.

What is the issue with the 7i65 driver exporting functions? it needs a
loadrt, and it exports pins. In that sense it is just like any other
HAL component, and so _not_ exporting functions looks like odd
behaviour.
I am not clear how the functions would be declared in the comp file.
They probably can't be declared with the "function" preprocessor word,
because then they will export functions. I think that means that,
unlike other .comp functions, they need to have the *inst and other
otherwise hidden parameters in their function declaration/prototype.
This is doable, but goes against the "comp way of doing things"

Jeff, is there any chance that you can try exporting a function
pointer from a comp, and see if my concerns are valid, or based on a
misunderstanding of comp?
My expectation is that the function which uses the pointer needs to
iterate through all bspi instances, calling the function by pointer
for each, with the correct arguments? I think that means that even if
the comp can use the FUNCTION macro for the functions, that doing so
makes assumptions about the preprocessor, and means that the same
function appears in two different notations.

-- 
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to