`timescale 1ns/1ns module huawei6( input wire clk0 , input wire clk1 , input wire rst , input wire sel , output reg clk_out ); reg q0, q1; always@(negedge clk1 or negedge rst) if(!rst) q0 <= 0; else q0 <= ~sel & ~q1; always@(negedge clk0 or negedge rst) if(!rst) q1 <= 0; else q1 <= sel & ~q0; always@(*)begin clk_out <= (q0 & clk0) | (q1 & clk1); end endmodule 这样就可以了 感谢楼主的答案
1

相关推荐

2025-12-17 13:34
复旦大学 算法工程师
回家当保安:复旦✌🏻,佬你的简历感觉挺好的,寒假日常hc比较少。佬可以过完年之后再试试,日常实习hc比较充足
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务