Altera_Forum
Honored Contributor
12 years agoCounter1 "q" o/p needs to be fed into the ROM "A_address" input .... Please Help.
LIBRARY ieee;
USE ieee.std_logic_1164.all; LIBRARY lpm; USE lpm.lpm_components.all; LIBRARY altera_mf; USE altera_mf.all; ENTITY LPM_ROM_MEGAFUNCTION IS PORT( A_address :IN std_logic_vector (0 downto 0); Sclk, clock :IN std_logic; Data,q :OUT STD_LOGIC_VECTOR (0 DOWNTO 0)); END LPM_ROM_MEGAFUNCTION; Architecture Behavioural of LPM_ROM_MEGAFUNCTION is component Variation1 PORT ( address : IN STD_LOGIC_VECTOR (0 DOWNTO 0); clken : IN STD_LOGIC := '1'; clock : IN STD_LOGIC := '1'; q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0) ); end component; component Counter1 PORT ( clock : IN STD_LOGIC ; updown : IN STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (0 DOWNTO 0) ); end component; BEGIN rom_unit : variation1 PORT map ( address => A_address, clken => '1', clock => sclk, q => Data ); counter_unit : counter1 PORT map ( clock => clock, updown => '1', q => A_address ); End Behavioural; ====Dont konw what Im doing wrong here====Give me the following error message====Please Help==== Info: ******************************************************************* Info: Running Quartus II Analysis & Synthesis Info: Version 9.1 Build 350 03/24/2010 Service Pack 2 SJ Web Edition Info: Processing started: Sun Nov 03 21:55:54 2013 Info: Command: quartus_map --read_settings_files=on --write_settings_files=off LPM_ROM_MEGAFUNCTION -c LPM_ROM_MEGAFUNCTION Info: Found 2 design units, including 1 entities, in source file variation1.vhd Info: Found design unit 1: variation1-SYN Info: Found entity 1: Variation1 Info: Found 2 design units, including 1 entities, in source file lpm_rom_megafunction.vhd Info: Found design unit 1: LPM_ROM_MEGAFUNCTION-Behavioural Info: Found entity 1: LPM_ROM_MEGAFUNCTION Info: Found 2 design units, including 1 entities, in source file counter1.vhd Info: Found design unit 1: counter1-SYN Info: Found entity 1: Counter1 Error (10577): VHDL error at LPM_ROM_MEGAFUNCTION.vhd(51): actual port "A_address" of mode "in" cannot be associated with formal port "q" of mode "out" Error (10599): VHDL error at LPM_ROM_MEGAFUNCTION.vhd(51): can't update value of interface object "A_address" of mode IN Error: Quartus II Analysis & Synthesis was unsuccessful. 2 errors, 0 warnings Error: Peak virtual memory: 239 megabytes Error: Processing ended: Sun Nov 03 21:55:54 2013 Error: Elapsed time: 00:00:00 Error: Total CPU time (on all processors): 00:00:01 Error: Quartus II Full Compilation was unsuccessful. 4 errors, 0 warnings