From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA28099; Mon, 8 Dec 2003 20:09:21 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA26780 for ; Mon, 8 Dec 2003 20:09:19 +0100 (MET) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hB8J9I115183 for ; Mon, 8 Dec 2003 20:09:18 +0100 (MET) Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id hB8J8wC28721; Mon, 8 Dec 2003 13:09:00 -0600 (CST) Date: Mon, 8 Dec 2003 14:09:41 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: brogoff@speakeasy.net cc: Jacques Garrigue , Ocaml Mailing List Subject: Re: [Caml-list] Object-oriented access bottleneck In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 bottleneck:01 brogoff:01 clb:99 mappings:01 clb:99 admittedly:01 bias:01 clumsy:01 apis:01 python:01 parses:01 api:01 bindings:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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