From: sri on 29 Dec 2009 02:22 Hi Jonathan, You understood my need very clearly. I need to design a GUI with few textbox, radio buttons (similar to xilinx and altera) to change the generic parameters in VHDL code. Whenever the user changes the parameters, it should be reflected on VHDL code which is hidden from the user >>can do (easily, but probably with quite a lot of code and > a lot of attention to detail) using Tk's canvas Since I am new to tcl, I will look into more details on tk's canvas. Right now, we are providing a single IP core. Thanks for your reply On Dec 29, 1:47 am, Jonathan Bromley <jonathan.brom...(a)MYCOMPANY.com> wrote: > On Thu, 24 Dec 2009 20:34:54 -0800 (PST), sri wrote: > > I am new to tcl/tk and this forum. I wonder whether can we create a > >GUI based IP core generator like wizard using tcl/tk that changes the > >parameters in the VHDL source code. This is to avoid providing source > >code (VHDL code) to customer. > > You mean, something like Xilinx Coregen or Altera MegaWizard? > > I should imagine it would not be too hard, if your ambitions > are limited to working with a single design or family of designs. > The other replies you got were, I think, assuming that you wanted > to use Tcl to process and visualize VHDL code. Instead, I suspect, > you want a user to be able to see a simple block diagram of a > design, and configure it by enabling or disabling various > input/output ports, tweaking parameters and so on. This you > can do (easily, but probably with quite a lot of code and > a lot of attention to detail) using Tk's canvas. Then, when > the user is happy with their configuration, your GUI should > spit out a plain-text file containing some VHDL code - but > the code will presumably be fairly simple stuff, just a > template with some connections present or missing and > some generics set to user-controlled values. > > Of course, the full generality of the big-name tools would > be a major project; but I'm guessing you need to offer your > users a configuration tool for one specific piece of IP, or > perhaps for a fairly small number of different IP blocks. > In such a case, you can probably tolerate the overhead of > rewriting the GUI code for each new IP block. > > Please excuse me if I've misunderstood your intent. > -- > Jonathan Bromley
From: Donal K. Fellows on 29 Dec 2009 06:28
On 29/12/2009 07:22, sri wrote: > You understood my need very clearly. I need to design a GUI with few > textbox, radio buttons (similar to xilinx and altera) to change the > generic parameters in VHDL code. Whenever the user changes the > parameters, it should be reflected on VHDL code which is hidden from > the user This is a very normal use of Tcl and Tk. > Since I am new to tcl, I will look into more details on tk's canvas. I love the canvas widget. It's like a big drawing pad, except you can also attach bindings to the various bits you put on it (and move them around, etc.) It's really a "hypergraphics" system - like hypertext but with graphical bits instead of text - but it does need some scripting by you to explore the potential. I recommend trying out the Tk widget demo for inspiration. It shows the sorts of things you can do with a canvas, not just for drawing but also for user interaction. > Right now, we are providing a single IP core. These things tend to grow over time. However, it should be pretty easy to factor out the code that changes with each IP core from the stuff that remains the same for all. Like that you can expand in the future without having to rewrite everything. :-) Donl. |