|
|
|
verilog ½Ã°è[µðÁöÅÐ ³í¸® ȸ·Î] |
|
|
|
|
|
|
|
|
Å°¿öµå : |
|
|
¼Ò°³±Û |
verilog ½Ã°è[µðÁöÅÐ ³í¸® ȸ·Î] |
¿ä¾à |
¸ðµâ ¹× ½Ã¹Ä·¹À̼Ç
1. ±âº» ½Ã°è Á¦ÀÛ (0.1ÃÊ~1ºÐ´ÜÀ§, ½ºÅ¾¿öÄ¡) <Àüü ½Ã°£¸ðµâÀÌÁö¸¸ 1ºÐ±îÁö¸¸ ÄÚµùÇÏ¿´½À´Ï´Ù.> ¨¿±âº» ½Ã°£ ¸ðµâ <`timescale 100ns/1ns module timer_go (c1k,reset,comma_a,sec_b,sec_a,min_b,min_a,hour_b,hour_a,night_a,c1k_b,c1k_c); input c1k,reset; output [5:0] comma_a, sec_b, min_b, hour_b; output [4:0] sec_a, min_a; output [2:0] hour_a; output [3:0] night_a; output c1k_c; output [17:0] c1k_b; reg [5:0] comma_a, sec_b, min_b, hour_b; reg [4:0] sec_a, min_a; reg [2:0] hour_a; reg [3:0] night_a; reg c1k_c; reg [17:0] c1k_b; initial begin comma_a=0; sec_a = 0; sec_b = 0; min_a = 0; min_b = 0; hour_a = 0; hour_b = 0; night_a = 4'hA; c1k_b = -1; c1k_c = 0; end always @ (posedge c1k or posedge reset) begin if (c1k_b == 18'd99999) begin c1k_b <= 0; c1k_c <= 1; end else begin c1k_b <= c1k_b + 1; c1k_c = 0; end end always @ (posedge c1k_c or posedge reset) begin if(reset) begin sec_b <= 0; co> |
|
|
|
|
À§ Á¤º¸¹× °Ô½Ã¹° ³»¿ëÀÇ Áø½Ç¼º¿¡ ´ëÇÏ¿© º¸ÁõÇÏÁö ¾Æ´ÏÇϸç, ÇØ´ç Á¤º¸ ¹× °Ô½Ã¹° ÀúÀ۱ǰú ±âŸ ¹ýÀû Ã¥ÀÓÀº ÀÚ·á µî·ÏÀÚ¿¡°Ô ÀÖ½À´Ï´Ù. À§ Á¤º¸¹× °Ô½Ã¹° ³»¿ëÀÇ ºÒ¹ýÀû ÀÌ¿ë, ¹«´ÜÀüÀç¹× ¹èÆ÷´Â ±ÝÁöµÇ¾î ÀÖ½À´Ï´Ù. ÀúÀÛ±ÇħÇØ, ¸í¿¹ÈÑ¼Õ µî ºÐÀï¿ä¼Ò ¹ß°ß½Ã ÇÏ´ÜÀÇ ÀúÀÛ±Ç Ä§ÇØ½Å°í¸¦ ÀÌ¿ëÇØ Áֽñ⠹ٶø´Ï´Ù. |
|