Question: Write a verilog behavioral code for a design with 4 bit inputs (in1) and 6 bit output (out1), with module name tester2. The output conditions

Write a verilog behavioral code for a design with 4 bit inputs (in1) and 6 bit output (out1), with module name "tester2". The output conditions are

1) When input has greater number of 1's then output should be appended with 2'b11 along with input

2)  When input has less number of 1's then output should be appended with 2'b00 along with input

3) When input has equal number of 1's then output should be appended with 2'b01 along with input

4) Design the test bench such that every scenario is completely tested.

Note:- Kindly just provide the running verilog code along with the test bench for the design. No need to show the output

Step by Step Solution

3.40 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Designed module as per the inputs condition mentioned in the question Verilog code module t... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!

Related Book