[prev in list] [next in list] [prev in thread] [next in thread]
List: openocd-development
Subject: [Openocd-development] Algorithm parameters
From: Dominic.Rath () gmx ! de (Dominic Rath)
Date: 2006-11-07 12:16:11
Message-ID: 200611071316.11525.Dominic.Rath () gmx ! de
[Download RAW message or body]
Hello Magnus,
I see what you mean. The idea was to keep this consistent with the rest of the
OpenOCD, especially with the JTAG subsystem. There, out_value etc. mean data
output to the device, while in_value is the data being read back to the host.
I agree that the naming convention used by RPC for example might be more
appropriate, but I'm not sure if this is important enough to justify a
change.
An algorithm must not expect the state to be kept between several invocations.
It can't know if another algorithm ran in between, like the LPC code that
calls target_write_buffer, which might use the DCC. The host code can use
PARAM_IN_OUT if it wants to reuse a register value.
I'll change the init_reg_param code to initialize PARAM_IN to -1, instead of
the current indeterminate state. That should allow potential bugs to be
spotted more easily.
Regards,
Dominic
On Wednesday 25 October 2006 22:36, Magnus Lundin wrote:
> Hello
>
> Maybe this is just me being extremely sensitive but:
>
> Parameters are of three kinds:
> PARAM_IN,
> PARAM_OUT,
> PARAM_IN_OUT
>
> Thats good, but is this with respect to the algorithm or the calling
> program.
> The parameters are specified using the internal registers used in the
> algoritm "r0" , etc
> so they are defined from the point of view of the algorithm. Thus
> PARAM_IN goes
>
> >from the caller into the algorithm. It is an input to "r0"
>
> This is more in line with the usage when defining remote procedure call
> parameters in
> most situations I have seen. Corba, Com .
>
> The current usage is not wrong or illogical but for me it feels strange
> and nonstandard.
>
> Anyway, in the armv4_5 implementation when setting up the call, the
> IN/OUT status (however we interpret it)
> should be respected so we do not write values to memory or reigsters
> unless it is an input to
> the algortim. This might be important when setting up an algorithm and
> the running it several
> times keeping the intermediate state. Not very likely but it might happen.
>
>
> Just my gut feelings.
>
> Regards,
>
> Magnus
>
>
>
>
> _______________________________________________
> Openocd-development mailing list
> Openocd-development at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/openocd-development
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic