May 21, 2019 #1 S sushl Junior Member level 2 Joined Aug 22, 2018 Messages 24 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 238 Hi all , I've tried a simple EXOR verilog code along with test bench on the EDA playground, test bench is forced with inputs 00,01,10,11 respectively ; can anybody tell me why were not getting correct outputs? all are showing x,x,x,x in the LOG. Here's the link to page https://www.edaplayground.com/x/3QTX thanks and regards Sushl
Hi all , I've tried a simple EXOR verilog code along with test bench on the EDA playground, test bench is forced with inputs 00,01,10,11 respectively ; can anybody tell me why were not getting correct outputs? all are showing x,x,x,x in the LOG. Here's the link to page https://www.edaplayground.com/x/3QTX thanks and regards Sushl
May 21, 2019 #2 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 52,400 Helped 14,748 Reputation 29,778 Reaction score 14,093 Trophy points 1,393 Location Bochum, Germany Activity points 298,004 Code Verilog - [expand]1 2 3 4 5 6 7 8 module my_XOR(output Out, input A, input B); wire x,y,inA,inB,not_inA,not_inB; and(x,inA,not_inB); and(y,not_inA,inB); not(not_inA,inA); not(not_inB,inB); or(Out,x,y); endmodule Do you see inA and inB being driven anywhere? I don't.
Code Verilog - [expand]1 2 3 4 5 6 7 8 module my_XOR(output Out, input A, input B); wire x,y,inA,inB,not_inA,not_inB; and(x,inA,not_inB); and(y,not_inA,inB); not(not_inA,inA); not(not_inB,inB); or(Out,x,y); endmodule Do you see inA and inB being driven anywhere? I don't.
May 22, 2019 #3 S sushl Junior Member level 2 Joined Aug 22, 2018 Messages 24 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 238 FvM said: Code Verilog - [expand]1 2 3 4 5 6 7 8 module my_XOR(output Out, input A, input B); wire x,y,inA,inB,not_inA,not_inB; and(x,inA,not_inB); and(y,not_inA,inB); not(not_inA,inA); not(not_inB,inB); or(Out,x,y); endmodule Do you see inA and inB being driven anywhere? I don't. Click to expand... Thanks FVM. I have mistakenly considered the input's inA and inB as wire's ; i have rectified them it works now. Last edited: May 22, 2019
FvM said: Code Verilog - [expand]1 2 3 4 5 6 7 8 module my_XOR(output Out, input A, input B); wire x,y,inA,inB,not_inA,not_inB; and(x,inA,not_inB); and(y,not_inA,inB); not(not_inA,inA); not(not_inB,inB); or(Out,x,y); endmodule Do you see inA and inB being driven anywhere? I don't. Click to expand... Thanks FVM. I have mistakenly considered the input's inA and inB as wire's ; i have rectified them it works now.