`timescale 1ns / 1ps
module top(
input wire clk ,
input wire rst_n ,
input wire rx ,
input wire echo ,
input wire [1:0] D0 ,
output reg [3:0] dj ,
output wire trig ,
output wire [3:0] sel ,
output reg t17 ,
output reg u18 ,
output wire [7:0] seg
);
wire valid ;
wire [13:0] dis ;
wire [7:0] data ;
reg [13:0] dis_t ;
reg [1:0] state ;
reg [15:0] cunt ;
parameter ZERO = 2'b00;
parameter ONE = 2'b11;
//产生一个计数器
always @(posedge clk ) begin
基于发FPGA 练手智能小车顶层文件
于 2024-12-17 18:30:12 首次发布