📄 xianshi.vhd
字号:
-- WARNING: Do NOT edit the input and output ports in this file in a text
-- editor if you plan to continue editing the block that represents it in
-- the Block Editor! File corruption is VERY likely to occur.
-- Copyright (C) 1991-2005 Altera Corporation
-- Your use of Altera Corporation's design tools, logic functions
-- and other software and tools, and its AMPP partner logic
-- functions, and any output files any of the foregoing
-- (including device programming or simulation files), and any
-- associated documentation or information are expressly subject
-- to the terms and conditions of the Altera Program License
-- Subscription Agreement, Altera MegaCore Function License
-- Agreement, or other applicable license agreement, including,
-- without limitation, that your use is for the sole purpose of
-- programming logic devices manufactured by Altera and sold by
-- Altera or its authorized distributors. Please refer to the
-- applicable agreement for further details.
-- Generated by Quartus II Version 5.0 (Build Build 148 04/26/2005)
-- Created on Fri Sep 21 09:57:52 2007
LIBRARY ieee;
USE ieee.std_logic_1164.all;
-- Entity Declaration
ENTITY XIANSHI IS
-- {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE!
PORT
(
SHI : IN STD_LOGIC_VECTOR(1 downto 0);
WEI : IN STD_LOGIC_VECTOR(3 downto 0);
Q : OUT STD_LOGIC_VECTOR(15 downto 0)
);
-- {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE!
END XIANSHI;
-- Architecture Body
ARCHITECTURE XIANSHI_architecture OF XIANSHI IS
BEGIN
process(shi,wei)
variable b:std_logic_vector(15 downto 0);
begin
case shi is
when "00"=>
case wei is
when "0000"=>b:="0110000000000000";
when "0001"=>b:="0111100000000000";
when "0010"=>b:="0001111000000000";
when "0011"=>b:="0000011110000000";
when "0100"=>b:="0000000111100000";
when "0101"=>b:="0000000001111000";
when "0110"=>b:="0000000000011110";
when "0111"=>b:="0000000000000111";
when "1000"=>b:="0000000000000111";
when "1001"=>b:="0000000000011110";
when "1010"=>b:="0000000001111000";
when "1011"=>b:="0000000111100000";
when "1100"=>b:="0000011110000000";
when "1101"=>b:="0001111000000000";
when "1110"=>b:="0111100000000000";
when "1111"=>b:="0110000000000000";
when others=>null;
end case;
when "01"=>
case wei is
when "0000"=>b:="0000000000000000";
when "0001"=>b:="0000000000000000";
when "0010"=>b:="1111111111111111";
when "0011"=>b:="1111111111111111";
when "0100"=>b:="0000000110000000";
when "0101"=>b:="0000000110000000";
when "0110"=>b:="0000000110000000";
when "0111"=>b:="0000000110000000";
when "1000"=>b:="0000000110000000";
when "1001"=>b:="0000000110000000";
when "1010"=>b:="0000000110000000";
when "1011"=>b:="0000000110000000";
when "1100"=>b:="1111111111111111";
when "1101"=>b:="1111111111111111";
when "1110"=>b:="0000000000000000";
when "1111"=>b:="0000000000000000";
when others=>null;
end case;
when "10"=>
case wei is
when "0000"=>b:="0000000000000000";
when "0001"=>b:="0000000000000000";
when "0010"=>b:="1111111111111111";
when "0011"=>b:="1111111111111111";
when "0100"=>b:="1100000000000011";
when "0101"=>b:="1100000000000011";
when "0110"=>b:="1100000000000011";
when "0111"=>b:="0110000000000110";
when "1000"=>b:="0110000000000110";
when "1001"=>b:="0110000000000110";
when "1010"=>b:="0011000000001100";
when "1011"=>b:="0001100000011000";
when "1100"=>b:="0000111111110000";
when "1101"=>b:="0000011111100000";
when "1110"=>b:="0000000000000000";
when "1111"=>b:="0000000000000000";
when others=>null;
end case;
when "11"=>
case wei is
when "0000"=>b:="0000000000000000";
when "0001"=>b:="0000000000000000";
when "0010"=>b:="0000000000000000";
when "0011"=>b:="1111111111111111";
when "0100"=>b:="1111111111111111";
when "0101"=>b:="0000000000000011";
when "0110"=>b:="0000000000000011";
when "0111"=>b:="0000000000000011";
when "1000"=>b:="0000000000000011";
when "1001"=>b:="0000000000000011";
when "1010"=>b:="0000000000000011";
when "1011"=>b:="0001100000000111";
when "1100"=>b:="0001100000000111";
when "1101"=>b:="0000000000000000";
when "1110"=>b:="0000000000000000";
when "1111"=>b:="0000000000000000";
when others=>null;
end case;
when others=>null;
end case;
q<=b;
end process;
END XIANSHI_architecture;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -