Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

How can we visually describe our goals?

Answered: 1 week ago