-1

Trying to declare a wire to be the opposite of wire C, we use nC for this wire.

module lab_4 (A,B,C,D,E,Y);

output Y;

input   A;
input   B;
input   C;
input   D;
input   E;

wire A;
wire B;
wire C;
wire D;
wire E;
wire nA;
wire nB;
wire nC;
wire nD;

wire nCE;
wire nAnCE;
wire nABD;
wire nBnDE;
wire ACnD;
wire Y;

assign nA = ~A;
assign nB = ~B;
assign nC = ~C;
assign nD = ~D;

or  (nCE,nC,E);
and (nAnCE,nA,nCE);
and (nABD,nA,B, D);
and (nBnDE, nB, nD, E);
and (ACnD, A, C, nD);
or  (Y,nAnCE, nABD, nBnDE, ACnD);

endmodule

Our professor has showed us to use or (destination,1,2);, and (destination,1,2); , but not the not();. We think it should be not (nC, C); but it is not working at all.

Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44
Patrick D
  • 79
  • 8

1 Answers1

2

not (nC, C); is correct, so if it's not working, it must be due to some other reason.

Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44