Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 2.65 KB | None | 0 0
  1. -- Copyright (C) 1991-2013 Altera Corporation
  2. -- Your use of Altera Corporation's design tools, logic functions
  3. -- and other software and tools, and its AMPP partner logic
  4. -- functions, and any output files from any of the foregoing
  5. -- (including device programming or simulation files), and any
  6. -- associated documentation or information are expressly subject
  7. -- to the terms and conditions of the Altera Program License
  8. -- Subscription Agreement, Altera MegaCore Function License
  9. -- Agreement, or other applicable license agreement, including,
  10. -- without limitation, that your use is for the sole purpose of
  11. -- programming logic devices manufactured by Altera and sold by
  12. -- Altera or its authorized distributors.  Please refer to the
  13. -- applicable agreement for further details.
  14.  
  15. -- PROGRAM      "Quartus II 32-bit"
  16. -- VERSION      "Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Full Version"
  17. -- CREATED      "Wed Nov 15 14:46:29 2017"
  18.  
  19. LIBRARY ieee;
  20. USE ieee.std_logic_1164.all;
  21.  
  22. LIBRARY work;
  23.  
  24. ENTITY fulldecoder IS
  25.     PORT
  26.     (
  27.         enable :  IN  STD_LOGIC;
  28.         current_state :  IN  STD_LOGIC_VECTOR(3 DOWNTO 0);
  29.         w :  OUT  STD_LOGIC_VECTOR(15 DOWNTO 0)
  30.     );
  31. END fulldecoder;
  32.  
  33. ARCHITECTURE bdf_type OF fulldecoder IS
  34.  
  35. COMPONENT decode
  36.     PORT(En : IN STD_LOGIC;
  37.          w : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
  38.          y : OUT STD_LOGIC_VECTOR(0 TO 7)
  39.     );
  40. END COMPONENT;
  41.  
  42. COMPONENT split
  43.     PORT(cs : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
  44.          w3 : OUT STD_LOGIC;
  45.          w : OUT STD_LOGIC_VECTOR(2 DOWNTO 0)
  46.     );
  47. END COMPONENT;
  48.  
  49. COMPONENT combine
  50.     PORT(o1 : IN STD_LOGIC_VECTOR(0 TO 7);
  51.          o2 : IN STD_LOGIC_VECTOR(0 TO 7);
  52.          w : OUT STD_LOGIC_VECTOR(0 TO 15)
  53.     );
  54. END COMPONENT;
  55.  
  56. SIGNAL  SYNTHESIZED_WIRE_0 :  STD_LOGIC;
  57. SIGNAL  SYNTHESIZED_WIRE_9 :  STD_LOGIC_VECTOR(2 DOWNTO 0);
  58. SIGNAL  SYNTHESIZED_WIRE_10 :  STD_LOGIC;
  59. SIGNAL  SYNTHESIZED_WIRE_3 :  STD_LOGIC;
  60. SIGNAL  SYNTHESIZED_WIRE_5 :  STD_LOGIC;
  61. SIGNAL  SYNTHESIZED_WIRE_7 :  STD_LOGIC_VECTOR(0 TO 7);
  62. SIGNAL  SYNTHESIZED_WIRE_8 :  STD_LOGIC_VECTOR(0 TO 7);
  63.  
  64.  
  65. BEGIN
  66.  
  67.  
  68.  
  69. b2v_inst : decode
  70. PORT MAP(En => SYNTHESIZED_WIRE_0,
  71.          w => SYNTHESIZED_WIRE_9,
  72.          y => SYNTHESIZED_WIRE_7);
  73.  
  74.  
  75. b2v_inst1 : split
  76. PORT MAP(cs => current_state,
  77.          w3 => SYNTHESIZED_WIRE_10,
  78.          w => SYNTHESIZED_WIRE_9);
  79.  
  80.  
  81. SYNTHESIZED_WIRE_3 <= NOT(SYNTHESIZED_WIRE_10);
  82.  
  83.  
  84.  
  85. SYNTHESIZED_WIRE_0 <= SYNTHESIZED_WIRE_3 AND enable;
  86.  
  87.  
  88. SYNTHESIZED_WIRE_5 <= SYNTHESIZED_WIRE_10 AND enable;
  89.  
  90.  
  91. b2v_inst7 : decode
  92. PORT MAP(En => SYNTHESIZED_WIRE_5,
  93.          w => SYNTHESIZED_WIRE_9,
  94.          y => SYNTHESIZED_WIRE_8);
  95.  
  96.  
  97. b2v_inst8 : combine
  98. PORT MAP(o1 => SYNTHESIZED_WIRE_7,
  99.          o2 => SYNTHESIZED_WIRE_8,
  100.          w => w);
  101.  
  102.  
  103. END bdf_type;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement