Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Problem with simulation

 
Thread Tools Search this Thread
Old 11-27-2007, 11:28 AM   #1
Default Problem with simulation


Hallo

I have a problem with a simulation in Modelsim! It always shows me the following error:

# ** Error: (vsim-3601) Iteration limit reached at time 0 ps.

I know what this mean but idont see the error in the Code. So i think it is possible that somebody here will see the mistake!


entity transmit_unit is

port (
clk : in std_logic;
reset : in std_logic;
data_in : in transmit_data;
enable_out : out std_logic := '1';
data_out : out std_logic);

end transmit_unit;


architecture twoproc of transmit_unit is

signal r, rin : transmit_reg_type;
signal tmp_data_in : std_logic := '1';
begin -- twoproc


-- purpose: combinatorial process of the two-process design
-- type : combinational
-- inputs : data_in, r
-- outputs: data_out, rin
comb: process(data_in.transmit_en, r)
variable tmp : transmit_reg_type;
variable databit : std_logic := '0';
variable prebit : std_logic := '0';
begin -- process comb
tmp := r;
if data_in.transmit_en = '1' then
if (tmp.precount = precount_value) then
databit := data_in.data;
--look if bit Stuffing is enable
if (data_in.bit_stuff_en = '1') then
--send the data or the stuffing bit
if(tmp.bitnumber = conv_std_logic_vector(6,3)) then
databit := not prebit;
enable_out <= '1';
tmp.bitnumber := (others => '0');
else
prebit := databit;
end if;
--compare if the the prebit and the databit are the same
if (databit = prebit) then
tmp.bitnumber := tmp.bitnumber + 1;
else
tmp.bitnumber := (others => '0');
end if;
--control the bitnumber if it reached the value 5
if (tmp.bitnumber = bitstuffing_value) then
enable_out <= '0';
tmp.bitnumber := conv_std_logic_vector(6,3);
end if;
end if;

tmp_data_in <= databit;
tmp.precount := (others => '0');
else
tmp.precount := tmp.precount + 1;
end if;
else
tmp.precount := precount_value;
end if;
rin <= tmp;
end process comb;

data_out <= tmp_data_in;

-- purpose: sequential process or the two-process design
-- type : sequential
-- inputs : clk, reset, rin
-- outputs: r
seq: process (clk, reset)
begin -- process seq
if reset = '0' then -- asynchronous reset (active
low)
r.bitnumber <= (others => '0');
r.precount <= precount_value;
elsif clk'event and clk = '1' then -- rising clock edge
r <= rin;
end if;
end process seq;

end twoproc;


fresh
fresh is offline   Reply With Quote
Old 11-28-2007, 02:29 PM   #2
bedrr
Junior Member
 
Join Date: Nov 2007
Location: morocco
Posts: 5
Default
Quote:
Originally Posted by fresh
Hallo

I have a problem with a simulation in Modelsim! It always shows me the following error:

# ** Error: (vsim-3601) Iteration limit reached at time 0 ps.

I know what this mean but idont see the error in the Code. So i think it is possible that somebody here will see the mistake!


entity transmit_unit is

port (
clk : in std_logic;
reset : in std_logic;
data_in : in transmit_data;
enable_out : out std_logic := '1';
data_out : out std_logic);

end transmit_unit;


architecture twoproc of transmit_unit is

signal r, rin : transmit_reg_type;
signal tmp_data_in : std_logic := '1';
begin -- twoproc


-- purpose: combinatorial process of the two-process design
-- type : combinational
-- inputs : data_in, r
-- outputs: data_out, rin
comb: process(data_in.transmit_en, r)
variable tmp : transmit_reg_type;
variable databit : std_logic := '0';
variable prebit : std_logic := '0';
begin -- process comb
tmp := r;
if data_in.transmit_en = '1' then
if (tmp.precount = precount_value) then
databit := data_in.data;
--look if bit Stuffing is enable
if (data_in.bit_stuff_en = '1') then
--send the data or the stuffing bit
if(tmp.bitnumber = conv_std_logic_vector(6,3)) then
databit := not prebit;
enable_out <= '1';
tmp.bitnumber := (others => '0');
else
prebit := databit;
end if;
--compare if the the prebit and the databit are the same
if (databit = prebit) then
tmp.bitnumber := tmp.bitnumber + 1;
else
tmp.bitnumber := (others => '0');
end if;
--control the bitnumber if it reached the value 5
if (tmp.bitnumber = bitstuffing_value) then
enable_out <= '0';
tmp.bitnumber := conv_std_logic_vector(6,3);
end if;
end if;

tmp_data_in <= databit;
tmp.precount := (others => '0');
else
tmp.precount := tmp.precount + 1;
end if;
else
tmp.precount := precount_value;
end if;
rin <= tmp;
end process comb;

data_out <= tmp_data_in;

-- purpose: sequential process or the two-process design
-- type : sequential
-- inputs : clk, reset, rin
-- outputs: r
seq: process (clk, reset)
begin -- process seq
if reset = '0' then -- asynchronous reset (active
low)
r.bitnumber <= (others => '0');
r.precount <= precount_value;
elsif clk'event and clk = '1' then -- rising clock edge
r <= rin;
end if;
end process seq;

end twoproc;





can you explain what the types transmit_data, transmit_reg_type are ?


bedrr
bedrr is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comcast + Wireless Internet Problem shadoweloc General Help Related Topics 1 07-01-2008 06:19 PM
Dial Up Problem smackedass A+ Certification 3 02-02-2007 11:59 PM
Re: Virus Problem ** Help!** David BlandIII A+ Certification 1 03-02-2004 06:00 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM
Re: Serious Computer Problem Bret A+ Certification 0 11-19-2003 12:51 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46