caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Hurt <bhurt@spnz.org>
To: brogoff@speakeasy.net
Cc: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>,
	Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Object-oriented access bottleneck
Date: Mon, 8 Dec 2003 14:09:41 -0600 (CST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0312081351120.5009-100000@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44.0312081002070.1423-100000@grace.speakeasy.net>

On Mon, 8 Dec 2003 brogoff@speakeasy.net wrote:

> On Mon, 8 Dec 2003, Brian Hurt wrote:
> > I'm writting a place and route program in Ocaml, and hitting a lot of
> > places where I'd like to express things as objects.
> 
> Now there's an interesting discussion! Where in your design do you
> want objects, if you don't mind my asking? What design style (custom,
> standard cell,  FPGA, ...) is your P&R program intended to address?

Initially targeting Virtex II FPGAs, but I'm keeping an eye open for 
supporting other FPGAs, CPLDs, and possibly even standard or custom cell 
placement.  The core algorithm is a genetic algorithm.  At the level of 
the genetic algorithm genomes are a class, as I don't care much how the 
genome is structured.  At this level, performance of member function calls 
is almost irrelevent.  But within a given genome, I have places where 
using objects would be helpfull.

A genome is three things: a set of cells to place, a mapping of how those 
cells are placed into the FPGA, and a cost function.  The cost function is 
at heart a set of "constraints" (I don't like that word, but can think of 
a better one).  The obvious constraint is that several cells are on a 
shared net.  The cost function is then determined by the size of bounding 
box.  Other constraints would be that cell uses a TSB (only two per CLB), 
etc.  There is an obvious object interface at the constraint level.

The mappings are also an opportunity to have a class interface.  I might 
want to have multiple levels of mappings- one mapping handling IOBs, 
another CLBs, another multipliers, etc.  This way I only map IOBs to IOBs, 
and don't have to worry about what happens if I try to put an IOB in a 
CLB.  The top level mapping is then the sum of the sub-mappings.

Maybe I'm not seeing how to do this with not-objects.  

> 
> My admittedly narrow minded bias based EDA tasks is that I'd rather have
> a more powerful system of records than what OCaml currently has, instead
> of classes, and that when I do write code with classes, it's not really using
> late-binding/open-recursion.

What I want to do is to be able to hand some code a hunk of state and 
several functions to act on that state.  The number of functions is large 
enough, and the functions are complex enough, that shared context is 
clumsy.  And I can't think of a way to pass in a reference to a module.

> 
> If you're into EDA though, there are quite a few APIs based on C++ and now
> Java and Python (I'm thinking of OpenAccess here) which may pressure anyone
> writing OCaml bindings into a "me tOO" design.
> 

I'm not working at that level yet.  If worse comes to worse, I'll write a 
small interface program in Java or whatever to deal with the translation.  
Have the Ocaml spit out into a pipe some internal format of the solution, 
and the Java program just parses the solution and passes it along to the 
API.

-- 
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 
Brian

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-12-08 19:09 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-07  2:39 Nuutti Kotivuori
2003-12-07  2:59 ` Nicolas Cannasse
2003-12-07 11:22   ` Benjamin Geer
2003-12-07 14:12     ` Nicolas Cannasse
2003-12-07 18:04   ` Nuutti Kotivuori
2003-12-07 10:27 ` Jacques Garrigue
2003-12-07 19:46   ` Nuutti Kotivuori
2003-12-08  1:07     ` Jacques Garrigue
2003-12-08 15:08       ` Nuutti Kotivuori
2003-12-08 15:42         ` Richard Jones
2003-12-09  0:26           ` Nicolas Cannasse
2003-12-09 12:10             ` Nuutti Kotivuori
2003-12-09 13:17               ` Olivier Andrieu
2003-12-09 13:53                 ` Nuutti Kotivuori
2003-12-08 17:51       ` Brian Hurt
2003-12-08 18:19         ` brogoff
2003-12-08 20:09           ` Brian Hurt [this message]
2003-12-08 19:02         ` Xavier Leroy
2003-12-08 21:37           ` Brian Hurt
2003-12-08 21:06             ` Nuutti Kotivuori
2003-12-08 22:30             ` malc
2003-12-07 18:23 ` Brian Hurt
2003-12-07 18:14   ` Nuutti Kotivuori
2003-12-07 19:30     ` Brian Hurt
2003-12-07 23:50       ` Abdulaziz Ghuloum
2003-12-08 17:29         ` Brian Hurt
2003-12-08 18:48           ` Nuutti Kotivuori
2003-12-08 10:17       ` Nuutti Kotivuori
2003-12-08 19:51       ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0312081351120.5009-100000@localhost.localdomain \
    --to=bhurt@spnz.org \
    --cc=brogoff@speakeasy.net \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).