test bench

W

whereismelvin

I wrote a testbench in which i declared a variable ic as bit_vector (3
to 0). now when i tried putting
ic:=ic + 1 inside a loop it shows operator argument type mismatch.
I treid declaring it as signed and unsigned.
 
T

Tricky

I wrote a testbench in which i declared a variable ic as bit_vector (3
to 0). now when i tried putting
ic:=ic + 1 inside a loop it shows  operator argument type mismatch.
I treid declaring it as signed and unsigned.

Im guessing you are using the following:

use ieee.std_logic_arith.all;
use iee.std_logic_unsigned.all;
use iee.std_logic_signed.all;

replace all of these with ieee.numeric_std.all;

then, done declare ic as a bit_vector, declare it as unsigned/signed
and it should work.

so:

process
variable ic : unsigned(3 downto 0) := "0000"; --or put the
initial state in the reset path
begin
....
ic := ic + 1;
....
end process;

this will work fine.
 

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
474,164
Messages
2,570,898
Members
47,440
Latest member
YoungBorel

Latest Threads

Top