Re: generate images of register definitions

From: Date: Mon, 07 Apr 2008 20:50:35 +0000
Subject: Re: generate images of register definitions
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-272676@lists.php.net to get a copy of this message
On Mon, Jun 18, 2007 at 9:49 PM, Mike Frysinger <vapier.adi@gmail.com> wrote: > On 6/9/07, Richard Lynch <ceo@l-i-e.com> wrote: > > On Sat, June 9, 2007 4:27 pm, Mike Frysinger wrote: > > > anyone know of some software to generate images like this: > > > http://wh0rd.org/register.png > > > idea is i have a list of registers and their bit meanings, and i want > > > to automatically generate images like the above one from this data > > > > > > yes, i can write some custom code in PHP using GD, but i'd much rather > > > use someone else's work than start from scratch > > > > It's remotely possible that you could hack something from JP Graph to > > look not completely unlike that... > > > > Though I suspect you might find it easier to start from scratch, > > honestly... > > yeah ive just started from scratch ... here's what ive got so far in > case anyone happens to wander across this ... > > $reg = new register("WDOG_CTL", "Watchdog Control Register", > 0xFFC00200, 0x0AD0, 16, > array( > array(15, 15, "WDRO", "0 - Watchdog timer has not expired\n1 - > Watchdog timer has expired", W1C), > array(11, 4, "WDEN", "0xAD - Counter disabled\nAll other > values - Counter enabled"), > array(2, 1, "WDEV", "00 - Generate reset event\n01 - Generate > NMI\n10 - Generate GP interrupt\n11 - Disable event generation") > ) > ); > register_to_png($reg); > > http://wh0rd.org/register2.png > > maybe i'll start a cheesy sf project for it anyone who is interested in such a beast: http://docs.blackfin.uclinux.org/lib/plugins/register/register.phps and some examples: http://docs.blackfin.uclinux.org/lib/plugins/register/register/pll_ctl.png http://docs.blackfin.uclinux.org/lib/plugins/register/register/seqstat.png http://docs.blackfin.uclinux.org/lib/exe/fetch.php?cache=&media=register%3A4141379fb2519eb98ab596d6d08f4e1e.png hopefully someone else will find it useful -mike

« previous php.general (#272676) next »