p11
Banned
Code:
---------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 17:38:49 05/13/2015
-- Design Name:
-- Module Name: COUNTLED - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.numeric_std .all;
package my_package is
function add (signal p,q : integer ) return integer ;
end package ;
package body my_package is
function add ( signal p,q : integer ) return integer is
begin
return p+q;
end add;
end my_package ;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use work . my_package .all;
entity add_1 is
port (a: in integer ;
b : in integer ;
y : out std_logic);
end entity add_1;
architecture beh of add_1 is
begin
variable c: integer ;..................... line 63
begin
c:= add (a,b ) ;
if c= 5 then
y <='1';
else
y <='0';
end if;
end beh
ERROR:HDLParsers:164 - "C:/Users/user/Desktop/phd/xilinx/p1/p11.vhd" Line 63. parse error, unexpected VARIABLE
Last edited: