1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
| module SZZ_TOP( input CP,reset,button_in,button_in_alarm, input CHO_SET,CHO_SET_alarm, input TJ_clock,jiajian,jiajian_alarm, input mode, input cho24_12, output [6:0]SEG_Out, output [7:0]SEG_CHO, output [15:0] led_out, output zdbs_led ); wire CLK_1hz; wire CLK_1000hz; wire [3:0] hour_shi_24to12; wire [3:0] hour_ge_24to12; wire [3:0] P_A; wire [3:0] P_A_top; wire [3:0] hour_shi; wire [3:0] hour_ge; wire [3:0] min_shi; wire [3:0] min_ge; wire [3:0] miao_shi; wire [3:0] miao_ge; wire [3:0] seg; wire jia_min,jia_hour;
wire [3:0] hour_shi_alarm; wire [3:0] hour_ge_alarm; wire [3:0] min_shi_alarm; wire [3:0] min_ge_alarm;
wire [3:0] hour_shi_top; wire [3:0] hour_ge_top; wire [3:0] min_shi_top; wire [3:0] min_ge_top; wire [3:0] miao_shi_top; wire [3:0] miao_ge_top;
TO24_12 TO24_12_inst( .cho24_12(cho24_12), .hour_shi_in(hour_shi_24to12), .hour_ge_in(hour_ge_24to12), .hour_shi_out(hour_shi), .hour_ge_out(hour_ge), .P_A(P_A) );
ZDBS ZDBS_inst( .clk(CLK_1000hz), .hour_shi(hour_shi), .hour_ge(hour_ge), .min_shi(min_shi), .min_ge(min_ge), .miao_shi(miao_shi), .miao_ge(miao_ge), .zdbs_led(zdbs_led) );
alarm_led alarm_led_inst( .clk(CLK_1000hz), .hour_shi_alarm(hour_shi_alarm), .hour_ge_alarm(hour_ge_alarm), .min_shi_alarm(min_shi_alarm), .min_ge_alarm(min_ge_alarm), .hour_shi(hour_shi_24to12), .hour_ge(hour_ge_24to12), .min_shi(min_shi), .min_ge(min_ge), .led_out(led_out) );
alarm alarm_indust( .clk(CLK_1000hz), .button_in_alarm(button_in_alarm), .jiajian_alarm(jiajian_alarm), .CHO_SET_alarm(CHO_SET_alarm), .hour_shi_alarm(hour_shi_alarm), .hour_ge_alarm(hour_ge_alarm), .min_shi_alarm(min_shi_alarm), .min_ge_alarm(min_ge_alarm) );
mode mode_inst( .mode(mode), .hour_shi(hour_shi), .hour_ge(hour_ge), .min_shi(min_shi), .min_ge(min_ge), .miao_shi(miao_shi), .miao_ge(miao_ge), .hour_shi_alarm(hour_shi_alarm), .hour_ge_alarm(hour_ge_alarm), .min_shi_alarm(min_shi_alarm), .min_ge_alarm(min_ge_alarm), .hour_shi_top(hour_shi_top), .hour_ge_top(hour_ge_top), .min_shi_top(min_shi_top), .min_ge_top(min_ge_top), .miao_shi_top(miao_shi_top), .miao_ge_top(miao_ge_top), .P_A(P_A), .P_A_top(P_A_top) );
FDD FDD_inst( .clk(CLK_1000hz), .button_in(button_in), .CHO_SET(CHO_SET), .jia_min(jia_min), .jia_hour(jia_hour) );
cp_1hz CP_1hz( .CP(CP), .CLK(CLK_1hz) ); cp_1000hz CP_1000hz( .CP(CP), .CLK(CLK_1000hz) ); COUNT COUNT_inst( .reset(reset), .clk(CLK_1hz), .hour_shi(hour_shi_24to12), .hour_ge(hour_ge_24to12), .min_shi(min_shi), .min_ge(min_ge), .miao_shi(miao_shi), .miao_ge(miao_ge), .jiajian_hour(jia_hour), .jiajian_min(jia_min), .jiajian(jiajian), .TJ_clock(TJ_clock) );
SEG_CHO SEG_CHO_inst( .clk_1000hz(CLK_1000hz), .hour_shi(hour_shi_top), .hour_ge(hour_ge_top), .min_shi(min_shi_top), .min_ge(min_ge_top), .miao_shi(miao_shi_top), .miao_ge(miao_ge_top), .seg_cho(SEG_CHO), .P_A(P_A_top), .seg(seg) );
SEG SEG_inst( .IN(seg), .show(SEG_Out) );
endmodule
|