Question
Hi i am trying to run this testbench file: module testbench; // Inputs reg [4:0] A, B, C, D, E; // Outputs wire sum_of_difference; //
Hi i am trying to run this testbench file:
module testbench; // Inputs reg [4:0] A, B, C, D, E; // Outputs wire sum_of_difference; // Instantiate the DUT sum_of_difference dut ( .A(A), .B(B), .C(C), .D(D), .E(E), .sum_of_difference(sum_of_difference) ); // Test case 1 initial begin // Assign input values A = 5'b01010; B = 5'b01010; C = 5'b01010; D = 5'b01010; E = 5'b01010; // Wait for 1 ns #1; // Check output assert(sum_of_difference == 5'b10101); else $error("Test case 1 failed"); end
----------------------------------
and i am getting this error:
Error: (vlog-13069) C:/intelFPGA/17.0/sad2_tb.v(27): near "else": syntax error, unexpected else.
If someone could help me i would be gratefull!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started