+/EE316
digital logic
git clone https://git.julia.blue/+/EE316
91885ad
master
1`timescale1 ns/ 1 ps 2////////////////////////////////////////////////////////////////////////////////// 3// Company: 4// Engineer: 5// 6// Create Date: 03/01/2019 03:53:18 PM 7// Design Name: 8// Module Name: four_bit_decoder 9// Project Name: 10// Target Devices: 11// Tool Versions: 12// Description: 13// 14// Dependencies: 15// 16// Revision: 17// Revision 0.01 - File Created 18// Additional Comments: 19// 20////////////////////////////////////////////////////////////////////////////////// 21 22 23module four_bit_decoder ( 24input a , 25input b , 26input c , 27input d , 28output dec0 , 29output dec1 , 30output dec2 , 31output dec3 , 32output dec4 , 33output dec5 , 34output dec6 , 35output dec7 , 36output dec8 , 37output dec9 38); 39wire a_not , b_not , c_not , d_not ; 40 41not n0 ( a_not , a ); 42not n1 ( b_not , b ); 43not n2 ( c_not , c ); 44not n3 ( d_not , d ); 45 46and g0 ( dec0 , a_not , b_not , c_not , d_not ); 47and g1 ( dec1 , a_not , b_not , c_not , d ); 48and g2 ( dec2 , a_not , b_not , c , d_not ); 49and g3 ( dec3 , a_not , b_not , c , d ); 50and g4 ( dec4 , a_not , b , c_not , d_not ); 51and g5 ( dec5 , a_not , b , c_not , d ); 52and g6 ( dec6 , a_not , b , c , d_not ); 53and g7 ( dec7 , a_not , b , c , d ); 54and g8 ( dec8 , a , b_not , c_not , d_not ); 55and g9 ( dec9 , a , b_not , c_not , d ); 56 57endmodule