[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: GTKWave scroll in interactive mode (SOLVED)



Hi
I've made some changes in GTKWave source code to handle my problem. This
is what I've done, but I'm sure there are many better solutions:

1. If gcc complained about undeclared gzopen64; in src/helpers/tla2vcd.c
line 29 change 
	#include <zlib.h>
to
	#include "../libz/zlib.h"

2. Change kick_partial_vcd(void) in vcd_partial.c (line 2317):

///////////////////////////////////////////////////////////////////
void kick_partial_vcd(void)
{
#if !defined _MSC_VER && !defined __MINGW32__
GtkAdjustment *hadj;
TimeType ntinc;
if(GLOBALS->partial_vcd)
	{
	struct timeval tv;

	tv.tv_sec = 0; 
	tv.tv_usec = 1000000 / 100;
	select(0, NULL, NULL, NULL, &tv);

	while(*GLOBALS->consume_ptr_vcd_partial_c_1)
		{
		Trptr t;
	
		vcd_parse();
	

GLOBALS->min_time=GLOBALS->start_time_vcd_partial_c_2*GLOBALS->time_scale;

GLOBALS->max_time=GLOBALS->end_time_vcd_partial_c_2*GLOBALS->time_scale;
	
		GLOBALS->tims.last=GLOBALS->max_time;
		GLOBALS->tims.end=GLOBALS->tims.last;             /* until the
configure_event of wavearea */
	
		if(!GLOBALS->timeset_vcd_partial_c_1)
			{

GLOBALS->tims.first=GLOBALS->tims.start=GLOBALS->tims.laststart=GLOBALS->min_time;
			GLOBALS->timeset_vcd_partial_c_1 = 1;
			}
	
		update_endcap_times_for_partial_vcd();
		update_maxmarker_labels();
	
		t = GLOBALS->traces.first; while(t) { regen_trace_mark(t); t =
t->t_next; }
		t = GLOBALS->traces.buffer; while(t) { regen_trace_mark(t); t =
t->t_next; }

		t = GLOBALS->traces.first; while(t) { regen_trace_sweep(t); t =
t->t_next; }
		t = GLOBALS->traces.buffer; while(t) { regen_trace_sweep(t); t =
t->t_next; }
	
	        signalarea_configure_event(GLOBALS->signalarea, NULL);
	        wavearea_configure_event(GLOBALS->wavearea, NULL);
	     
		ntinc=(TimeType)(((gdouble)GLOBALS->wavewidth)*GLOBALS->nspx);
		GLOBALS->tims.timecache=GLOBALS->tims.last-ntinc+1;
			if(GLOBALS->tims.timecache<GLOBALS->tims.first)
GLOBALS->tims.timecache=GLOBALS->tims.first;

		hadj=GTK_ADJUSTMENT(GLOBALS->wave_hslider);
		hadj->value=GLOBALS->tims.timecache;
		time_update();
	     
	     
		gtkwave_gtk_main_iteration();
		}
	}

#endif

gtkwave_gtk_main_iteration();
}
///////////////////////////////////////////////////////////////////
In fact I've added "Zoom To End" button's code from service_zoom_right
function (in zoombuttons.c line 57) to kick_partial_vcd().

I've written a very simple program that makes randome vcd file. You can
use it in this way (I assume you are in ~/gtkwave-3.1.9/src, if not
change the paths):
	 ./randomvcd | ./helpers/shmidcat | ./gtkwave -I -v

randomvcd.c and my vcd_partial.c are attached in a compressed file.
I hope this will be useful.. 

Regards,
Abd. Man


 

 
On Sun, 2008-11-30 at 10:58 +0330, Abdous Mandous wrote:
> Hi,
> (sorry for my poor English)
> I'm using gtkwave in interactive mode as a poor-man logic analyzer! I've
> written a simple program to get data from USB (which is connected to
> FT245 board) and write it into stdout in VCD format. Everything is fine
> but as simulation time increases, I should manually scroll right the
> waveform. I'm wondering is there any way to auto-scroll gtkwave to show
> end of vcd file when new data receives from stdin?
> -I have tried to compile gtwave from source instead of using ubuntu
> packages, but the compiled version didn't work in interactive mode!
> Regards,
> Abd. Man
> 
> 
>  
> 
> 
> 
> 
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

Attachment: gtkwave-inter-scroll.tar.bz2
Description: application/bzip-compressed-tar


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user