Category: VHDL

VHDL Code for Binary to BCD Converter

Last updated on July 18th, 2017 at 11:40 pmBinary to BCD Converter Some times we need to display the output in a seven-segment display. For that purpose we will convert binary to BCD. To translate from binary to BCD, we can employ the shift-and-add-3 algorithm: Left-shift the (n-bit) binary number one bit. If n shifts

VHDL code for 4-bit binary comparator

Last updated on June 9th, 2015 at 03:26 pmBinary comparator compare two 4-bit binary number. It is also known as magnitude comparator and digital comparator. Analog form comparator is voltage comparator. The functionality of this comparator circuit is, It consist of 3 outputs Greater, Equal and Smaller. If inp-A is greater then inp-B then greater

VHDL Code for 4-bit Adder / Subtractor

Last updated on May 19th, 2016 at 08:06 pmThis example describes a two input 4-bit adder/subtractor design in VHDL. The design unit multiplexes add and subtract operations with an OP input. 0 input produce adder output and 1 input produce subtractor output. VHDL Code for 4-bit Adder / Subtractor

VHDL Code for Flipflop – D,JK,SR,T

Last updated on July 18th, 2017 at 11:54 pmAll flip-flops can be divided into four basic types: SR, JK, D and T. They differ in the number of inputs and in the response invoked by different value of input signals. SR FlipFlop A flip-flop circuit can be constructed from two NAND gates or two NOR gates. These flip-flops are shown

VHDL Code for Clock Divider (Frequency Divider)

Last updated on July 18th, 2017 at 11:57 pmClock Divider Clock Divider is also known as frequency divider, which divides the input clock frequency and produce output clock. In our case let us take input frequency as 50MHz and divide the clock frequency to generate 1KHz output signal. VHDL code consist of Clock and Reset

VHDL code for 4-bit ALU

Last updated on July 19th, 2017 at 12:04 amALU ALU’s comprise the combinational logic that implements logic operations such as AND, OR, NOT gate and arithmetic operations, such as Adder, Subtractor. Functionally, the operation of typical ALU is represented as shown in diagram below, Functional Description of 4-bit Arithmetic Logic Unit Controlled by the three function

VHDL Code for 4-Bit Shift Register

Last updated on July 21st, 2017 at 06:51 amShift Register VHDL Code for shift register can be categorised in serial in serial out shift register, serial in parallel out shift register, parallel in parallel out shift register and parallel in serial out shift register. Parallel In – Parallel Out Shift Registers For parallel in –