5 若欲使用 Verilog 語言合成(synthesize)出與下圖相同功能的電路,則下列各 Verilog 模組何者正確?
(A)module TestCircuit (A, B, C, clock, X, Y);input A;input B;input C;input clock;output X;output Y;reg X;
reg Y;always @(posedge clock) X <= A | B;always @(B or C) Y = B & C; endmodule
(B)module TestCircuit (A, B, C, clock, X, Y);input A;input B;input C;input clock;output X;output Y;reg X;
reg Y;always @(posedge clock) X <= A | B;always @(posedge clock) Y = B & C; endmodule
(C)module TestCircuit (A, B, C, clock, X, Y);input A;input B;input C;input clock;output X;output Y;reg X;
wire Y;always @(posedge clock) X = A | B;always @(posedge clock) Y = B & C;endmodule
(D)module TestCircuit (A, B, C, clock, X, Y);input A;input B;input C;input clock;output X;output Y;reg X;
reg Y;always @(posedge clock) X <= A+B;always @(B or C) Y = B * C;endmodule
D X
Y
A
B
C
clock
答案:登入後查看
統計: A(41), B(57), C(74), D(28), E(0) #682759
統計: A(41), B(57), C(74), D(28), E(0) #682759