Hardware components | ||||||
![]() |
| × | 1 | |||
Software apps and online services | ||||||
![]() |
| |||||
![]() |
| |||||
|
We have planned to do Software Defined Radio by using FPGA. Firstly, we separated this project into two parts which are the transmitter part and receiver part. On the transmitter part we took sinusoidal wave data from MATLAB. By using these data, sinusoidal wave was implemented on FPGA board. As long as we have done this issue, araised cosine filter was created on FPGA by doing thesame process. Then, we made raised cosine filter arrays with data that was expected to come from themicrophone, but we created data by hand, we could not use microphone.
After that we multiplied Sinusoidal wave and raised cosine filter arrays. As final process for transmitter part we added these arrays each other and observed transmitting wave form by using an oscilloscope. On the receiver part, we could not do so much thing but sinusoidal wave and raised cosine filter are used in this part. We will make Phase-Locked Loop for catching transmitting signal correctly.
ObjectivesGenerally, analog radios have one modulation type and they can not be implemented new technology easily. It is necessary to change their hardware to adjust modulation type. Because of that, people who use these radios have to pay money to change. In addition, analog radios’ transmitters are very expensive and large. We solve these problems by implementing software define radio on FPGA. We have chosen FPGA since it works faster than other microcontroller thanks to working parallel processing.
With this project, we want to create new platform for communication. This platform will work all digitally, and it can be implemented new technology easily. For example, if new modulation type, that is faster than other modulation types, is made, we can change code and keep using software defined radio.
Another usage area is that you can broadcast by using software define radio which is made by us. This broadcast will be more safety then analog systems. Because of that, communication between planes, ships or any other means of transport is provided by SDR.
Features and SpecificationsBasically, sinusoidal signals and raised cosine filter are implemented on FPGA. We have implemented 4 QAM. In this method, data is separated two parts as imaginal and real. We have 8 bits data and this data is divided by twos. Four bits goes to one ROM and these represent imaginal part, other four bits goes to different ROM and these represent real part. These ROM are shown in Figure1. Raise cosine filter phase changes by data. If data bit is equal to 1, raised cosine is normal without any phase changing. If data bit is equal to 0 (normally it is equal to -1 but we chose like because it is easier), raised cosine is reverse with 180-degree phase changing. This raised cosine goes to their address (it is indicated figure 1). Finally, they are added each other and go to antenna.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_unsigned.ALL;
entity Tx_main is
Port ( clk,reset : in STD_LOGIC;
Tx_out : out STD_LOGIC_VECTOR (7 downto 0));
end Tx_main;
architecture main_flow of Tx_main is
component Multiplier is
Port ( A,B : in STD_LOGIC_VECTOR (7 downto 0);
D : out STD_LOGIC_VECTOR (7 downto 0));
end component;
--------------- Byte_Array definitions ------------------------
type Byte_Array is array(natural range <>) of std_logic_vector(7 downto 0);
constant sin_rom : Byte_Array(1023 downto 0):=("00000001","00000010","00000010","00000011","00000100","00000101","00000101","00000110","00000111","00001000","00001001","00001001","00001010","00001011","00001100","00001100","00001101","00001110","00001111","00010000","00010000","00010001","00010010","00010011","00010011","00010100","00010101","00010110","00010110","00010111","00011000","00011001","00011010","00011010","00011011","00011100","00011101","00011101","00011110","00011111","00100000","00100000","00100001","00100010","00100011","00100011","00100100","00100101","00100110","00100110","00100111","00101000","00101001","00101001","00101010","00101011","00101100","00101100","00101101","00101110","00101110","00101111","00110000","00110001","00110001","00110010","00110011","00110011","00110100","00110101","00110110","00110110","00110111","00111000","00111000","00111001","00111010","00111010","00111011","00111100","00111101","00111101","00111110","00111111","00111111","01000000","01000001","01000001","01000010","01000011","01000011","01000100","01000101","01000101","01000110","01000111","01000111","01001000","01001000","01001001","01001010","01001010","01001011","01001100","01001100","01001101","01001110","01001110","01001111","01001111","01010000","01010001","01010001","01010010","01010010","01010011","01010100","01010100","01010101","01010101","01010110","01010110","01010111","01011000","01011000","01011001","01011001","01011010","01011010","01011011","01011011","01011100","01011101","01011101","01011110","01011110","01011111","01011111","01100000","01100000","01100001","01100001","01100010","01100010","01100011","01100011","01100100","01100100","01100101","01100101","01100110","01100110","01100110","01100111","01100111","01101000","01101000","01101001","01101001","01101010","01101010","01101010","01101011","01101011","01101100","01101100","01101101","01101101","01101101","01101110","01101110","01101111","01101111","01101111","01110000","01110000","01110000","01110001","01110001","01110001","01110010","01110010","01110010","01110011","01110011","01110011","01110100","01110100","01110100","01110101","01110101","01110101","01110110","01110110","01110110","01110110","01110111","01110111","01110111","01111000","01111000","01111000","01111000","01111001","01111001","01111001","01111001","01111010","01111010","01111010","01111010","01111010","01111011","01111011","01111011","01111011","01111011","01111100","01111100","01111100","01111100","01111100","01111100","01111101","01111101","01111101","01111101","01111101","01111101","01111101","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111101","01111101","01111101","01111101","01111101","01111101","01111101","01111100","01111100","01111100","01111100","01111100","01111100","01111011","01111011","01111011","01111011","01111011","01111010","01111010","01111010","01111010","01111010","01111001","01111001","01111001","01111001","01111000","01111000","01111000","01111000","01110111","01110111","01110111","01110110","01110110","01110110","01110110","01110101","01110101","01110101","01110100","01110100","01110100","01110011","01110011","01110011","01110010","01110010","01110010","01110001","01110001","01110001","01110000","01110000","01110000","01101111","01101111","01101111","01101110","01101110","01101101","01101101","01101101","01101100","01101100","01101011","01101011","01101010","01101010","01101010","01101001","01101001","01101000","01101000","01100111","01100111","01100110","01100110","01100110","01100101","01100101","01100100","01100100","01100011","01100011","01100010","01100010","01100001","01100001","01100000","01100000","01011111","01011111","01011110","01011110","01011101","01011101","01011100","01011011","01011011","01011010","01011010","01011001","01011001","01011000","01011000","01010111","01010110","01010110","01010101","01010101","01010100","01010100","01010011","01010010","01010010","01010001","01010001","01010000","01001111","01001111","01001110","01001110","01001101","01001100","01001100","01001011","01001010","01001010","01001001","01001000","01001000","01000111","01000111","01000110","01000101","01000101","01000100","01000011","01000011","01000010","01000001","01000001","01000000","00111111","00111111","00111110","00111101","00111101","00111100","00111011","00111010","00111010","00111001","00111000","00111000","00110111","00110110","00110110","00110101","00110100","00110011","00110011","00110010","00110001","00110001","00110000","00101111","00101110","00101110","00101101","00101100","00101100","00101011","00101010","00101001","00101001","00101000","00100111","00100110","00100110","00100101","00100100","00100011","00100011","00100010","00100001","00100000","00100000","00011111","00011110","00011101","00011101","00011100","00011011","00011010","00011010","00011001","00011000","00010111","00010110","00010110","00010101","00010100","00010011","00010011","00010010","00010001","00010000","00010000","00001111","00001110","00001101","00001100","00001100","00001011","00001010","00001001","00001001","00001000","00000111","00000110","00000101","00000101","00000100","00000011","00000010","00000010","00000001","00000000","11111111","11111110","11111110","11111101","11111100","11111011","11111011","11111010","11111001","11111000","11110111","11110111","11110110","11110101","11110100","11110100","11110011","11110010","11110001","11110000","11110000","11101111","11101110","11101101","11101101","11101100","11101011","11101010","11101010","11101001","11101000","11100111","11100110","11100110","11100101","11100100","11100011","11100011","11100010","11100001","11100000","11100000","11011111","11011110","11011101","11011101","11011100","11011011","11011010","11011010","11011001","11011000","11010111","11010111","11010110","11010101","11010100","11010100","11010011","11010010","11010010","11010001","11010000","11001111","11001111","11001110","11001101","11001101","11001100","11001011","11001010","11001010","11001001","11001000","11001000","11000111","11000110","11000110","11000101","11000100","11000011","11000011","11000010","11000001","11000001","11000000","10111111","10111111","10111110","10111101","10111101","10111100","10111011","10111011","10111010","10111001","10111001","10111000","10111000","10110111","10110110","10110110","10110101","10110100","10110100","10110011","10110010","10110010","10110001","10110001","10110000","10101111","10101111","10101110","10101110","10101101","10101100","10101100","10101011","10101011","10101010","10101010","10101001","10101000","10101000","10100111","10100111","10100110","10100110","10100101","10100101","10100100","10100011","10100011","10100010","10100010","10100001","10100001","10100000","10100000","10011111","10011111","10011110","10011110","10011101","10011101","10011100","10011100","10011011","10011011","10011010","10011010","10011010","10011001","10011001","10011000","10011000","10010111","10010111","10010110","10010110","10010110","10010101","10010101","10010100","10010100","10010011","10010011","10010011","10010010","10010010","10010001","10010001","10010001","10010000","10010000","10010000","10001111","10001111","10001111","10001110","10001110","10001110","10001101","10001101","10001101","10001100","10001100","10001100","10001011","10001011","10001011","10001010","10001010","10001010","10001010","10001001","10001001","10001001","10001000","10001000","10001000","10001000","10000111","10000111","10000111","10000111","10000110","10000110","10000110","10000110","10000110","10000101","10000101","10000101","10000101","10000101","10000100","10000100","10000100","10000100","10000100","10000100","10000011","10000011","10000011","10000011","10000011","10000011","10000011","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000011","10000011","10000011","10000011","10000011","10000011","10000011","10000100","10000100","10000100","10000100","10000100","10000100","10000101","10000101","10000101","10000101","10000101","10000110","10000110","10000110","10000110","10000110","10000111","10000111","10000111","10000111","10001000","10001000","10001000","10001000","10001001","10001001","10001001","10001010","10001010","10001010","10001010","10001011","10001011","10001011","10001100","10001100","10001100","10001101","10001101","10001101","10001110","10001110","10001110","10001111","10001111","10001111","10010000","10010000","10010000","10010001","10010001","10010001","10010010","10010010","10010011","10010011","10010011","10010100","10010100","10010101","10010101","10010110","10010110","10010110","10010111","10010111","10011000","10011000","10011001","10011001","10011010","10011010","10011010","10011011","10011011","10011100","10011100","10011101","10011101","10011110","10011110","10011111","10011111","10100000","10100000","10100001","10100001","10100010","10100010","10100011","10100011","10100100","10100101","10100101","10100110","10100110","10100111","10100111","10101000","10101000","10101001","10101010","10101010","10101011","10101011","10101100","10101100","10101101","10101110","10101110","10101111","10101111","10110000","10110001","10110001","10110010","10110010","10110011","10110100","10110100","10110101","10110110","10110110","10110111","10111000","10111000","10111001","10111001","10111010","10111011","10111011","10111100","10111101","10111101","10111110","10111111","10111111","11000000","11000001","11000001","11000010","11000011","11000011","11000100","11000101","11000110","11000110","11000111","11001000","11001000","11001001","11001010","11001010","11001011","11001100","11001101","11001101","11001110","11001111","11001111","11010000","11010001","11010010","11010010","11010011","11010100","11010100","11010101","11010110","11010111","11010111","11011000","11011001","11011010","11011010","11011011","11011100","11011101","11011101","11011110","11011111","11100000","11100000","11100001","11100010","11100011","11100011","11100100","11100101","11100110","11100110","11100111","11101000","11101001","11101010","11101010","11101011","11101100","11101101","11101101","11101110","11101111","11110000","11110000","11110001","11110010","11110011","11110100","11110100","11110101","11110110","11110111","11110111","11111000","11111001","11111010","11111011","11111011","11111100","11111101","11111110","11111110","11111111","00000000");
constant cos_rom : Byte_Array(1023 downto 0):=("01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111101","01111101","01111101","01111101","01111101","01111101","01111101","01111100","01111100","01111100","01111100","01111100","01111100","01111011","01111011","01111011","01111011","01111011","01111010","01111010","01111010","01111010","01111010","01111001","01111001","01111001","01111001","01111000","01111000","01111000","01111000","01110111","01110111","01110111","01110110","01110110","01110110","01110110","01110101","01110101","01110101","01110100","01110100","01110100","01110011","01110011","01110011","01110010","01110010","01110010","01110001","01110001","01110001","01110000","01110000","01110000","01101111","01101111","01101111","01101110","01101110","01101101","01101101","01101101","01101100","01101100","01101011","01101011","01101010","01101010","01101010","01101001","01101001","01101000","01101000","01100111","01100111","01100110","01100110","01100110","01100101","01100101","01100100","01100100","01100011","01100011","01100010","01100010","01100001","01100001","01100000","01100000","01011111","01011111","01011110","01011110","01011101","01011101","01011100","01011011","01011011","01011010","01011010","01011001","01011001","01011000","01011000","01010111","01010110","01010110","01010101","01010101","01010100","01010100","01010011","01010010","01010010","01010001","01010001","01010000","01001111","01001111","01001110","01001110","01001101","01001100","01001100","01001011","01001010","01001010","01001001","01001000","01001000","01000111","01000111","01000110","01000101","01000101","01000100","01000011","01000011","01000010","01000001","01000001","01000000","00111111","00111111","00111110","00111101","00111101","00111100","00111011","00111010","00111010","00111001","00111000","00111000","00110111","00110110","00110110","00110101","00110100","00110011","00110011","00110010","00110001","00110001","00110000","00101111","00101110","00101110","00101101","00101100","00101100","00101011","00101010","00101001","00101001","00101000","00100111","00100110","00100110","00100101","00100100","00100011","00100011","00100010","00100001","00100000","00100000","00011111","00011110","00011101","00011101","00011100","00011011","00011010","00011010","00011001","00011000","00010111","00010110","00010110","00010101","00010100","00010011","00010011","00010010","00010001","00010000","00010000","00001111","00001110","00001101","00001100","00001100","00001011","00001010","00001001","00001001","00001000","00000111","00000110","00000101","00000101","00000100","00000011","00000010","00000010","00000001","00000000","11111111","11111110","11111110","11111101","11111100","11111011","11111011","11111010","11111001","11111000","11110111","11110111","11110110","11110101","11110100","11110100","11110011","11110010","11110001","11110000","11110000","11101111","11101110","11101101","11101101","11101100","11101011","11101010","11101010","11101001","11101000","11100111","11100110","11100110","11100101","11100100","11100011","11100011","11100010","11100001","11100000","11100000","11011111","11011110","11011101","11011101","11011100","11011011","11011010","11011010","11011001","11011000","11010111","11010111","11010110","11010101","11010100","11010100","11010011","11010010","11010010","11010001","11010000","11001111","11001111","11001110","11001101","11001101","11001100","11001011","11001010","11001010","11001001","11001000","11001000","11000111","11000110","11000110","11000101","11000100","11000011","11000011","11000010","11000001","11000001","11000000","10111111","10111111","10111110","10111101","10111101","10111100","10111011","10111011","10111010","10111001","10111001","10111000","10111000","10110111","10110110","10110110","10110101","10110100","10110100","10110011","10110010","10110010","10110001","10110001","10110000","10101111","10101111","10101110","10101110","10101101","10101100","10101100","10101011","10101011","10101010","10101010","10101001","10101000","10101000","10100111","10100111","10100110","10100110","10100101","10100101","10100100","10100011","10100011","10100010","10100010","10100001","10100001","10100000","10100000","10011111","10011111","10011110","10011110","10011101","10011101","10011100","10011100","10011011","10011011","10011010","10011010","10011010","10011001","10011001","10011000","10011000","10010111","10010111","10010110","10010110","10010110","10010101","10010101","10010100","10010100","10010011","10010011","10010011","10010010","10010010","10010001","10010001","10010001","10010000","10010000","10010000","10001111","10001111","10001111","10001110","10001110","10001110","10001101","10001101","10001101","10001100","10001100","10001100","10001011","10001011","10001011","10001010","10001010","10001010","10001010","10001001","10001001","10001001","10001000","10001000","10001000","10001000","10000111","10000111","10000111","10000111","10000110","10000110","10000110","10000110","10000110","10000101","10000101","10000101","10000101","10000101","10000100","10000100","10000100","10000100","10000100","10000100","10000011","10000011","10000011","10000011","10000011","10000011","10000011","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000001","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000010","10000011","10000011","10000011","10000011","10000011","10000011","10000011","10000100","10000100","10000100","10000100","10000100","10000100","10000101","10000101","10000101","10000101","10000101","10000110","10000110","10000110","10000110","10000110","10000111","10000111","10000111","10000111","10001000","10001000","10001000","10001000","10001001","10001001","10001001","10001010","10001010","10001010","10001010","10001011","10001011","10001011","10001100","10001100","10001100","10001101","10001101","10001101","10001110","10001110","10001110","10001111","10001111","10001111","10010000","10010000","10010000","10010001","10010001","10010001","10010010","10010010","10010011","10010011","10010011","10010100","10010100","10010101","10010101","10010110","10010110","10010110","10010111","10010111","10011000","10011000","10011001","10011001","10011010","10011010","10011010","10011011","10011011","10011100","10011100","10011101","10011101","10011110","10011110","10011111","10011111","10100000","10100000","10100001","10100001","10100010","10100010","10100011","10100011","10100100","10100101","10100101","10100110","10100110","10100111","10100111","10101000","10101000","10101001","10101010","10101010","10101011","10101011","10101100","10101100","10101101","10101110","10101110","10101111","10101111","10110000","10110001","10110001","10110010","10110010","10110011","10110100","10110100","10110101","10110110","10110110","10110111","10111000","10111000","10111001","10111001","10111010","10111011","10111011","10111100","10111101","10111101","10111110","10111111","10111111","11000000","11000001","11000001","11000010","11000011","11000011","11000100","11000101","11000110","11000110","11000111","11001000","11001000","11001001","11001010","11001010","11001011","11001100","11001101","11001101","11001110","11001111","11001111","11010000","11010001","11010010","11010010","11010011","11010100","11010100","11010101","11010110","11010111","11010111","11011000","11011001","11011010","11011010","11011011","11011100","11011101","11011101","11011110","11011111","11100000","11100000","11100001","11100010","11100011","11100011","11100100","11100101","11100110","11100110","11100111","11101000","11101001","11101010","11101010","11101011","11101100","11101101","11101101","11101110","11101111","11110000","11110000","11110001","11110010","11110011","11110100","11110100","11110101","11110110","11110111","11110111","11111000","11111001","11111010","11111011","11111011","11111100","11111101","11111110","11111110","11111111","00000000","00000001","00000010","00000010","00000011","00000100","00000101","00000101","00000110","00000111","00001000","00001001","00001001","00001010","00001011","00001100","00001100","00001101","00001110","00001111","00010000","00010000","00010001","00010010","00010011","00010011","00010100","00010101","00010110","00010110","00010111","00011000","00011001","00011010","00011010","00011011","00011100","00011101","00011101","00011110","00011111","00100000","00100000","00100001","00100010","00100011","00100011","00100100","00100101","00100110","00100110","00100111","00101000","00101001","00101001","00101010","00101011","00101100","00101100","00101101","00101110","00101110","00101111","00110000","00110001","00110001","00110010","00110011","00110011","00110100","00110101","00110110","00110110","00110111","00111000","00111000","00111001","00111010","00111010","00111011","00111100","00111101","00111101","00111110","00111111","00111111","01000000","01000001","01000001","01000010","01000011","01000011","01000100","01000101","01000101","01000110","01000111","01000111","01001000","01001000","01001001","01001010","01001010","01001011","01001100","01001100","01001101","01001110","01001110","01001111","01001111","01010000","01010001","01010001","01010010","01010010","01010011","01010100","01010100","01010101","01010101","01010110","01010110","01010111","01011000","01011000","01011001","01011001","01011010","01011010","01011011","01011011","01011100","01011101","01011101","01011110","01011110","01011111","01011111","01100000","01100000","01100001","01100001","01100010","01100010","01100011","01100011","01100100","01100100","01100101","01100101","01100110","01100110","01100110","01100111","01100111","01101000","01101000","01101001","01101001","01101010","01101010","01101010","01101011","01101011","01101100","01101100","01101101","01101101","01101101","01101110","01101110","01101111","01101111","01101111","01110000","01110000","01110000","01110001","01110001","01110001","01110010","01110010","01110010","01110011","01110011","01110011","01110100","01110100","01110100","01110101","01110101","01110101","01110110","01110110","01110110","01110110","01110111","01110111","01110111","01111000","01111000","01111000","01111000","01111001","01111001","01111001","01111001","01111010","01111010","01111010","01111010","01111010","01111011","01111011","01111011","01111011","01111011","01111100","01111100","01111100","01111100","01111100","01111100","01111101","01111101","01111101","01111101","01111101","01111101","01111101","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111110","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111","01111111");
constant RC_pos_rom : Byte_Array(1023 downto 0):=("00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000001","00000001","00000001","00000001","00000001","00000001","00000010","00000010","00000010","00000010","00000010","00000010","00000011","00000011","00000011","00000011","00000011","00000011","00000100","00000100","00000100","00000100","00000100","00000101","00000101","00000101","00000101","00000110","00000110","00000110","00000110","00000110","00000111","00000111","00000111","00000111","00001000","00001000","00001000","00001000","00001001","00001001","00001001","00001001","00001010","00001010","00001010","00001010","00001011","00001011","00001011","00001011","00001100","00001100","00001100","00001100","00001101","00001101","00001101","00001110","00001110","00001110","00001110","00001111","00001111","00001111","00010000","00010000","00010000","00010001","00010001","00010001","00010001","00010010","00010010","00010010","00010011","00010011","00010011","00010100","00010100","00010100","00010101","00010101","00010101","00010110","00010110","00010110","00010111","00010111","00010111","00011000","00011000","00011000","00011001","00011001","00011001","00011010","00011010","00011010","00011011","00011011","00011011","00011100","00011100","00011100","00011101","00011101","00011101","00011110","00011110","00011111","00011111","00011111","00100000","00100000","00100000","00100001","00100001","00100001","00100010","00100010","00100010","00100011","00100011","00100011","00100100","00100100","00100100","00100101","00100101","00100110","00100110","00100110","00100111","00100111","00100111","00101000","00101000","00101000","00101001","00101001","00101001","00101010","00101010","00101010","00101011","00101011","00101011","00101100","00101100","00101100","00101101","00101101","00101101","00101110","00101110","00101110","00101110","00101111","00101111","00101111","00110000","00110000","00110000","00110001","00110001","00110001","00110010","00110010","00110010","00110010","00110011","00110011","00110011","00110100","00110100","00110100","00110100","00110101","00110101","00110101","00110101","00110110","00110110","00110110","00110110","00110111","00110111","00110111","00110111","00111000","00111000","00111000","00111000","00111000","00111001","00111001","00111001","00111001","00111010","00111010","00111010","00111010","00111010","00111011","00111011","00111011","00111011","00111011","00111011","00111100","00111100","00111100","00111100","00111100","00111100","00111100","00111101","00111101","00111101","00111101","00111101","00111101","00111101","00111101","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111111","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111110","00111101","00111101","00111101","00111101","00111101","00111101","00111101","00111101","00111100","00111100","00111100","00111100","00111100","00111100","00111100","00111011","00111011","00111011","00111011","00111011","00111011","00111010","00111010","00111010","00111010","00111010","00111001","00111001","00111001","00111001","00111000","00111000","00111000","00111000","00111000","00110111","00110111","00110111","00110111","00110110","00110110","00110110","00110110","00110101","00110101","00110101","00110101","00110100","00110100","00110100","00110100","00110011","00110011","00110011","00110010","00110010","00110010","00110010","00110001","00110001","00110001","00110000","00110000","00110000","00101111","00101111","00101111","00101110","00101110","00101110","00101110","00101101","00101101","00101101","00101100","00101100","00101100","00101011","00101011","00101011","00101010","00101010","00101010","00101001","00101001","00101001","00101000","00101000","00101000","00100111","00100111","00100111","00100110","00100110","00100110","00100101","00100101","00100100","00100100","00100100","00100011","00100011","00100011","00100010","00100010","00100010","00100001","00100001","00100001","00100000","00100000","00100000","00011111","00011111","00011111","00011110","00011110","00011101","00011101","00011101","00011100","00011100","00011100","00011011","00011011","00011011","00011010","00011010","00011010","00011001","00011001","00011001","00011000","00011000","00011000","00010111","00010111","00010111","00010110","00010110","00010110","00010101","00010101","00010101","00010100","00010100","00010100","00010011","00010011","00010011","00010010","00010010","00010010","00010001","00010001","00010001","00010001","00010000","00010000","00010000","00001111","00001111","00001111","00001110","00001110","00001110","00001110","00001101","00001101","00001101","00001100","00001100","00001100","00001100","00001011","00001011","00001011","00001011","00001010","00001010","00001010","00001010","00001001","00001001","00001001","00001001","00001000","00001000","00001000","00001000","00000111","00000111","00000111","00000111","00000110","00000110","00000110","00000110","00000110","00000101","00000101","00000101","00000101","00000100","00000100","00000100","00000100","00000100","00000011","00000011","00000011","00000011","00000011","00000011","00000010","00000010","00000010","00000010","00000010","00000010","00000001","00000001","00000001","00000001","00000001","00000001","00000000","00000000","00000000","00000000","00000000","00000000","00000000","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111100","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111101","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111110","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","11111111","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000");
constant RC_neg_rom : Byte_Array(1023 downto 0): = ("00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000000","00000000","00000000","00000000","00000000","00000000","00000000","11111111","11111111","11111111","11111111","11111111","11111111","11111110","11111110","11111110","11111110","11111110","11111110","11111101","11111101","11111101","11111101","11111101","11111101","11111100","11111100","11111100","11111100","11111100","11111011","11111011","11111011","11111011","11111010","11111010","11111010","11111010","11111010","11111001","11111001","11111001","11111001","11111000","11111000","11111000","11111000","11110111","11110111","11110111","11110111","11110110","11110110","11110110","11110110","11110101","11110101","11110101","11110101","11110100","11110100","11110100","11110100","11110011","11110011","11110011","11110010","11110010","11110010","11110010","11110001","11110001","11110001","11110000","11110000","11110000","11101111","11101111","11101111","11101111","11101110","11101110","11101110","11101101","11101101","11101101","11101100","11101100","11101100","11101011","11101011","11101011","11101010","11101010","11101010","11101001","11101001","11101001","11101000","11101000","11101000","11100111","11100111","11100111","11100110","11100110","11100110","11100101","11100101","11100101","11100100","11100100","11100100","11100011","11100011","11100011","11100010","11100010","11100001","11100001","11100001","11100000","11100000","11100000","11011111","11011111","11011111","11011110","11011110","11011110","11011101","11011101","11011101","11011100","11011100","11011100","11011011","11011011","11011010","11011010","11011010","11011001","11011001","11011001","11011000","11011000","11011000","11010111","11010111","11010111","11010110","11010110","11010110","11010101","11010101","11010101","11010100","11010100","11010100","11010011","11010011","11010011","11010010","11010010","11010010","11010010","11010001","11010001","11010001","11010000","11010000","11010000","11001111","11001111","11001111","11001110","11001110","11001110","11001110","11001101","11001101","11001101","11001100","11001100","11001100","11001100","11001011","11001011","11001011","11001011","11001010","11001010","11001010","11001010","11001001","11001001","11001001","11001001","11001000","11001000","11001000","11001000","11001000","11000111","11000111","11000111","11000111","11000110","11000110","11000110","11000110","11000110","11000101","11000101","11000101","11000101","11000101","11000101","11000100","11000100","11000100","11000100","11000100","11000100","11000100","11000011","11000011","11000011","11000011","11000011","11000011","11000011","11000011","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000001","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000010","11000011","11000011","11000011","11000011","11000011","11000011","11000011","11000011","11000100","11000100","11000100","11000100","11000100","11000100","11000100","11000101","11000101","11000101","11000101","11000101","11000101","11000110","11000110","11000110","11000110","11000110","11000111","11000111","11000111","11000111","11001000","11001000","11001000","11001000","11001000","11001001","11001001","11001001","11001001","11001010","11001010","11001010","11001010","11001011","11001011","11001011","11001011","11001100","11001100","11001100","11001100","11001101","11001101","11001101","11001110","11001110","11001110","11001110","11001111","11001111","11001111","11010000","11010000","11010000","11010001","11010001","11010001","11010010","11010010","11010010","11010010","11010011","11010011","11010011","11010100","11010100","11010100","11010101","11010101","11010101","11010110","11010110","11010110","11010111","11010111","11010111","11011000","11011000","11011000","11011001","11011001","11011001","11011010","11011010","11011010","11011011","11011011","11011100","11011100","11011100","11011101","11011101","11011101","11011110","11011110","11011110","11011111","11011111","11011111","11100000","11100000","11100000","11100001","11100001","11100001","11100010","11100010","11100011","11100011","11100011","11100100","11100100","11100100","11100101","11100101","11100101","11100110","11100110","11100110","11100111","11100111","11100111","11101000","11101000","11101000","11101001","11101001","11101001","11101010","11101010","11101010","11101011","11101011","11101011","11101100","11101100","11101100","11101101","11101101","11101101","11101110","11101110","11101110","11101111","11101111","11101111","11101111","11110000","11110000","11110000","11110001","11110001","11110001","11110010","11110010","11110010","11110010","11110011","11110011","11110011","11110100","11110100","11110100","11110100","11110101","11110101","11110101","11110101","11110110","11110110","11110110","11110110","11110111","11110111","11110111","11110111","11111000","11111000","11111000","11111000","11111001","11111001","11111001","11111001","11111010","11111010","11111010","11111010","11111010","11111011","11111011","11111011","11111011","11111100","11111100","11111100","11111100","11111100","11111101","11111101","11111101","11111101","11111101","11111101","11111110","11111110","11111110","11111110","11111110","11111110","11111111","11111111","11111111","11111111","11111111","11111111","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000100","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000011","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000010","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000001","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000","00000000");
---------------- Signals -------------------------------
signal i,j : std_logic_vector(9 downto 0):="0000000000";
signal j_clk : std_logic;
signal tx_up : std_logic_vector(7 downto 0);
signal tx_dw : std_logic_vector(7 downto 0);
signal RC_up : std_logic_vector(7 downto 0);
signal RC_up_1 : std_logic_vector(7 downto 0);
signal RC_up_2 : std_logic_vector(7 downto 0);
signal RC_up_3 : std_logic_vector(7 downto 0);
signal RC_up_4 : std_logic_vector(7 downto 0);
signal RC_dw : std_logic_vector(7 downto 0);
signal RC_dw_1 : std_logic_vector(7 downto 0);
signal RC_dw_2 : std_logic_vector(7 downto 0);
signal RC_dw_3 : std_logic_vector(7 downto 0);
signal RC_dw_4 : std_logic_vector(7 downto 0);
signal Data : std_logic_vector(7 downto 0);
constant Data_str : Byte_Array(7 downto 0):=(x"00",x"11",x"33",x"55",x"00",x"AA",x"DD",x"FF");
signal Up_Data : std_logic_vector(3 downto 0);
signal Dw_Data : std_logic_vector(3 downto 0);
signal indx : std_logic_vector(1 downto 0):="00";
signal index : std_logic_vector(2 downto 0):="000";
signal indx_clk : std_logic;
signal index_clk : std_logic;
signal sin : std_logic_vector(7 downto 0);
signal cos : std_logic_vector(7 downto 0);
begin
Upper_Multiplier: Multiplier port map(a => RC_up, b => cos, d => tx_up);
Lower_Multiplier: Multiplier port map(a => RC_dw, b => sin, d => tx_dw);
process(clk,reset)
begin
if reset = '1' then
i <= "0000000000";
elsif clk'event and clk='0' then
i <= i + 1;
elsif clk'event and clk='1' then
Tx_out <= tx_up + tx_dw+128;
end if;
end process;
j_clk <= i(5);
process(j_clk,reset)
begin
if reset = '1' then
j <= "0000000000";
elsif j_clk'event and j_clk='0' then
j <= j + 1;
end if;
end process;
indx_clk <= j(7);
process(indx_clk,reset)
begin
if reset = '1' then
indx <= "00";
elsif indx_clk'event and indx_clk='0' then
indx <= indx + 1;
if indx = "00" then
up_data(0) <= data(0);
dw_data(0) <= data(1);
elsif indx = "01" then
up_data(1) <= data(2);
dw_data(1) <= data(3);
elsif indx = "10" then
up_data(2) <= data(4);
dw_data(2) <= data(5);
elsif indx = "11" then
up_data(3) <= data(6);
dw_data(3) <= data(7);
end if;
end if;
end process;
index_clk <= indx(1);
process(index_clk,reset)
begin
if reset = '1' then
index <= "000";
elsif index_clk'event and index_clk='0' then
index <= index + 1;
end if;
end process;
data <= data_str(conv_integer(index));
sin <= sin_rom(conv_integer(i));
cos <= cos_rom(conv_integer(i));
RC_up <= RC_up_1 + RC_up_2 + RC_up_3 + RC_up_4;
RC_dw <= RC_dw_1 + RC_dw_2 + RC_dw_3 + RC_dw_4;
RC_up_1 <= RC_pos_rom(conv_integer(j)) when up_data(0)='1' else RC_neg_rom(conv_integer(j)) when up_data(0)='0' else "ZZZZZZZZ";
RC_up_2 <= RC_pos_rom(conv_integer(j+256)) when up_data(1)='1' else RC_neg_rom(conv_integer(j+256)) when up_data(1)='0' else "ZZZZZZZZ";
RC_up_3 <= RC_pos_rom(conv_integer(j+512)) when up_data(2)='1' else RC_neg_rom(conv_integer(j+512)) when up_data(2)='0' else "ZZZZZZZZ";
RC_up_4 <= RC_pos_rom(conv_integer(j+768)) when up_data(3)='1' else RC_neg_rom(conv_integer(j+768)) when up_data(3)='0' else "ZZZZZZZZ";
RC_dw_1 <= RC_pos_rom(conv_integer(j)) when dw_data(0)='1' else RC_neg_rom(conv_integer(j)) when dw_data(0)='0' else "ZZZZZZZZ";
RC_dw_2 <= RC_pos_rom(conv_integer(j+256)) when dw_data(1)='1' else RC_neg_rom(conv_integer(j+256)) when dw_data(1)='0' else "ZZZZZZZZ";
RC_dw_3 <= RC_pos_rom(conv_integer(j+512)) when dw_data(2)='1' else RC_neg_rom(conv_integer(j+512)) when dw_data(2)='0' else "ZZZZZZZZ";
RC_dw_4 <= RC_pos_rom(conv_integer(j+768)) when dw_data(3)='1' else RC_neg_rom(conv_integer(j+768)) when dw_data(3)='0' else "ZZZZZZZZ";
end main_flow;
Appendix B: Upper Multiplier
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_unsigned.ALL;
entity Multiplier is
Port ( A,B : in STD_LOGIC_VECTOR (7 downto 0);
D : out STD_LOGIC_VECTOR (7 downto 0));
end Multiplier;
architecture Logic_Flow of Multiplier is
signal A_mag : STD_LOGIC_VECTOR (7 downto 0);
signal B_mag : STD_LOGIC_VECTOR (7 downto 0);
signal sign : STD_LOGIC;
signal D0,D1,D2,D3,D4,D5,D6,D7,Dtot,Dtotn : STD_LOGIC_VECTOR(15 downto 0):=x"0000";
--signal Dpos,Dneg : STD_LOGIC_VECTOR(7 downto 0);
begin
A_mag <= '0' & A(6 downto 0) when A(7)= '0' else not A + 1;
B_mag <= '0' & B(6 downto 0) when B(7)= '0' else not B + 1;
sign <= A(7) xor B(7);
D0(7 downto 0) <= A_mag when B_mag(0)='1' else x"00";
D1(8 downto 1) <= A_mag when B_mag(1)='1' else x"00";
D2(9 downto 2) <= A_mag when B_mag(2)='1' else x"00";
D3(10 downto 3) <= A_mag when B_mag(3)='1' else x"00";
D4(11 downto 4) <= A_mag when B_mag(4)='1' else x"00";
D5(12 downto 5) <= A_mag when B_mag(5)='1' else x"00";
D6(13 downto 6) <= A_mag when B_mag(6)='1' else x"00";
D7(14 downto 7) <= A_mag when B_mag(7)='1' else x"00";
Dtot <= D0 + D1 + D2 + D3 + D4 + D5 + D6 + D7;
Dtotn <= not Dtot +1;
D <= x"00" when A=x"00" or B=x"00" else '0' & Dtot(14 downto 8) when sign='0' else '1' & Dtotn(14 downto 8);
--Dpos <= '0' & Dtot(14 downto 8);
--Dneg <= not Dpos + 1;
--D <= Dpos when sign = '0' else Dneg;
end Logic_Flow;
Appendix C: Lower Multiplier
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_unsigned.ALL;
entity Multiplier is
Port ( A,B : in STD_LOGIC_VECTOR (7 downto 0);
D : out STD_LOGIC_VECTOR (7 downto 0));
end Multiplier;
architecture Logic_Flow of Multiplier is
signal A_mag : STD_LOGIC_VECTOR (7 downto 0);
signal B_mag : STD_LOGIC_VECTOR (7 downto 0);
signal sign : STD_LOGIC;
signal D0,D1,D2,D3,D4,D5,D6,D7,Dtot,Dtotn : STD_LOGIC_VECTOR(15 downto 0):=x"0000";
--signal Dpos,Dneg : STD_LOGIC_VECTOR(7 downto 0);
begin
A_mag <= '0' & A(6 downto 0) when A(7)= '0' else not A + 1;
B_mag <= '0' & B(6 downto 0) when B(7)= '0' else not B + 1;
sign <= A(7) xor B(7);
D0(7 downto 0) <= A_mag when B_mag(0)='1' else x"00";
D1(8 downto 1) <= A_mag when B_mag(1)='1' else x"00";
D2(9 downto 2) <= A_mag when B_mag(2)='1' else x"00";
D3(10 downto 3) <= A_mag when B_mag(3)='1' else x"00";
D4(11 downto 4) <= A_mag when B_mag(4)='1' else x"00";
D5(12 downto 5) <= A_mag when B_mag(5)='1' else x"00";
D6(13 downto 6) <= A_mag when B_mag(6)='1' else x"00";
D7(14 downto 7) <= A_mag when B_mag(7)='1' else x"00";
Dtot <= D0 + D1 + D2 + D3 + D4 + D5 + D6 + D7;
Dtotn <= not Dtot +1;
D <= x"00" when A=x"00" or B=x"00" else '0' & Dtot(14 downto 8) when sign='0' else '1' & Dtotn(14 downto 8);
--Dpos <= '0' & Dtot(14 downto 8);
--Dneg <= not Dpos + 1;
--D <= Dpos when sign = '0' else Dneg;
end Logic_Flow;
Baran BOZKURT, Aydın Kaan DURUKAN & Muhammed Cevat ÇAKICI

Comments
Please log in or sign up to comment.