[ibis-macro] Re: Questions on API proposal

  • From: Mike Steinberger <msteinb@xxxxxxxxxx>
  • To: michael.mirmak@xxxxxxxxx
  • Date: Tue, 12 Jun 2007 08:26:46 -0500

Michael-

I don't know enough about the IBIS language to address your main question, but I can at least address the mechanics of the API.

Each instance of a given algorithmic model type has its own identity, and that identity is expressed by its memory handle. e.g., two separate instances of a SerDes design attached to two different pairs of pins will have two different memory handles. There is no argument to the functions which is a name string for a given instance; however the model developer is free to include a name string in the model's parameter tree. If the model developer chose to do that and the user wanted to name one SerDes instance "George" and the other one "Fred", then the user would be able to include in the parameter string something like "...(name George)..." and "...(name Fred)...". When these parameter strings get parsed, the model could then include in the memory space it allocates a char* for the model instance name. In one case one might have something like
   char* instance_name = "George";
and in the other case
   char* instance_name = "Fred";
The memory handles would then provide a means for the model to get to these names.

On the larger question of the extent to which the IBIS language does/should accept contributions from the department of redundancy department, I can only observe that if an [Algorithmic Model] statement could exist outside the scope of a [Model] statement, then there would need to exist a mechanism for identifying/pointing to a specific [Algorithmic Model] statement from inside the [Model]. I don't think there's a clear answer as to whether or not the additional complexity of such a mechanism would be justified.

"Whether 'tis nobler to suffer the slings and arrows of redundant code or to take arms against a sea of copy-and-modify..."

My 2c.
Mike Steinberger

Mirmak, Michael wrote:

Looking at the API proposal text, I have two implementation questions:

1) Is [Algorithmic Model] below the level of [Model] in the keyword hierarchy? In other words, can an [Algorithmic Model] only be used with the particular [Model] that contains its definition?

I can imagine circumstances where I might want a single [Algorithmic Model] definition to be used independently with several different analog [Model]s (e.g., where the same engine design is used separately to process data but for two different interfaces). Under the current definition, I would have to re-define the [Algorithmic Model] several times, even if identical, for individual [Model]s, even if they are associated under [Model Selector] with a single pin.

2) On a related note, does [Algorithmic Model] not accept a text string argument as an identifier? Again this implies that defining an [Algorithmic Model] is explicit under [Model] but instantiating it is implicit through the [Pin] list. This effectively means that each [Algorithmic Model] is only associated with a single [Model] and therefore a single [Pin]. I can imagine -- and might be interested in creating -- cases where a block of algorithmic code processes the results of data involving multiple analog buffers associated with multiple pins. In this syntax, I have no way of defining this association, at least not through [Pin], [Model] or any argument to [Algorithmic Model]. The [Circuit Call] keyword does allow me, by contrast, to associate a single block of code with multiple pins.

Am I missing something?

- MM


Other related posts: