0

I am currently doing a project in ModelSim, and Im having some trouble with the compilation. All I want to is change the value of my pin from 0 to 1, but when I compile it says that there os a error. tool directives are not supported before VHDL 2008. I dont know why this is happening, once that my professor disponiblized a example file and I did exactly like he did. The full code is below.

-- João Vítor Abrantes - 19/0031085
-- UnB - Engenharia Elétrica 
--
--  - Experimento 2 -
--   Somador Completo

-- Entity 
entity testbench is end;

-- Library
library ieee;
use ieee.std_logic_1164.all;
use std.textio.all;

architecture tb_sum of testbench is
-- Component
component tb_sum1
    port(
        W    : in  std_logic; --A
        X    : in  std_logic; --B
        Y    : in  std_logic; --Cin
        Z    : out std_logic; --S
        Z1   : out std_logic  --Cout
    );
end component;

    signal i_1 : std_logic;
    signal i_2 : std_logic;
    signal i_3 : std_logic; 

Begin

    S1    : tb_sum1 port map ( W => i_1 , Y => i_2 , X => i_3 , Z => open);
    Cout1 : tb_sum1 port map ( W => i_1 , Y => i_2 , X => i_3 , Z1 => open);

estimulo: process 

begin 

wait for 5 ns; i_1 <= `1`, -- This is the part that he says the error is
wait for 5 ns; 
wait for 5 ns; 
wait for 5 ns; 
wait for 5 ns; 
wait for 5 ns; 
wait for 5 ns; 
wait;
end process estimulo;

end tb_sum;
0

2 Answers 2

1

you should use ' instead of ` and also need to use ; instead of ,

your code:

wait for 5 ns; i_1 <= `1`,

replace with:

wait for 5 ns; i_1 <= '1';
Sign up to request clarification or add additional context in comments.

Comments

0

I searched for tool directives VHDL, and I get this:

Tool directives are arbitrary words preceded by a backtick character `.

I believe ' or " should be used here.

1 Comment

Thank you for the help. Actually I was using ` instead of ', such a tiny mistae, but caused me a lot of headache. lol

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.