1 //===============================================================================
2 // FPGA MOONCRESTA LOGIC IP MODULE
6 // Copyright(c) 2004 Katsumi Degawa , All rights reserved
10 // This program is freeware for non-commercial use.
11 // An author does no guarantee about this program.
12 // You can use this under your own risk.
14 //================================================================================
17 //================================================
19 // 3-to-8 line decoder
20 //================================================
31 input I_G1,I_G2a,I_G2b;
36 wire [2:0]I_G = {I_G1,I_G2a,I_G2b};
37 always@(I_G or I_Sel or O_Q)
39 if(I_G == 3'b100 )begin
41 3'b000: O_Q = 8'b11111110;
42 3'b001: O_Q = 8'b11111101;
43 3'b010: O_Q = 8'b11111011;
44 3'b011: O_Q = 8'b11110111;
45 3'b100: O_Q = 8'b11101111;
46 3'b101: O_Q = 8'b11011111;
47 3'b110: O_Q = 8'b10111111;
48 3'b111: O_Q = 8'b01111111;
58 //================================================
60 // 2-to-4 line decoder
61 //================================================
75 always@(I_G or I_Sel or O_Q)