Problem viewing waveforms using gtkwave

Joined
Sep 28, 2010
Messages
3
Reaction score
0
Hey.. I am new to VHDL and I was trying to simulate a simple halfadder circuit. I created a testbench. But I am not sure whether its correct or not. I am using ghdl to analyze the code and create VCD file which then should be read by gtkwave for waveforms. This is my code:
Code:
library IEEE;
use IEEE.std_logic_1164.all;

entity ha is
port(a,b : in bit;
s,c : out bit);
end ha;
architecture haa of ha is
begin
s<=a xor b;
c<=a and b;
end haa;



entity testbench is
end testbench;

architecture test of testbench is
signal int1,int2,sum,carry : bit;

component ha is
port(a,b : in bit;
s,c : out bit);
end component;

begin
process
begin
int1<='1';
int2<='0';
wait for 4 ns;
int1<='1';
int2<='1';

wait ;
end process;
u1: ha port map(int1,int2,sum,carry);
end test;

Everything goes fine but when I give the command to view the waveforms in gtkwave the following shows up:

GTKWave Analyzer v3.3.2 (w)1999-2010 BSI

[0] start time.
[0] end time.
VCD times range is equal to zero. Exiting.

Can anyone tell why is it happening? Thanks in advance
 
Joined
Jan 29, 2009
Messages
152
Reaction score
0
You must have done something wrong; the code works as expected with ghdl + gtkwave for me;

ghdl --version
GHDL 0.29 (20100109) [Sokcho edition]

GTKWave Analyzer v3.3.12 (w)1999-2010 BSI
 
Joined
Jan 29, 2009
Messages
152
Reaction score
0
Code:
$ ghdl -a ha.vhdl
$ ghdl -e testbench
$ ghdl -r testbench --vcd=ha.vcd
$ gtkwave ha.vcd

GTKWave Analyzer v3.3.12 (w)1999-2010 BSI

[0] start time.
[4000000] end time.
 
Joined
Sep 28, 2010
Messages
3
Reaction score
0
Code:
$ ghdl -a ha.vhd
$ ghdl -e ha
$ ghdl -r ha --vcd=ha.vcd
$ gtkwave ha.vcd

I was giving these commands. By the way what is wrong with them?
Thanks a lot..


I worked fine with your method
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top