Electronics development

Moderators: None (Apply to moderate this forum)
Number of threads: 512
Number of posts: 1020

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
simple multiplier/devider Posted by jul_011 on 22 Jan 2012 at 5:09 AM
hello,
i need your help with the folowing code.

The circuit has two 8 bit integer inputs a and b and two integer outputs x and y when x=a*b and y=a/2.
The code must be concurrent.

Here is what i wrote:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;

package my_data_types is
type integer_input is array (7 downto 0) of integer range -8 to 8;
end my_data_types;

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;

entity mul_dev is
port (a,b: in integer_input(7 downto 0);
x,y: out integer_input (7 downto 0));
end mul_dev;

architecture Behavioral of mul_dev is


begin

x<= (a*b);
y<= (a/2);
end Behavioral;


I'm using xillinx ise progect navigator to simulate and i get the following errors:
<integer_input> is not declared.
Entity <mul_dev> is not yet compiled.


It seems he won't accept the pre defined array, what coul be the problem?

10x!



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.