]>
Commit | Line | Data |
---|---|---|
782690d0 MG |
1 | //===============================================================================\r |
2 | // FPGA MOONCRESTA VIDO-MIX\r | |
3 | //\r | |
4 | // Version : 1.00\r | |
5 | //\r | |
6 | // Copyright(c) 2004 Katsumi Degawa , All rights reserved\r | |
7 | //\r | |
8 | // Important !\r | |
9 | //\r | |
10 | // This program is freeware for non-commercial use. \r | |
11 | // An author does no guarantee about this program.\r | |
12 | // You can use this under your own risk.\r | |
13 | //\r | |
14 | //================================================================================\r | |
15 | \r | |
16 | \r | |
17 | module mc_vedio_mix(\r | |
18 | \r | |
19 | I_VID_R,\r | |
20 | I_VID_G,\r | |
21 | I_VID_B,\r | |
22 | I_STR_R,\r | |
23 | I_STR_G,\r | |
24 | I_STR_B,\r | |
25 | \r | |
26 | I_C_BLnXX,\r | |
27 | I_C_BLX,\r | |
28 | I_MISSILEn,\r | |
29 | I_SHELLn,\r | |
30 | \r | |
31 | O_R,\r | |
32 | O_G,\r | |
33 | O_B\r | |
34 | \r | |
35 | );\r | |
36 | \r | |
37 | input [2:0]I_VID_R;\r | |
38 | input [2:0]I_VID_G;\r | |
39 | input [1:0]I_VID_B;\r | |
40 | input [2:0]I_STR_R;\r | |
41 | input [2:0]I_STR_G;\r | |
42 | input [1:0]I_STR_B;\r | |
43 | \r | |
44 | input I_C_BLnXX;\r | |
45 | input I_C_BLX;\r | |
46 | input I_MISSILEn;\r | |
47 | input I_SHELLn;\r | |
48 | \r | |
49 | output [2:0]O_R;\r | |
50 | output [2:0]O_G;\r | |
51 | output [1:0]O_B;\r | |
52 | \r | |
53 | // MISSILE => Yellow ;\r | |
54 | // SHELL => White ;\r | |
55 | wire W_MS_D = ~(I_MISSILEn & I_SHELLn);\r | |
56 | wire W_MS_R = ~I_C_BLX & W_MS_D;\r | |
57 | wire W_MS_G = ~I_C_BLX & W_MS_D;\r | |
58 | wire W_MS_B = ~I_C_BLX & W_MS_D & ~I_SHELLn ;\r | |
59 | \r | |
60 | assign O_R = I_C_BLnXX ? I_VID_R | I_STR_R | {1'b0,W_MS_R,W_MS_R}: 3'b000 ;\r | |
61 | assign O_G = I_C_BLnXX ? I_VID_G | I_STR_G | {1'b0,W_MS_G,W_MS_G}: 3'b000 ;\r | |
62 | assign O_B = I_C_BLnXX ? I_VID_B | I_STR_B | { W_MS_B,W_MS_B}: 2'b00 ;\r | |
63 | \r | |
64 | endmodule |