-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from DylanVanAssche/feature/ISSUE-10
Feature/issue 10
- Loading branch information
Showing
13 changed files
with
383 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Deployment | ||
## What do you need? | ||
- FPGA platform (Virtex II Pro) | ||
- VHDL compiler | ||
- FPGA upload software, see the website of the FPGA manufacturer | ||
|
||
## Steps | ||
- Compile the VHDL code using a VHDL compiler. The top and UCF files for the Virtex II Pro platform are included in this repo. | ||
- Upload the bitfile to the FPGA using the upload software from your manufacturer. | ||
- Press the reset button to initialize the FPGA. | ||
- Enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--*************************************** | ||
--* TITLE: NCO (receiver) * | ||
--* TYPE: Component * | ||
--* AUTHOR: Dylan Van Assche * | ||
--* DATE: 13/12/2017 * | ||
--*************************************** | ||
--*************** | ||
--* DESCRIPTION * | ||
--*************** | ||
--1)Purpose: | ||
-- NCO to divide the 100 Mhz clock of the Virtex II Pro. | ||
--2)Principle: | ||
-- When counting down, send a clk_en signal out and restart. | ||
--3)Ingangen: | ||
-- rst, clk | ||
--4)Uitgangen: | ||
-- clk_en | ||
--********************** | ||
--* LIBRARIES & ENTITY * | ||
--********************** | ||
LIBRARY ieee; | ||
USE ieee.std_logic_1164.ALL; | ||
USE ieee.std_logic_unsigned.ALL; | ||
ENTITY nco_rx IS | ||
PORT | ||
( | ||
clk : IN std_logic; | ||
rst : IN std_logic; | ||
clk_en : OUT std_logic | ||
); | ||
END; | ||
--********************************************* | ||
--* ARCHITECTURE, SIGNALS, TYPES & COMPONENTS * | ||
--********************************************* | ||
ARCHITECTURE behavior OF nco_rx IS | ||
SIGNAL n_count : std_logic_vector(10 DOWNTO 0); | ||
SIGNAL p_count : std_logic_vector(10 DOWNTO 0); | ||
SIGNAL enable : std_logic := '1'; -- allow for reset | ||
SIGNAL enable_next : std_logic := '0'; | ||
CONSTANT TRIGGER : std_logic_vector(10 DOWNTO 0) := (OTHERS => '0'); | ||
BEGIN | ||
clk_en <= enable; | ||
-- 2-Process: synchronous part | ||
count_sync : PROCESS (clk) | ||
BEGIN | ||
IF (rising_edge(clk)) THEN | ||
IF (rst = '1') THEN -- rst line high, go to initial state | ||
p_count <= (OTHERS => '0'); | ||
enable <= '1'; | ||
ELSE -- normal operation | ||
p_count <= n_count; | ||
enable <= enable_next; | ||
END IF; | ||
END IF; | ||
END PROCESS count_sync; | ||
-- 2-Process: combinatoric part | ||
count_comb : PROCESS (p_count, enable) | ||
BEGIN | ||
n_count <= p_count + 1; | ||
IF (n_count = TRIGGER) THEN -- clk_en signal | ||
enable_next <= '1'; | ||
ELSE | ||
enable_next <= '0'; | ||
END IF; | ||
END PROCESS count_comb; | ||
END behavior; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
208 changes: 104 additions & 104 deletions
208
hardware/receiver.vhd → hardware/receiver/receiver.vhd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,105 @@ | ||
--*************************************** | ||
--* TITLE: Receiver (receiver) * | ||
--* TYPE: Top File * | ||
--* AUTHOR: Dylan Van Assche * | ||
--* DATE: 9/12/2017 * | ||
--*************************************** | ||
--*************** | ||
--* DESCRIPTION * | ||
--*************** | ||
--1)Purpose: | ||
-- Connect all the layers into 1 VHDL file. | ||
--2)Principle: | ||
-- Connect every layer API. | ||
--3)Inputs: | ||
-- rx, pn_select, rst, clk, clk_en | ||
--4)Outputs: | ||
-- display_b | ||
--********************** | ||
--* LIBRARIES & ENTITY * | ||
--********************** | ||
LIBRARY IEEE; | ||
USE IEEE.std_logic_1164.ALL; | ||
ENTITY receiver IS | ||
PORT | ||
( | ||
clk : IN std_logic; | ||
rst_b : IN std_logic; | ||
rx : IN std_logic; | ||
pn_select_b_SW0 : IN std_logic; | ||
pn_select_b_SW1 : IN std_logic; | ||
display_b_SEG_A : OUT std_logic; | ||
display_b_SEG_B : OUT std_logic; | ||
display_b_SEG_C : OUT std_logic; | ||
display_b_SEG_D : OUT std_logic; | ||
display_b_SEG_E : OUT std_logic; | ||
display_b_SEG_F : OUT std_logic; | ||
display_b_SEG_G : OUT std_logic; | ||
display_b_SEG_DP: OUT std_logic | ||
); | ||
END receiver ; | ||
ARCHITECTURE behavior OF receiver IS | ||
SIGNAL bitsample : std_logic; | ||
SIGNAL databit : std_logic; | ||
SIGNAL rst_b : std_logic; | ||
SIGNAL clk_en : std_logic; | ||
SIGNAL preamble : std_logic_vector(6 DOWNTO 0); | ||
SIGNAL data : std_logic_vector(3 DOWNTO 0); -- received number from transmitter | ||
SIGNAL display_b : std_logic_vector(6 DOWNTO 0); | ||
SIGNAL pn_select: std_logic_vector(1 DOWNTO 0); | ||
BEGIN | ||
-- display outputs | ||
display_b_SEG_A <= display_b(6); | ||
display_b_SEG_B <= display_b(5); | ||
display_b_SEG_C <= display_b(4); | ||
display_b_SEG_D <= display_b(3); | ||
display_b_SEG_E <= display_b(2); | ||
display_b_SEG_F <= display_b(1); | ||
display_b_SEG_G <= display_b(0); | ||
display_b_SEG_DP <= '1'; -- turn DOT off | ||
-- dipswitch inputs | ||
pn_select <= NOT(pn_select_b_SW1) & NOT(pn_select_b_SW0) | ||
-- buttons inputs | ||
rst <= NOT(rst_b); | ||
--layers | ||
nco_rx : ENTITY work.nco_rx(behavior) | ||
PORT MAP | ||
( | ||
clk => clk, | ||
rst => rst, | ||
clk_en => clk_en | ||
); | ||
application_layer : ENTITY work.application_layer(behavior) | ||
PORT MAP | ||
( | ||
clk => clk, | ||
clk_en => clk_en, | ||
rst => rst, | ||
bitsample => bitsample, | ||
preamble => preamble, | ||
data_in => data, | ||
display_b => display_b | ||
); | ||
datalink_layer : ENTITY work.datashiftreg(behavior) -- datalink layer is only 1 component | ||
PORT MAP | ||
( | ||
clk => clk, | ||
clk_en => clk_en, | ||
rst => rst, | ||
bitsample => bitsample, | ||
databit => databit, | ||
preamble => preamble, | ||
data => data | ||
); | ||
access_layer : ENTITY work.access_layer(behavior) | ||
PORT MAP | ||
( | ||
clk => clk, | ||
clk_en => clk_en, | ||
rst => rst, | ||
sdi_spread => rx, | ||
pn_select => pn_select, | ||
bitsample_out => bitsample, | ||
databit => databit | ||
); | ||
--*************************************** | ||
--* TITLE: Receiver (receiver) * | ||
--* TYPE: Top File * | ||
--* AUTHOR: Dylan Van Assche * | ||
--* DATE: 9/12/2017 * | ||
--*************************************** | ||
--*************** | ||
--* DESCRIPTION * | ||
--*************** | ||
--1)Purpose: | ||
-- Connect all the layers into 1 VHDL file. | ||
--2)Principle: | ||
-- Connect every layer API. | ||
--3)Inputs: | ||
-- rx, pn_select, rst, clk, clk_en | ||
--4)Outputs: | ||
-- display_b | ||
--********************** | ||
--* LIBRARIES & ENTITY * | ||
--********************** | ||
LIBRARY IEEE; | ||
USE IEEE.std_logic_1164.ALL; | ||
ENTITY receiver_hw IS | ||
PORT | ||
( | ||
clk : IN std_logic; | ||
rst_b : IN std_logic; | ||
rx : IN std_logic; | ||
pn_select_b_SW0 : IN std_logic; | ||
pn_select_b_SW1 : IN std_logic; | ||
display_b_SEG_A : OUT std_logic; | ||
display_b_SEG_B : OUT std_logic; | ||
display_b_SEG_C : OUT std_logic; | ||
display_b_SEG_D : OUT std_logic; | ||
display_b_SEG_E : OUT std_logic; | ||
display_b_SEG_F : OUT std_logic; | ||
display_b_SEG_G : OUT std_logic; | ||
display_b_SEG_DP: OUT std_logic | ||
); | ||
END receiver_hw; | ||
ARCHITECTURE behavior OF receiver_hw IS | ||
SIGNAL bitsample : std_logic; | ||
SIGNAL databit : std_logic; | ||
SIGNAL rst : std_logic; | ||
SIGNAL clk_en : std_logic; | ||
SIGNAL preamble : std_logic_vector(6 DOWNTO 0); | ||
SIGNAL data : std_logic_vector(3 DOWNTO 0); -- received number from transmitter | ||
SIGNAL display_b : std_logic_vector(6 DOWNTO 0); | ||
SIGNAL pn_select: std_logic_vector(1 DOWNTO 0); | ||
BEGIN | ||
-- display outputs | ||
display_b_SEG_A <= display_b(6); | ||
display_b_SEG_B <= display_b(5); | ||
display_b_SEG_C <= display_b(4); | ||
display_b_SEG_D <= display_b(3); | ||
display_b_SEG_E <= display_b(2); | ||
display_b_SEG_F <= display_b(1); | ||
display_b_SEG_G <= display_b(0); | ||
display_b_SEG_DP <= '1'; -- turn DOT off | ||
-- dipswitch inputs | ||
pn_select <= NOT(pn_select_b_SW1) & NOT(pn_select_b_SW0); | ||
-- buttons inputs | ||
rst <= NOT(rst_b); | ||
--layers | ||
nco_rx : ENTITY work.nco_rx(behavior) | ||
PORT MAP | ||
( | ||
clk => clk, | ||
rst => rst, | ||
clk_en => clk_en | ||
); | ||
application_layer : ENTITY work.application_layer(behavior) | ||
PORT MAP | ||
( | ||
clk => clk, | ||
clk_en => clk_en, | ||
rst => rst, | ||
bitsample => bitsample, | ||
preamble => preamble, | ||
data_in => data, | ||
display_b => display_b | ||
); | ||
datalink_layer : ENTITY work.datashiftreg(behavior) -- datalink layer is only 1 component | ||
PORT MAP | ||
( | ||
clk => clk, | ||
clk_en => clk_en, | ||
rst => rst, | ||
bitsample => bitsample, | ||
databit => databit, | ||
preamble => preamble, | ||
data => data | ||
); | ||
access_layer : ENTITY work.access_layer(behavior) | ||
PORT MAP | ||
( | ||
clk => clk, | ||
clk_en => clk_en, | ||
rst => rst, | ||
sdi_spread => rx, | ||
pn_select => pn_select, | ||
bitsample_out => bitsample, | ||
databit => databit | ||
); | ||
END behavior; |
Oops, something went wrong.