63 lines
1 KiB
Coq
63 lines
1 KiB
Coq
|
module jyh_4490_4_entry(out1, out0, code, sel, CO,
|
||
|
// 十位输出 个位输出 数码管型码 数码管位码 进/借位标志位
|
||
|
in1, in0, load, clk, clr, en, upd);
|
||
|
// 十位装载 个位装载 装载信号 计数时钟信号 清零信号 使能信号 正反计数标志位
|
||
|
|
||
|
output [3:0] out1;
|
||
|
output [3:0] out0;
|
||
|
output [6:0] code;
|
||
|
output [7:0] sel;
|
||
|
output CO;
|
||
|
input [3:0] in1;
|
||
|
input [3:0] in0;
|
||
|
input clk,load,clr,en,upd;
|
||
|
|
||
|
|
||
|
//wire subclk;
|
||
|
//jyh_4490_3_divide(
|
||
|
//.clkin(clk),
|
||
|
//.clkout(subclk)
|
||
|
//);
|
||
|
|
||
|
|
||
|
//个位计数器
|
||
|
jyh_4490_4_counter c0(
|
||
|
.Q(out0),
|
||
|
.clk(clk),
|
||
|
.co(CO),
|
||
|
.clr(clr),
|
||
|
.load(load),
|
||
|
.in(in0),
|
||
|
.en(en),
|
||
|
.upd(upd));
|
||
|
|
||
|
//十位计数器
|
||
|
jyh_4490_4_counter c1(
|
||
|
.Q(out1),
|
||
|
.clk(CO||load),
|
||
|
.clr(clr),
|
||
|
.load(load),
|
||
|
.in(in1),
|
||
|
.en(en),
|
||
|
.upd(upd));
|
||
|
|
||
|
|
||
|
|
||
|
//四位数码管译码器
|
||
|
//jyh_4490_3_encoder e1(
|
||
|
//.codeout(code),
|
||
|
//.d1(out0),
|
||
|
//.d2(out1),
|
||
|
//.clk(clk),
|
||
|
//.sel(sel[1:0])
|
||
|
//);
|
||
|
|
||
|
jyh_4490_4_simpleEncoder e1(
|
||
|
.codeout(code),
|
||
|
.d1(out0),
|
||
|
.clk(clk),
|
||
|
.sel(sel[0:0])
|
||
|
);
|
||
|
|
||
|
endmodule
|