[ECOS] CDL question

Sergei Gavrikov sergei.gavrikov@gmail.com
Sat Jun 6 14:01:00 GMT 2009


Hello

I'm trying to join a few HALs for almost the same boards in a single HAL
package. The boards have the same CPU and RAM, but they differ by the
FLASH parts and LAN controllers. I had an idea to select one target name
and then to select the kind of the hardware using the CDL validators:
is_substr, is_active.

It works fine, but, now I want evaluate `legal_values' list, and I found
that I cannot manage it like `default_value' or `calculated' things.  Is
it possible evaluate legal_values list? First, I think that I will can
manage the issue using quotes instead brackets, but that did not work
with the list. Well, it is possible to solve a puzzle using a few CDL
options, but, a question is, Is it possible to solve the puzzle inside
one component using no extra options and just using the expression for
`legal_values' list?

What I try to do using CDL expressions

if {board == A} {
	default_value A
	legal_values {A B C}
} else if {board == B} {
	default_value X
	legal_values {X Y Z}
}

and using in two-lines coding I could get only, for example,

	default_value B
	legal_values {A B C X Y Z}

Thanks for any comments on it.

Sergei

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list