使用工具:Xilinx ISE 14.7
module code(
input wire [3:0] high_data,
input wire [3:0] low_data,
input wire clk,
output reg [6:0] led,
output reg [3:0] en
);
reg [3:0] data;
reg [15:0] times;
initial times = 0;
always @ (posedge clk)
begin
times = times + 16'b1;
if(times == 40000)
times = 16'b0;
end
always @ (posedge clk)
begin
if(times > 20000)
begin
en = 4'b1101;
data = high_data;
end
else
begin
en = 4'b1110;
data = low_da