python verilog顶层连线,如何在Verilog中连接两个模块?
I have written two modules DLatch and RSLatch and i want to write verilog code to join those two.
解决方案
Seriously, you should get yourself a Verilog handbook or search for some online resources.
Anyway, something like this should work:
module dff (
input Clk,
input D,
output Q,
output Qbar
);
wire q_to_s;
wire qbar_to_r;
wire clk_bar;
assign clk_bar = ~Clk;
D_latch dlatch (
.D(D),
.Clk(Clk),
.Q(q_to_s),
.Qbar(qbar_to_r)
);
RS_latch rslatch (
.S(q_to_s),
.R(qbar_to_r),
.Clk(clk_bar),
.Qa(Q),
.Qb(Qbar)
);
endmodule
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
