Академический Документы
Профессиональный Документы
Культура Документы
This is to certify that Mr. ______________________ Roll No ___________ student of Bachelor Of Engineering (Electronics and Communication Branch semester VIII) has satisfactorily completed the course in DIGITAL SYSTEMS DESIGN within the four walls of L.J Institute of Engineering &Technology Ahmedabad. Date of submission :______________ Staff in-charge :______________ Head of Department:______________
DATE:
/ / Page 1
INDEX
Sr. NAME OF THE No EXPERIMENT 1. VHDL basics and Xilinx ISE tool study DATE PAGE NO. SIGN REMARKS
2.
Design sequential Circuits using VHDL: FLIP FLOPS: RS and D Design sequential Circuits using VHDL: FLIP FLOPS: JK and T Design sequential Circuits using VHDL: 4-bit Asynchronous & synchronous up & down counter
3.
4.
Design Sequence Detector using VHDL 6. Design 4-bit Multiplier using VHDL 7. Design RAM module using VHDL Frequency 8. Design Divider using VHDL 9. Design 8-bit ALU using VHDL 10. Design 8-bit FIR Filter using VHDL
5.
DATE:
/ / Page 2
EXPERIMENT 1
L.J. Institute of Engineering & Technology DATE: / / Page 3
Getting Started
To start ISE, double-click the desktop icon,
Accessing Help
At any time during the tutorial, you can access online help for additional information about the ISE software and related tools. To open Help, do either of the following:
Press F1 to view Help for the specific tool or function that you have selected or highlighted. Launch the ISE Help Contents from the Help menu. It contains information about creating and maintaining your complete design flow in ISE.
1. Select File > New Project... The New Project Wizard appears. 2. Type tutorial in the Project Name field. 3. Enter or browse to a location (directory path) for the new project. A tutorial subdirectory is
created automatically.
4. Verify that HDL is selected from the Top-Level Source Type list. 5. Click Next to move to the device properties page. 6. Fill in the properties in the table as shown below: Product Category: All Family: Spartan3 Device: XC2s50 Package: pq208 Speed Grade: -5 Top-Level Source Type: HDL Synthesis Tool: XST (VHDL/Verilog) Simulator: ISE Simulator (VHDL/Verilog) Preferred Language: Verilog (or VHDL) Verify that Enable Enhanced Design Summary is selected. Leave the
default values in the remaining fields. When the table is complete, your project properties will look like the following:
DATE:
/ / Page 4
7.
Click Next to proceed to the Create New Source window in the New Project Wizard. At the end of the next section, your new project will be complete.
1. 2. 3. 4. 5. 6.
Click the New Source button in the New Project Wizard. Select VHDL Module as the source type. Type in the file name counter. Verify that the Add to project checkbox is selected. Click Next. Declare the ports for the counter design by filling in the port information as shown below:
DATE:
/ / Page 5
7. Click Next, then Finish in the New Source Wizard - Summary dialog box to complete the new
source file template.
DATE:
/ / Page 6
DATE:
/ / Page 7
DATE:
/ / Page 8
Design Simulation
Verifying Functionality using Behavioral Simulation
Create a test bench waveform containing input stimulus you can use to verify the functionality of the counter module. The test bench waveform is a graphical view of a test bench. Create the test bench waveform as follows:
1. Select the counter HDL file in the Sources window. 2. Create a new test bench source by selecting Project New Source. 3. In the New Source Wizard, select Test Bench WaveForm as the source type, and type
counter_tbw in the File Name field.
4. Click Next. 5. The Associated Source page shows that you are associating the test bench waveform with the
source file counter. Click Next.
6. The Summary page shows that the source will be added to the project, and it displays the
source directory, type, and name. Click Finish.
7. You need to set the clock frequency, setup time and output delay times in the Initialize Timing
dialog box before the test bench waveform editing window opens. The requirements for this design are the following:
The counter must operate correctly with an input clock frequency = 25 MHz. The DIRECTION input will be valid 10 ns before the rising edge of CLOCK. The output (COUNT_OUT) must be valid 10 ns after the rising edge of CLOCK. The
design requirements correspond with the values below. Fill in the fields in the Initialize Timing dialog box with the following information:
Clock High Time: 20 ns. Clock Low Time: 20 ns. Input Setup Time: 10 ns. L.J. Institute of Engineering & Technology DATE: / / Page 9
Output Valid Delay: 10 ns. Offset: 0 ns. Global Signals: GSR (FPGA)
Note: When GSR(FPGA) is enabled, 100 ns. is added to the Offset value automatically. Initial Length of Test Bench: 1500 ns
8. 9.
The blue shaded areas that precede the rising edge of the CLOCK correspond to the Input Setup Time in the Initialize Timing dialog box. Toggle the DIRECTION port to define the input stimulus for the counter design as follows:
Click on the blue cell at approximately the 300 ns to assert DIRECTION high so that the
counter will count up.
DATE: / / Page 10
Click on the blue cell at approximately the 900 ns to assert DIRECTION low so that the
counter will count down.
Note: You can ignore any rows that start with TX. 4. Verify that the counter is counting up and down as expected. 5. Close the simulation view. If you are prompted with the following message, You have an active simulation open. Are you sure you want to close it?, click Yes to continue. You have now completed simulation of your design using the ISE Simulator.
DATE: / / Page 11
DATE: / / Page 12
Figure 11: Prompt to Add UCF File to Project 4. Click Yes to add the UCF file to your project. The counter.ucf file is added to your project and is visible in the Sources window. The Xilinx Constraints Editor opens automatically. Note: You can also create a UCF file for your project by selecting Project Create New
Source.
5. In the Timing Constraints dialog, enter the following in the Period, Pad to Setup, and CLock to Pad fields: Period: BLANK Pade to Setup: BLANK Clock to Pad: BLANK 6. Press Enter 7. Save the timing constraints. If you are prompted to rerun the TRANSLATE or XST step, click OK to continue. 8. Close the Constraints Editor.
DATE: / / Page 13
5. Locate the Performance Summary table near the bottom of the Design Summary. 6. Click the All Constraints Met link in the Timing Constraints field to view the Timing Constraints report. Verify that the design meets the specified timing requirements.
DATE: / / Page 14
DATE: / / Page 15
1. Verify that counter is selected in the Sources window. 2. Double-click the Floorplan Area/IO/Logic - Post Synthesis process found in the User Constraints process group. The Xilinx Pinout and Area Constraints Editor (PACE) opens. 3. Select the Package View tab. 4. In the Design Object List window, enter a pin location for each pin in the Loc column using the following information: CLOCK input port connects to FPGA pin P80 (GCK0 signal on board) COUNT_OUT<0> output port connects to FPGA pin P30 (LD0 signal on board) COUNT_OUT<1> output port connects to FPGA pin P31 (LD1 signal on board) COUNT_OUT<2> output port connects to FPGA pin P44 (LD2 signal on board) COUNT_OUT<3> output port connects to FPGA pin P45 (LD3 signal on board) DIRECTION input port connects to FPGA pin P3 (SW signal on board)
DATE: / / Page 16
5. Select File Save. You are prompted to select the bus delimiter type based on the synthesis tool you are using. Select XST Default <> and click OK. 6. Close PACE. Notice that the Implement Design processes have an orange question mark next to them, indicating they are out-of-date with one or more of the design files. This is because the UCF file has been modified.
DATE: / / Page 17
3. Re implement the design by double-clicking the Implement Design process. 4. Select the Pinout Report again and select the Signal Name column header to sort the signal names. 5. Verify that signals are now being routed to the correct package pins.
DATE: / / Page 18
7.
DATE: / / Page 19
DATE: / / Page 20
7. In the Welcome dialog box, select Configure devices using BoundaryScan OR configure device & select using slave serial mode. 8. Verify that Automatically connect to a cable. 9. Click Finish. 10. one window generate ,select counter.bit file 11. The Assign New Configuration File dialog box appears. To assign a configuration file to the xc2s50 device in the JTAG chain, select the counter.bit file and click Open. 12. If you get a Warning message, click OK. 13. Select Bypass to skip any remaining devices. 14. Right-click on the xc3s200 device image, and select Program... The Programming Properties dialog box opens.
15. Click OK to program the device. When programming is complete, the Program Succeeded message is displayed. On the board, LEDs 0, 1, 2, and 3 are lit, indicating that the counter is running. 16. Close iMPACT without saving. .
EXPERIMENT 2 AIM: Design sequential Circuits using VHDL: FLIP FLOPS: RS and D
D Flip flop
DATE: / / Page 21
VHDL CODE
library ieee ; use ieee.std_logic_1164.all; use work.all; --------------------------------------------entity dff is port( data_in: in std_logic; clock: in std_logic; data_out: out std_logic ); end dff; ---------------------------------------------architecture behv of dff is begin process(data_in, clock) begin -- clock rising edge if (clock='1' and clock'event) then data_out <= data_in; end if; end process; L.J. Institute of Engineering & Technology DATE: / / Page 22
end behv;
Simulation :
SR FLIP-FLOP
DATE: / / Page 23
VHDL Code
library ieee; use ieee.std_logic_1164.all; entity sr_ff is port(s,r,clk,rst : in std_logic; q,qbar : out std_logic); end sr_ff; architecture srff of sr_ff is begin process(clk) begin if(clk'event and clk='1') then if(rst='1') then q<='0'; qbar<='1'; elsif(rst='0' and s='0' and r='0')then q<='0'; qbar<='1'; elsif(s='0' and r='1')then q<='0'; qbar<='1'; elsif(s='1' and r='0')then q<='1';
L.J. Institute of Engineering & Technology DATE: / / Page 24
DATE: / / Page 25
EXPERIMENT 3 AIM: Design sequential Circuits using VHDL FLIP FLOPS JK and T T FLIP FLOP:
VHDL Code:
library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity T_FF_VHDL is port( T: in std_logic; Reset: in std_logic; Clock_enable: in std_logic; Clock: in std_logic; Output: out std_logic); end T_FF_VHDL; architecture Behavioral of T_FF_VHDL is signal temp: std_logic; begin process (Clock) begin if Clock'event and Clock='1' then if Reset='1' then temp <= '0'; elsif Clock_enable ='1' then if T='0' then
L.J. Institute of Engineering & Technology DATE: / / Page 26
temp <= temp; elsif T='1' then temp <= not (temp); end if; end if; end if; end process; Output <= temp; end Behavioral;
Simulation:
DATE: / / Page 27
J K FLIP FLOP
VHDL Code:
library ieee; use ieee.std_logic_1164.all; ---------------------------------------------entity JK_FF is port ( clock: J, K: reset: Q, Qbar: ); end JK_FF; in std_logic; in std_logic; in std_logic; out std_logic
----------------------------------------------architecture behv of JK_FF is -- define the useful signals here signal state: std_logic; signal input: std_logic_vector(1 downto 0); begin -- combine inputs into vector input <= J & K; p: process(clock, reset) is begin
L.J. Institute of Engineering & Technology DATE: / / Page 28
if (reset='1') then state <= '0'; elsif (rising_edge(clock)) then -- compare to the truth table case (input) is when "11" => state <= not state; when "10" => state <= '1'; when "01" => state <= '0'; when others => null; end case; end if; end process; -- concurrent statements Q <= state; Qbar <= not state; end behv;
Simulation:
DATE: / / Page 29
EXPERIMENT 4
AIM : Design Asynchronous And Synchronous Up And Down Counter In One Module & Verify on Board. Block Diagram: 1: top module
2: sub module
DATE: / / Page 30
VHDL Code:
----------------------------------------------------------------------------------
-- Project Name: Synchronous And Asynchronous Counter. -- Target Devices: Spartan2 XC2s50 -- Tool versions: Xilinx 10.1 ---------------------------------------------------------------------------------library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity sync_async is Port ( clk : in STD_LOGIC; rst : in STD_LOGIC;
L.J. Institute of Engineering & Technology DATE: / / Page 31
dir : in STD_LOGIC; seg_0 : out STD_LOGIC_VECTOR (6 downto 0); seg_1 : out STD_LOGIC_VECTOR (6 downto 0)); end sync_async; architecture Behavioral of sync_async is signal sync_count :std_logic_vector(29 downto 0):="000000000000000000000000000000"; signal async_count : std_logic_vector(29 downto 0):="00000000000000000000000000000"; begin process (clk) begin if clk = '1' and clk'event then if rst = '0' then sync_count<="000000000000000000000000000000"; elsif dir= '1' then sync_count <= sync_count + 1; else sync_count <= sync_count - 1; end if; end if; end process; process (rst,clk) begin if rst = '0' then async_count<="000000000000000000000000000000"; elsif clk = '1' and clk'event then if dir= '1' then async_count <= async_count + 1; else async_count <= async_count - 1; end if; end if; end process; process(sync_count,async_count) begin case sync_count(29 downto 26) is when "0000"=>seg_0<="0111111";
L.J. Institute of Engineering & Technology DATE: / / Page 32
when "0001"=>seg_0<="0000110"; when "0010"=>seg_0<="1011011"; when "0011"=>seg_0<="1001111"; when "0100"=>seg_0<="1100110"; when "0101"=>seg_0<="1101101"; when "0110"=>seg_0<="1111101"; when "0111"=>seg_0<="0000111"; when "1000"=>seg_0<="1111111"; when "1001"=>seg_0<="1101111"; when "1010"=>seg_0<="1110111"; when "1011"=>seg_0<="1111100"; when "1100"=>seg_0<="0111001"; when "1101"=>seg_0<="1011110"; when "1110"=>seg_0<="1111001"; when others=> seg_0<="1110001"; end case; case async_count(29 downto 26) is when "0000"=>seg_1<="0111111"; when "0001"=>seg_1<="0000110"; when "0010"=>seg_1<="1011011"; when "0011"=>seg_1<="1001111"; when "0100"=>seg_1<="1100110"; when "0101"=>seg_1<="1101101"; when "0110"=>seg_1<="1111101"; when "0111"=>seg_1<="0000111"; when "1000"=>seg_1<="1111111"; when "1001"=>seg_1<="1101111"; when "1010"=>seg_1<="1110111"; when "1011"=>seg_1<="1111100"; when "1100"=>seg_1<="0111001"; when "1101"=>seg_1<="1011110"; when "1110"=>seg_1<="1111001"; when others=>seg_1<="1110001"; end case; end process;
end Behavioral;
DATE: / / Page 33
Simulation:
EXPERIMENT 5
AIM : Design Sequence Detector using VHDL Block Diagram: 1: top module
DATE: / / Page 34
2: sub module
VHDL Code:
----------------------------------------------------------------------------------
-- Project Name: Sequence detecter -- Target Devices: Spartan2 XC2s50 -- Tool versions: XILINX 8.0 ---------------------------------------------------------------------------------library IEEE;
L.J. Institute of Engineering & Technology DATE: / / Page 35
use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity seq_det is Port ( a0 : in STD_LOGIC; a1 : in STD_LOGIC; a2 : in STD_LOGIC; a3 : in STD_LOGIC; a4 : in STD_LOGIC; a5 : in STD_LOGIC; a6 : in STD_LOGIC; a7 : in STD_LOGIC; z: out STD_LOGIC); end seq_det; architecture Behavioral of seq_det is signal s0,s1,s2,s3,s4,s5,s6,s7 :std_logic; begin s0<=a0 and a1 and a2; s 1<=a1 and a2 and a3; s2<=a2 and a3 and a4; s3<=a3 and a4 and a5; s4<=a4 and a5 and a6; s5<=a5 and a6 and a7; s6<=a6 and a7 and a0; s7<=a7 and a0 and a1; z<=s0 or s1 or s2 or s3 or s4 or s5 or s6 or s7; end Behavioral;
Simulation:
DATE: / / Page 36
EXPERIMENT 6
DATE: / / Page 37
AIM : Design 4 bit multiplier & show output on 2 seven segment display in hex value. Block Diagram: 1: top module
2: sub module
VHDL Code:
---------------------------------------------------------------------------------L.J. Institute of Engineering & Technology DATE: / / Page 38
-- Project Name: 4-Bit Multiplier -- Target Devices: Spartan 2 XC2s50 -- Tool versions: Xilinx 8.0 ---------------------------------------------------------------------------------library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity multi_4 is Port ( a : in STD_LOGIC_VECTOR (3 downto 0); b : in STD_LOGIC_VECTOR (3 downto 0); c : out STD_LOGIC_VECTOR (7 downto 0); seg_0 : out STD_LOGIC_VECTOR (6 downto 0); seg_1 : out STD_LOGIC_VECTOR (6 downto 0); seg_2 : out STD_LOGIC_VECTOR (6 downto 0); seg_3 : out STD_LOGIC_VECTOR (6 downto 0)); end multi_4; architecture Behavioral of multi_4 is signal temp_c:std_logic_vector(7 downto 0) := "00000000"; begin process(a,b) begin temp_c <= a * b ; end process; c<= temp_c;
process(a,b,temp_c)
L.J. Institute of Engineering & Technology DATE: / / Page 39
begin case a is when "0000" => seg_0 <= "1111110"; when "0001" => seg_0 <= "0110000"; when "0010" => seg_0 <= "1101101"; when "0011" => seg_0 <= "1111001"; when "0100" => seg_0 <= "0110011"; when "0101" => seg_0 <= "1011011"; when "0110" => seg_0 <= "1011111"; when "0111" => seg_0 <= "1110000"; when "1000" => seg_0 <= "1111111"; when "1001" => seg_0 <= "1111011"; when "1010" => seg_0 <= "1111101"; when "1011" => seg_0 <= "0011111"; when "1100" => seg_0 <= "1001110"; when "1101" => seg_0 <= "0111101"; when "1110" => seg_0 <= "1001111"; when others => seg_0 <= "1000111"; end case; case b is when "0000" => seg_1 <= "1111110"; when "0001" => seg_1 <= "0110000"; when "0010" => seg_1 <= "1101101"; when "0011" => seg_1 <= "1111001"; when "0100" => seg_1 <= "0110011"; when "0101" => seg_1 <= "1011011"; when "0110" => seg_1 <= "1011111"; when "0111" => seg_1 <= "1110000"; when "1000" => seg_1 <= "1111111"; when "1001" => seg_1 <= "1111011"; when "1010" => seg_1 <= "1111101"; when "1011" => seg_1 <= "0011111"; when "1100" => seg_1 <= "1001110"; when "1101" => seg_1 <= "0111101"; when "1110" => seg_1 <= "1001111"; when others => seg_1 <= "1000111"; end case; case temp_c(7 downto 4) is when "0000" => seg_2 <= "1111110";
L.J. Institute of Engineering & Technology DATE: / / Page 40
when "0001" => seg_2 <= "0110000"; when "0010" => seg_2 <= "1101101"; when "0011" => seg_2 <= "1111001"; when "0100" => seg_2 <= "0110011"; when "0101" => seg_2 <= "1011011"; when "0110" => seg_2 <= "1011111"; when "0111" => seg_2 <= "1110000"; when "1000" => seg_2 <= "1111111"; when "1001" => seg_2 <= "1111011"; when "1010" => seg_2 <= "1111101"; when "1011" => seg_2 <= "0011111"; when "1100" => seg_2 <= "1001110"; when "1101" => seg_2 <= "0111101"; when "1110" => seg_2 <= "1001111"; when others => seg_2 <= "1000111"; end case; case temp_c(3 downto 0) is when "0000" => seg_3 <= "1111110"; when "0001" => seg_3 <= "0110000"; when "0010" => seg_3 <= "1101101"; when "0011" => seg_3 <= "1111001"; when "0100" => seg_3 <= "0110011"; when "0101" => seg_3 <= "1011011"; when "0110" => seg_3 <= "1011111"; when "0111" => seg_3 <= "1110000"; when "1000" => seg_3 <= "1111111"; when "1001" => seg_3 <= "1111011"; when "1010" => seg_3 <= "1111101"; when "1011" => seg_3 <= "0011111"; when "1100" => seg_3 <= "1001110"; when "1101" => seg_3 <= "0111101"; when "1110" => seg_3 <= "1001111"; when others => seg_3 <= "1000111"; end case; end process; end Behavioral;
DATE: / / Page 41
Simulation:
DATE: / / Page 42
EXPERIMENT 7
AIM : Design RAM module using VHDL Block Diagram: 1: top module
2: sub module
DATE: / / Page 43
VHDL Code:
----------------------------------------------------------------------------------
-- Project Name: Dual Port RAM -- Target Devices: Spartan2 XC2s50 -- Tool versions: Xilinx 8.0 ---------------------------------------------------------------------------------library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity dual_ram is Port ( clk : in STD_LOGIC; we : in STD_LOGIC; a : in STD_LOGIC_VECTOR (3 downto 0); dpra : in STD_LOGIC_VECTOR (3 downto 0); di : in STD_LOGIC_VECTOR (3 downto 0); spo : out STD_LOGIC_VECTOR (3 downto 0); dpo : out STD_LOGIC_VECTOR (3 downto 0)); end dual_ram; architecture Behavioral of dual_ram is type ram_type is array (15 downto 0) of std_logic_vector (3 downto 0); signal RAM : ram_type; signal read_a : std_logic_vector(3 downto 0); signal read_dpra : std_logic_vector(3 downto 0); begin process (clk) begin if (clk'event and clk = '1') then if (we = '1') then RAM(conv_integer(a)) <= di;
L.J. Institute of Engineering & Technology DATE: / / Page 44
end if; read_a <= a; read_dpra <= dpra; end if; end process; spo <= RAM(conv_integer(read_a)); dpo <= RAM(conv_integer(read_dpra)); end Behavioral;
Simulation:
DATE: / / Page 45
end Behavioral;
Simulation:
DATE: / / Page 47
Experiment 9 AIM: Design an 8 bit ALU which includes the following features:
ADD,SUB,AND,OR,NOT,XOR,SAL,SAR,SHL,SHR,ROL,ROR,RCL, RCR, CMP
VHDL Code:
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity ALU is port( A: in std_logic_vector(1 downto 0); B: in std_logic_vector(1 downto 0); Sel: in std_logic_vector(3 downto 0); j: buffer std_logic_vector(1 downto 0)); end ALU; architecture alu of ALU is begin process(A,B,Sel) begin case Sel is when "0000" => j<= A + B;
DATE: / / Page 48
when "0001" => j<= A + (not B) + 1; when "0010" => j<= A and B; when "0011" => j<= A or B; when "0100" => j<= A XOR B; when "0101" => if (A<B) then j<=B; else if A>B then j<=A; else j<=not A; end if; end if; when "0111" => j<= not j; when others => j<= "XX"; end case; end process; end alu;
Simulation:
DATE: / / Page 49
DATE: / / Page 50
-- coefficient_table <= b; fir_algorithm: process (clock) variable data_out : single; variable fir_result : single; variable data_table_var: single_vector(number_of_taps-1 downto 0); -- the coeff table assignment really ought to be handled at the entity interface variable coefficient_table_var: single_vector(number_of_taps-1 downto 0); variable tmp : single_vector(number_of_taps-1 downto 0); variable tmp2 : single; variable tmp3 : single_vector(number_of_taps-1 downto 0); variable tmp4 : integer; variable num_taps_minus_1 : integer; variable y_result : signed(20 downto 0); begin if rising_edge(clock) then -- data_table_var := data_table(number_of_taps-1) & data_table(number_of_taps-2 downto 0); -- putting the coeff table in a loop like this allows dynamic coeff updating for i in 0 to number_of_taps-1 loop coefficient_table_var(i) := single(to_integer(unsigned(b(i))))/127.0; end loop; -- tmp := reverse_order(data_table_var); -- tmp2 := 0.15; + to_integer(a); data_table_var := data_table; tmp2 := single(to_integer(signed(a))); data_table_var := shift_fifo (data_table_var, tmp2); -- fifo => data_in => data_table <= data_table_var; -- tmp3 := reverse_order(data_table_var); -- tmp4 := 0; num_taps_minus_1 := number_of_taps-1; fir_result := sum_of_products ( lower_limit => 0, upper_limit => number_of_taps-1, a_in => reverse_order(data_table_var), b_in => coefficient_table_var );
L.J. Institute of Engineering & Technology DATE: / / Page 52
y_result := to_signed(integer(fir_result), y_result'length); -- this causes an array bug to_std_logic_vector( y <= std_logic_vector(y_result); -- this causes an array bug -- to_twos_complement end if; end process; end behavioural;
Simulation:
DATE: / / Page 53
DATE: / / Page 54