finish
commit
ef1d14610d
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
After Width: | Height: | Size: 545 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,25 @@
|
|||||||
|
`timescale 1ns/1ns
|
||||||
|
module traffic_light_tb();
|
||||||
|
parameter CYCLE = 20;
|
||||||
|
reg sys_clk ;
|
||||||
|
reg sys_rst_n ;
|
||||||
|
wire [3: 0] led ;
|
||||||
|
always #(CYCLE / 2) sys_clk = ~sys_clk;
|
||||||
|
initial begin
|
||||||
|
sys_clk = 1'b0;
|
||||||
|
sys_rst_n = 1'b0;
|
||||||
|
#(CYCLE);
|
||||||
|
sys_rst_n = 1'b1;
|
||||||
|
#(CYCLE * 5 * 83);//20 x 5 x 83 = 8300ns
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
|
|
||||||
|
traffic_light traffic_light_inst(
|
||||||
|
.sys_clk (sys_clk) ,
|
||||||
|
.sys_rst_n (sys_rst_n) ,
|
||||||
|
|
||||||
|
.led (led)
|
||||||
|
);
|
||||||
|
|
||||||
|
defparam traffic_light_inst.MAX_S = 5;//1s-->5 x 20 = 100ns
|
||||||
|
endmodule
|
@ -0,0 +1,26 @@
|
|||||||
|
# Copyright (C) 2018 Intel Corporation. All rights reserved.
|
||||||
|
# Your use of Intel Corporation's design tools, logic functions
|
||||||
|
# and other software and tools, and its AMPP partner logic
|
||||||
|
# functions, and any output files from any of the foregoing
|
||||||
|
# (including device programming or simulation files), and any
|
||||||
|
# associated documentation or information are expressly subject
|
||||||
|
# to the terms and conditions of the Intel Program License
|
||||||
|
# Subscription Agreement, the Intel Quartus Prime License Agreement,
|
||||||
|
# the Intel FPGA IP License Agreement, or other applicable license
|
||||||
|
# agreement, including, without limitation, that your use is for
|
||||||
|
# the sole purpose of programming logic devices manufactured by
|
||||||
|
# Intel and sold by Intel or its authorized distributors. Please
|
||||||
|
# refer to the applicable agreement for further details.
|
||||||
|
|
||||||
|
# Quartus Prime Version 18.1.0 Build 625 09/12/2018 SJ Standard Edition
|
||||||
|
# File: D:\sdkj_projects\led_flow_3\tcl\led_flow_3.tcl
|
||||||
|
# Generated on: Tue Dec 26 15:16:28 2023
|
||||||
|
|
||||||
|
package require ::quartus::project
|
||||||
|
|
||||||
|
set_location_assignment PIN_G15 -to led[0]
|
||||||
|
set_location_assignment PIN_F16 -to led[1]
|
||||||
|
set_location_assignment PIN_F15 -to led[2]
|
||||||
|
set_location_assignment PIN_D16 -to led[3]
|
||||||
|
set_location_assignment PIN_E1 -to sys_clk
|
||||||
|
set_location_assignment PIN_E15 -to sys_rst_n
|
Loading…
Reference in New Issue