Thank You!!!!!!!! Now is working! To run GtkWave in Windows, i install this:
http://www.activestate.com/activetcl/downloads/thank-you?dl=http://downloads.activestate.com/ActiveTcl/releases/8.5.14.0/ActiveTcl8.5.14.0.296777-win32-ix86-threaded.exe http://downloads.sourceforge.net/gtk-win/gtk2-runtime-2.24.10-2012-10-10-ash.exe?download http://www.dspia.com/gtkwave.exe.gz without cygwin and without all_libs.tar.gz. Excellent Tutorial, Thank you again! On Thu, Jul 11, 2013 at 10:19 AM, David Koontz <[email protected]> wrote: > > On 11 Jul 2013, at 8:25 PM, Christiano <[email protected]> wrote: > > Hi, i'm learning vhdl, and have installed Ghdl from this site: > > http://ghdl.free.fr/site/pmwiki.php?n=Main.Download > > Windows Installer version. > > Ok. I write this code below: > > library ieee;use ieee.std_logic_1164.all; > entity dff is > port( d, clk, rst: in std_logic; > q: out std_logic);end dff; > architecture behaviour of dff isbegin > process(rst,clk) > begin > if(rst='1') then > q <= '0'; > elsif(clk'event and clk='1') then > q <= d; > end if; > > end process;end behaviour; > > And do this commands: > > ghdl -a a.vhdl > ghdl -e dff > ghdl -r dff > > The problem, is that the program stay in infinite at a last command. > > > The program should exit immediately, there are no scheduled updates on any > signals without stimulous. If you were to specify an output waveform dump > file (ghw) it would be malformed from lack of transactions and not load in > gtkwave (the window banner would say GTKWave - [no file loaded]). I > haven't checked to see what happens with the VCD format waveform dump. > > The linked Windows ghdl mcode version (GHDL installer for Windows latest > version <http://ghdl.free.fr/site/pmwiki.php?n=Main.Download>) isn't > the most current version: > > sum *.exe > > 50841 1152 ghdl-win-installer-latest.exe > 50841 1152 ghdl-installer-0.29.exe > 55223 1152 ghdl-installer-0.29.1.exe > > It has the same sum as version 0.29. > > > Version 0.29.1 is available from http://ghdl.free.fr/download.html, the > link installer <http://ghdl.free.fr/ghdl-installer-0.29.1.exe> in the > first paragraph > (http://ghdl.free.fr/ghdl-installer-0.29.1.exe). > > I'd suggest giving the *actual* latest version a try. ( > ghdl-installer-0.29.1.exe <http://ghdl.free.fr/ghdl-installer-0.29.1.exe>). > > > If I recall correctly the problem with the Windows version of 0.29 dealt > with stack object boundaries being on 8 byte boundaries instead of 16 byte > boundaries. I can imagine a scenario where this is responsible for getting > stuck in a loop. > > Once you've got a version that works, here's a sample test bench for the > dff model: > dff_tb.vhdl > -------------- > library ieee; > use ieee.std_logic_1164.all; > > entity dff_tb is > > end entity dff_tb; > > architecture behaviour of dff_tb is > component dff > port ( > d: in std_logic; > clk: in std_logic; > rst: in std_logic; > q: out std_logic > ); > end component dff; > > signal d: std_logic := '0'; > signal clk: std_logic := '0'; > signal rst: std_logic := '1'; > signal q: std_logic; > begin > DUT: dff > port map ( > d => d, > clk => clk, > rst => rst, > q => q > ); > > -- Stimulus: > > CLOCK: -- free running clock > process -- Requires ghdl -r <model> --stop-time=<number>ns > begin -- to stop model execution. > wait for 20 ns; > clk <= not clk; > end process CLOCK; > > RESET: > process > begin > wait for 60 ns; > rst <= '0'; > wait; -- done with reset > end process RESET; > > DATA: > process > begin > wait for 80 ns; > d <= '1'; > wait for 40 ns; > d <= '0'; > wait for 80 ns; > d <= '1'; > wait for 120 ns; > d <= '0'; > wait for 40 ns; > wait; > end process DATA; > end behaviour; > ------- > > > ghdl -a dff.vhdl > ghdl -a dff_tb.vhdl > ghdl -r dff_tb --stop-time=360ns --wave=dff_tb.ghw > > Note no elaborate -e command needed in an mcode version of ghdl. Because > there's a free running clock you need to pass a stop time to the simulator. > Instead of specifying a GHDL Waveform dump file format you could use > Vector Change Dump (VCD), which is text based: > > ghdl -r dff_tb --stop-time=360ns --vcd=dff_tb.vcd > > > If you have gtkwave installed: > > gtkwave dff_tb.ghw > > (gtkwave dff_tb.vcd) > > In the SST window expand top, expand dff_tb > > In the lower Signals window select test bench signals , append and insert > blank, and you'd end up with something like this: > > > > Don't forget to write the save file. > > The Signals window will likely show the top level signals by default when > using VCD. go ahead and select and append them, and insert blanks. > > The windows version of gtkwave can be retrieved from here: > http://www.dspia.com/gtkwave.html > > You need both gtkwave.exe.gz <http://www.dspia.com/gtkwave.exe.gz> and > all_libs.tar.gz <http://www.dspia.com/all_libs.tar.gz>. Read the > directions. all_libs.tar.gz contains the gtk libs. You need to have > either mingw or cygwin purportedly (I'm not a Windows user, this was done > on a Mac). > > And most of all, have fun. > > > > >
_______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
