¤
¤T¤HŚćĽ˛Śł§ÚŽv
Guest
Dear all,
I'm confused when studying the textbook-Digital Logic with VHDL Design.
The question-5.17 in chapter 5.
Given the relation between input and output.
And Knowing the function of the circuit,
what's the point should I notice to judge if the code is good or not ?
So far, I take the code's functionality as a MUX.
A little bit strange...
I appreciate for any suggestion .
----------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all
ENTITY problem IS
PORT (Input : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
Output : OUT STD_LOGIC_VECTOR(3 DOWNTO 0));
END problem;
ARCHITECTURE LogicFunc OF problem IS
BEGIN
WITH Input SELECT
Output <="0001" WHEN "0101",
"0010" WHEN "0110",
"0011" WHEN "0111",
"0010" WHEN "1001",
"0100" WHEN "1010",
"0110" WHEN "1011",
"0011" WHEN "1101",
"0110" WHEN "1110",
"1001" WHEN "1111",
"0000" WHEN OTHERS,
END LogicFunc;
--
[1;32m Ą°ľoŤHŻ¸: [33mş~ŻŤ¤pŻ¸ [37m<bbs.ee.nsysu.edu.tw>[m
[1;31m Ąť From: [36mpailiou.ee.nsysu.edu.tw[m
I'm confused when studying the textbook-Digital Logic with VHDL Design.
The question-5.17 in chapter 5.
Given the relation between input and output.
And Knowing the function of the circuit,
what's the point should I notice to judge if the code is good or not ?
So far, I take the code's functionality as a MUX.
A little bit strange...
I appreciate for any suggestion .
----------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all
ENTITY problem IS
PORT (Input : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
Output : OUT STD_LOGIC_VECTOR(3 DOWNTO 0));
END problem;
ARCHITECTURE LogicFunc OF problem IS
BEGIN
WITH Input SELECT
Output <="0001" WHEN "0101",
"0010" WHEN "0110",
"0011" WHEN "0111",
"0010" WHEN "1001",
"0100" WHEN "1010",
"0110" WHEN "1011",
"0011" WHEN "1101",
"0110" WHEN "1110",
"1001" WHEN "1111",
"0000" WHEN OTHERS,
END LogicFunc;
--
[1;32m Ą°ľoŤHŻ¸: [33mş~ŻŤ¤pŻ¸ [37m<bbs.ee.nsysu.edu.tw>[m
[1;31m Ąť From: [36mpailiou.ee.nsysu.edu.tw[m