Write a vdhl code from which this converter can be inferred


Function binary_to_gray

A binary-to-gray code converter was proposed in exercise 5.6. Write a function that implements such a converter, which should be constructed in the declarative part of the ARCHITECTURE (main code). In the code proper (architecture body), include a call to that function in order to test (simulate) it.
exercise 5.6:

Generic Binary-to-Gray Converter

The regular binary code, which consists of code words ordered according to their increasing unsigned decimal values, constitutes the most commonly used digital code. In some applications, however, gray code (Pedroni 2008), which is an UDC (Unit Distance Code) because any two adjacent code words di¤er by just one bit, might be preferred (in electromechanical applications, for example). This exercise deals with the design of a circuit capable of converting regular binary code into gray code.

a) Just to practice with gray code, make a table with two columns, placing the 16 four-bit binary entries in the first column, and the corresponding gray values in the second column.

b) In order to implement a generic converter, find a closed-form expression for binary-togray conversion. Use it to check your entries in the second column for part (a).

c) Write a VDHL code from which this converter can be inferred. Enter N (number of bits) as a GENERIC parameter, and use the closed-form expression obtained above to do the computations. Include simulation results in your solution.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a vdhl code from which this converter can be inferred
Reference No:- TGS02209103

Expected delivery within 24 Hours