急!谁帮我看一下这段verilog代码什么意思?
正在学习中,谁能解释下这段程序什么意思?越详细越好~~感激不尽!always@(posedgeclkornegedgerst_n)//don'tunderstandbeg...
正在学习中,谁能解释下这段程序什么意思?越详细越好~~感激不尽!
always @ (posedge clk or negedge rst_n) //don't understand
begin
if(!rst_n)
begin
send_req_0 <= 0;
send_req_1 <= 0;
send_req_2 <= 0;
end
else
begin
send_req_0 <= send_req;
send_req_1 <= send_req_0;
send_req_2 <= send_req_1;
end
end
assign pos_send_req = send_req_1 & (~send_req_2); 展开
always @ (posedge clk or negedge rst_n) //don't understand
begin
if(!rst_n)
begin
send_req_0 <= 0;
send_req_1 <= 0;
send_req_2 <= 0;
end
else
begin
send_req_0 <= send_req;
send_req_1 <= send_req_0;
send_req_2 <= send_req_1;
end
end
assign pos_send_req = send_req_1 & (~send_req_2); 展开
展开全部
always @ (posedge clk or negedge rst_n) 意思是在时钟的上升沿或复位的下降沿会执行下面的操作
begin
if(!rst_n) 如果复位(RST_N这个信号为低电平) 那么下面三个信号为0
begin
send_req_0 <= 0;
send_req_1 <= 0;
send_req_2 <= 0;
end
else 否则(RST_N这个信号不为低电平) 那么下面三个信号赋三个不同的值
begin
send_req_0 <= send_req;
send_req_1 <= send_req_0;
send_req_2 <= send_req_1;
end
end
assign pos_send_req = send_req_1 & (~send_req_2); 这个跟上面的always 块是分开的,是pos_send_req 信号的值为send_req_1 & (~send_req_2)
begin
if(!rst_n) 如果复位(RST_N这个信号为低电平) 那么下面三个信号为0
begin
send_req_0 <= 0;
send_req_1 <= 0;
send_req_2 <= 0;
end
else 否则(RST_N这个信号不为低电平) 那么下面三个信号赋三个不同的值
begin
send_req_0 <= send_req;
send_req_1 <= send_req_0;
send_req_2 <= send_req_1;
end
end
assign pos_send_req = send_req_1 & (~send_req_2); 这个跟上面的always 块是分开的,是pos_send_req 信号的值为send_req_1 & (~send_req_2)
追问
我想问一下always块中的代码的意义是什么?对下面的pos_send_req的影响是什么?
追答
always块中就是两个不同情况下给send_req_0/1/2赋不同的值 对pos_send_req没有影响
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询