⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clock.v

📁 数字钟设计
💻 V
字号:
module clock(hour_led_1,   //outputs             hour_led_2,             minute_led_1,             minute_led_2,             pm_am_led,             alarm_out,                clk,         //inputs             reset_b,             setup_enable,               sel,             minute_in,               hour_in,                 pm_am_in,                alarm_switch);output [6:0] hour_led_1;   //the MSB of the houroutput [6:0] hour_led_2;   //the LSB of the houroutput [6:0] minute_led_1; //the MSB of the minuteoutput [6:0] minute_led_2; //the LSB of the minuteoutput       pm_am_led;    //display the AM or the PMoutput       alarm_out;    //enable the alarm wire   [6:0] Display;      //display the clockinput        setup_enable; //the high level can set the timeinput        sel;          //when setup_enable is high level,if sel is high level,it can set the alarm;if sel is low level,it can set the timeinput        clk;          input        reset_b;input   [5:0]minute_in;  // minute inputinput   [3:0]hour_in;     //hour  inputinput        pm_am_in;    //input the AM or the PMinput        alarm_switch;  // the switch of the alarm wire         pm_am_led_1;   // the AM or the PM output from the counter modulewire    [6:0]hour_led_11;   //the current MSB of the hour in the temp_time modulewire    [6:0]hour_led_22;   //the current LSB of the hour in the temp_time modulewire    [6:0]minute_led_11; //the current MSB of the minute in the temp_time modulewire    [6:0]minute_led_22; //the current LSB of the minute in the temp_time modulewire    [6:0] hour_timer_1; //the  MSB of the hour in the timer modulewire    [6:0] hour_timer_2; //the  LSB of the hour in the timer module wire    [6:0] minute_timer_1;//the  MSB of the minute in the timer modulewire    [6:0] minute_timer_2;//the  LSB of the minute in the timer modulecounter counter(                  .minute_led_1(minute_led_1),//outputs                  .minute_led_2(minute_led_2),                  .hour_led_1(hour_led_1),                  .hour_led_2(hour_led_2),                  .pm_am_led(pm_am_led),                  .reset_b(reset_b), //inputs                  .clk(clk),                  .pm_am_in(pm_am_led_1),                  .hour_led_11(hour_led_11),                  .hour_led_22(hour_led_22),                  .minute_led_11(minute_led_11),                  .minute_led_22(minute_led_22),                  .setup_enable(setup_enable),                  .sel(sel));timer  timer (                .alarm_out(alarm_out),  //outputs                .hour_timer_1(hour_timer_1),                .hour_timer_2(hour_timer_2),                .minute_timer_1(minute_timer_1),                .minute_timer_2(minute_timer_2),                                .hour_led_1(hour_led_1), //inputs                .hour_led_2(hour_led_2),                .minute_led_1(minute_led_1),                .minute_led_2(minute_led_2),                .alarm_switch(alarm_switch),                .clk(clk),                .reset_b(reset_b),                .setup_enable(setup_enable),                .sel(sel),                .hour_led_11(hour_led_11),                 .hour_led_22(hour_led_22),                .minute_led_11(minute_led_11),                .minute_led_22(minute_led_22),                .pm_am_in(pm_am_in),                .pm_am_in_1(pm_am_led));temp_time temp_time(                      .hour_led_11(hour_led_11), //outputs                      .hour_led_22(hour_led_22),                      .minute_led_11(minute_led_11),                      .minute_led_22(minute_led_22),                      .pm_am_led(pm_am_led_1),                      .clk(clk),    //inputs                      .reset_b(reset_b),                      .minute_in(minute_in),                      .hour_in(hour_in),                      .pm_am_in(pm_am_in));display display_1(                  .Display(Display),     //outputs                  .counter_display(hour_led_1), //inputs                  .timer_display(hour_timer_1),                  .setup_enable(setup_enable),                  .sel(sel));display display_2(                  .Display(Display),     //outputs                  .counter_display(hour_led_2), //inputs                  .timer_display(hour_timer_2),                  .setup_enable(setup_enable),                  .sel(sel));display display_3(                  .Display(Display),     //outputs                  .counter_display(minute_led_1), //inputs                  .timer_display(minute_timer_1),                  .setup_enable(setup_enable),                  .sel(sel));display display_4(                  .Display(Display),     //outputs                  .counter_display(minute_led_2), //inputs                  .timer_display(minute_timer_2),                  .setup_enable(setup_enable),                  .sel(sel));endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -