I resolved the previous error but system is not allowing me to create a new question that's why i am editing the current one. Now i am getting an error in map like this:
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out22" (output
signal=Mmux_ac97_sdata_out21) has input signal "Madd_frame_count_lut<1>"
which will be trimmed. See Section 5 of the Map Report File for details about
why the input signal will become undriven.
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out22" (output
signal=Mmux_ac97_sdata_out21) has input signal "Madd_frame_count_lut<3>"
which will be trimmed. See Section 5 of the Map Report File for details about
why the input signal will become undriven.
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out22" (output
signal=Mmux_ac97_sdata_out21) has input signal "Madd_frame_count_lut<2>"
which will be trimmed. See Section 5 of the Map Report File for details about
why the input signal will become undriven.
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out23" (output
signal=Mmux_ac97_sdata_out22) has input signal "Madd_frame_count_cy<0>" which
will be trimmed. See Section 5 of the Map Report File for details about why
the input signal will become undriven.
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has input signal "Madd_frame_count_lut<1>"
which will be trimmed. See Section 5 of the Map Report File for details about
why the input signal will become undriven.
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has input signal "Madd_frame_count_lut<2>"
which will be trimmed. See Section 5 of the Map Report File for details about
why the input signal will become undriven.
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has input signal "Madd_frame_count_lut<3>"
which will be trimmed. See Section 5 of the Map Report File for details about
why the input signal will become undriven.
ERROR:MapLib:979 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has input signal "Madd_frame_count_cy<0>" which
will be trimmed. See Section 5 of the Map Report File for details about why
the input signal will become undriven.
ERROR:MapLib:979 - LUT5 symbol "Mmux_ac97_sdata_out29_F" (output signal=N8) has
input signal "Mmux_ac97_sdata_out25" which will be trimmed. See Section 5 of
the Map Report File for details about why the input signal will become
undriven.
ERROR:MapLib:979 - LUT4 symbol "Mmux_ac97_sdata_out29_G" (output signal=N9) has
input signal "Madd_frame_count_cy<0>" which will be trimmed. See Section 5 of
the Map Report File for details about why the input signal will become
undriven.
ERROR:MapLib:979 - LUT4 symbol "Mmux_ac97_sdata_out29_G" (output signal=N9) has
input signal "Mmux_ac97_sdata_out25" which will be trimmed. See Section 5 of
the Map Report File for details about why the input signal will become
undriven.
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out22" (output
signal=Mmux_ac97_sdata_out21) has an equation that uses input pin I0, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out22" (output
signal=Mmux_ac97_sdata_out21) has an equation that uses input pin I1, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out22" (output
signal=Mmux_ac97_sdata_out21) has an equation that uses input pin I2, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out23" (output
signal=Mmux_ac97_sdata_out22) has an equation that uses input pin I1, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has an equation that uses input pin I1, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has an equation that uses input pin I3, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has an equation that uses input pin I4, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT6 symbol "Mmux_ac97_sdata_out25" (output
signal=Mmux_ac97_sdata_out24) has an equation that uses input pin I5, which
no longer has a connected signal. Please ensure that all the pins used in the
equation for this LUT have signals that are not trimmed (see Section 5 of the
Map Report File for details on which signals were trimmed).
ERROR:MapLib:978 - LUT5 symbol "Mmux_ac97_sdata_out29_F" (output signal=N8) has
an equation that uses input pin I3, which no longer has a connected signal.
Please ensure that all the pins used in the equation for this LUT have
signals that are not trimmed (see Section 5 of the Map Report File for
details on which signals were trimmed).
ERROR:MapLib:978 - LUT4 symbol "Mmux_ac97_sdata_out29_G" (output signal=N9) has
an equation that uses input pin I0, which no longer has a connected signal.
Please ensure that all the pins used in the equation for this LUT have
signals that are not trimmed (see Section 5 of the Map Report File for
details on which signals were trimmed).
ERROR:MapLib:978 - LUT4 symbol "Mmux_ac97_sdata_out29_G" (output signal=N9) has
an equation that uses input pin I3, which no longer has a connected signal.
Please ensure that all the pins used in the equation for this LUT have
signals that are not trimmed (see Section 5 of the Map Report File for
details on which signals were trimmed).
Full code in VHDL is:
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 14:35:54 02/28/2016
-- Design Name:
-- Module Name: audioloopbackVHDL - 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.numeric_std.all;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity audioloopbackVHDL is
port (
clock :in std_logic;
ac97_sdata_out :out std_logic;
ac97_sdata_in :in std_logic;
ac97_sync :out std_logic;
audio_reset_b :out std_logic;
ac97_bit_clock :in std_logic);
end audioloopbackVHDL;
architecture Behavioral of audioloopbackVHDL is
--attribute S: string;
--attribute S of ac97_sdata_out: signal is "TRUE";
signal abc : std_logic_vector (7 downto 0);
signal def : integer;
signal ghi : std_logic_vector (7 downto 0);
signal jkl : integer;
signal command_address : std_logic_vector(19 downto 0);
signal command_data : std_logic_vector(19 downto 0);
signal bit_count : std_logic_vector(7 downto 0) := "00000000";
signal frame_count : std_logic_vector(3 downto 0) := "0000";
signal command : std_logic_vector(23 downto 0);
signal reset_count : std_logic_vector(7 downto 0) := "00000000";
signal count : std_logic_vector(18 downto 0);
signal enable : std_logic_vector(19 downto 0);
signal en1 : std_logic_vector(17 downto 0);
begin
process(clock)
begin
if(rising_edge(clock))then
if(reset_count <= "11111111")then
audio_reset_b <= '1';
else
reset_count <= std_logic_vector(unsigned(reset_count) + 1 );
end if;
end if;
end process;
process(bit_count, ac97_bit_clock, command_data, command_address, frame_count)
begin
-- Generate the sync signal
if (bit_count <= "11111111")then
ac97_sync <= '1';
end if;
if (bit_count <= "00001111")then
ac97_sync <= '0';
end if;
if ((bit_count >= "00000000") and (bit_count <= "00001111"))then
-- Slot 0: Tags
case bit_count is
when "00000000" => ac97_sdata_out <= '1';
when "00000001" => ac97_sdata_out <= '1';
when "00000010" => ac97_sdata_out <= '1';
when others => ac97_sdata_out <= '0';
end case;
elsif ((bit_count >= "00010000") and (bit_count <= "00100011"))then
-- Slot 1: Command address
abc <= std_logic_vector(35 - unsigned(bit_count));
def <= to_integer(unsigned(abc));
ac97_sdata_out <= command_address(def);
elsif ((bit_count >= "00100100") and (bit_count <= "00110111"))then
-- Slot 2: Command data
ghi <= std_logic_vector(55 - unsigned(bit_count));
jkl <= to_integer(unsigned(ghi));
ac97_sdata_out <= command_data(jkl);
else
ac97_sdata_out <= '0';
end if;
if (bit_count <= "11111111")then
frame_count <= std_logic_vector(unsigned(frame_count) + 1);
bit_count <= std_logic_vector(unsigned(bit_count) + 1);
end if;
end process;
process(frame_count, command, ac97_bit_clock, count, command_address, command_data, ac97_sdata_in)
begin
case frame_count is
when "0000" => command <= "000000100000000000000000"; -- Unmute line outputs
when "0001" => command <= "000001000000000000000000"; -- Unmute headphones
when "0010" => command <= "000100000000100000001000"; -- Unmute line inputs
when others => command <= "111111000000000000000000"; -- Read vendor ID
end case;
-- Separate the address and data portions of the command
-- and pad them to 20 bits
command_address(19 downto 12) <= command(23 downto 16);
command_address(11 downto 0) <= "000000000000";
command_data(19 downto 4) <= command(15 downto 0);
command_data(3 downto 0) <= "0000";
end process;
end architecture;
I am also attaching my ucf code:
NET "clock" LOC="V10" | IOSTANDARD=LVCMOS33 | CLOCK_DEDICATED_ROUTE=FALSE;
#
# Audio CODEC
#
NET "audio_reset_b" LOC="K15" | IOSTANDARD = LVCMOS33 | DRIVE = 8 | SLEW = FAST ;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…