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
詳解 (共 1 筆)
未解鎖
輸出Y途中沒有經過clock。Veril...