Download presentation
Presentation is loading. Please wait.
Published byPosy Maxwell Modified over 9 years ago
1
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal
2
Example 1. A simple project implemented just in VHDL FPGA of Spartan IIE family: XC2S300E Pin: T9 48 MHz Divider clkreset Pin: P15 RESET led Pin: C15 LED The example demonstrates all the steps that are required in order to describe, synthesize and implement in FPGA a simple circuit that switches on/off a LED connected to FPGA pin with frequency approximately equal to 1 Hz.
3
entity led_on_off is Port ( clk : in std_logic; reset : in std_logic; led : out std_logic); end led_on_off; architecture Behavioral of led_on_off is signal internal_clock : std_logic_vector (25 downto 0); begin process(clk,reset) begin if reset = ‘0’ then internal_clock ’0’); elsif clk’event and clk = ‘1’ then internal_clock <= internal_clock+1; end if; end process; led <= internal_clock(internal_clock’left); end Behavioral; Pin: T9 48 MHz Pin: P15 RESET LED VHDL code of the divider
4
architecture Behavioral of led_on_off is signal internal_clock : std_logic_vector (25 downto 0); begin process(clk,reset) begin if reset = ‘0’ then internal_clock ’0’); elsif clk’event and clk = ‘1’ then internal_clock <= internal_clock+1; end if; end process; led <= internal_clock(internal_clock’left); end Behavioral; 1 sec 025 00000000000000000000000000 1100
5
Sources in the project. Examples: VHDL files, schematic files, constraints files, library files, etc Processes in current source. Examples: modeling, synthesis, implementation, editing, generation of library symbols, generation of FPGA bitstreams, etc. Editing of different files. Examples: VHDL code, constraints files, etc. Results for active processes. An example: results of synthesis from VHDL
6
Start from here 1 2 3 Next slide
7
3 5 4 6 7
8
Sources in the project. Examples: VHDL files, schematic files, constraints files, library files, etc 7
9
Sources in the project. Examples: VHDL files, schematic files, constraints files, library files, etc 8 9 Next slide
10
10 11 12 13 9
11
14 15 1617 18
13
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity led_on_off is Port ( clk : in std_logic; reset : in std_logic; led : out std_logic); end led_on_off; architecture Behavioral of led_on_off is begin end Behavioral; signal internal_clock : std_logic_vector (25 downto 0); process(clk,reset) begin if reset = ‘0’ then internal_clock ’0’); elsif clk’event and clk = ‘1’ then internal_clock <= internal_clock+1; end if; end process; led <= internal_clock(internal_clock’left);
14
19
15
20 21 23 22 Next slide
16
24 2526 27 28 Left mouse button double click
17
29 30 Move cursor and click right mouse button
18
31 32 33
19
3435 36 37 38 48 MHz HIGH 50% NET "clk" TNM_NET = "clk"; TIMESPEC "TS_clk" = PERIOD "clk" 48 MHz HIGH 50 %; 39 40
20
41 select 42 Left mouse button double click 43 44
21
4545 4646 drag and drop 4747 4848
22
49 50
23
51 52 54 Select 55 Left mouse buttor double click 53
24
PROGRAM RUN RESET Using Trenz TE-XC2Se prototyping board to check the designed circuit 58 57 Press
25
59 Press 61 Press for RESET 60 LED
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.