-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
seekworser
committed
Aug 9, 2019
1 parent
52e3835
commit 935aaf4
Showing
7 changed files
with
182 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ | |
*.ngc | ||
*.ngd | ||
*.pcf | ||
test/* | ||
!test/.keep | ||
*.o |
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 |
---|---|---|
|
@@ -29,6 +29,7 @@ or other commands shown in below. | |
- map | ||
- par | ||
- bitgen | ||
- test [-e entity] | ||
|
||
# Notification | ||
|
||
|
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
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,25 +1,23 @@ | ||
library IEEE; | ||
use IEEE.STD_LOGIC_1164.ALL; | ||
use IEEE.STD_LOGIC_ARITH.ALL; | ||
use IEEE.STD_LOGIC_UNSIGNED.ALL; | ||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
use ieee.std_logic_arith.all; | ||
use ieee.std_logic_unsigned.all; | ||
|
||
entity sample_project is | ||
entity sample is | ||
Port ( | ||
A : out STD_LOGIC_VECTOR (15 downto 0); | ||
B : out STD_LOGIC_VECTOR (15 downto 0); | ||
C : out STD_LOGIC_VECTOR (15 downto 0); | ||
clk : in STD_LOGIC | ||
A : out std_logic_vector (8 downto 0); | ||
clk : in std_logic | ||
); | ||
end sample_project; | ||
end sample; | ||
|
||
architecture Behavioral of sample_project is | ||
signal counter : STD_LOGIC_VECTOR(47 downto 0) := (others => '0'); | ||
begin count: process(clk) | ||
begin if rising_edge(clk) then | ||
architecture behavior of sample is | ||
signal counter : std_logic_vector(21 downto 0) := (others => '0'); | ||
begin | ||
count: process(clk) | ||
begin | ||
if rising_edge(clk) then | ||
counter <= counter+1; | ||
end if; | ||
end process; | ||
A <= counter(35 downto 20); | ||
B <= counter(31 downto 16); | ||
C <= counter(15 downto 0); | ||
end Behavioral; | ||
A <= counter(21 downto 13); | ||
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
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,67 @@ | ||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
use ieee.std_logic_arith.all; | ||
use ieee.std_logic_unsigned.all; | ||
|
||
entity test_sample is | ||
end test_sample; | ||
|
||
architecture behavior of test_sample is | ||
component sample is | ||
Port ( | ||
clk: in std_logic; | ||
A: out std_logic_vector (8 downto 0) | ||
); | ||
end component; | ||
signal clk: std_logic; | ||
signal A: std_logic_vector (8 downto 0); | ||
begin | ||
u1: sample port map( | ||
clk => clk, | ||
A => A | ||
); | ||
process | ||
begin | ||
for i in 0 to 1000000 loop | ||
clk <= '1'; | ||
wait for 16.25 ns; | ||
clk <= '0'; | ||
wait for 16.25 ns; | ||
end loop; | ||
wait; | ||
end process; | ||
end behavior; | ||
|
||
library ieee; | ||
use ieee.std_logic_1164.all; | ||
use ieee.std_logic_arith.all; | ||
use ieee.std_logic_unsigned.all; | ||
|
||
entity test_sample2 is | ||
end test_sample2; | ||
|
||
architecture behavior of test_sample2 is | ||
component sample is | ||
Port ( | ||
clk: in std_logic; | ||
A: out std_logic_vector (8 downto 0) | ||
); | ||
end component; | ||
signal clk: std_logic; | ||
signal A: std_logic_vector (8 downto 0); | ||
begin | ||
u1: sample port map( | ||
clk => clk, | ||
A => A | ||
); | ||
process | ||
begin | ||
for i in 0 to 1000 loop | ||
clk <= '1'; | ||
wait for 16.25 us; | ||
clk <= '0'; | ||
wait for 16.25 us; | ||
end loop; | ||
wait; | ||
end process; | ||
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