summaryrefslogtreecommitdiffstats
path: root/divider.vhd
diff options
context:
space:
mode:
authorJames <31272717+gpd-pocket-hacker@users.noreply.github.com>2018-05-17 17:46:40 +0100
committerJames <31272717+gpd-pocket-hacker@users.noreply.github.com>2018-05-17 17:46:40 +0100
commit3769dd04597e39140755bd4b92023570e6fcde3c (patch)
tree2fe48152e573b383d073917868c559bdd8e20601 /divider.vhd
parent297375cf51e449ebd4a11aa05b0011016e40f72f (diff)
downloadrob_spdif-3769dd04597e39140755bd4b92023570e6fcde3c.tar.gz
rob_spdif-3769dd04597e39140755bd4b92023570e6fcde3c.tar.bz2
rob_spdif-3769dd04597e39140755bd4b92023570e6fcde3c.zip
tidy
Diffstat (limited to 'divider.vhd')
-rw-r--r--divider.vhd38
1 files changed, 19 insertions, 19 deletions
diff --git a/divider.vhd b/divider.vhd
index 26280bf..1a8c2ca 100644
--- a/divider.vhd
+++ b/divider.vhd
@@ -18,37 +18,37 @@ end divider;
architecture rtl of divider is
-component counter is
- port
- (
- divisor : in integer;
- clk : in std_logic;
- n_reset : in std_logic;
- pulse_out : out std_logic
- );
-end component;
-
-
- signal pulse: std_logic;
+ component counter is
+ port
+ (
+ divisor : in integer;
+ clk : in std_logic;
+ n_reset : in std_logic;
+ pulse_out : out std_logic
+ );
+ end component;
+
+
+ signal pulse : std_logic;
signal q :
std_logic;
begin
clk_out <= q;
- c1:counter port map (
- divisor => divisor,
- clk => clk,
- n_reset => n_reset,
- pulse_out => pulse
- );
+ c1 : counter port map (
+ divisor => divisor,
+ clk => clk,
+ n_reset => n_reset,
+ pulse_out => pulse
+ );
process (clk, pulse, n_reset)
begin
if n_reset = '0' then
q <= '0';
- elsif RISING_EDGE(clk) and pulse='1' then
+ elsif RISING_EDGE(clk) and pulse = '1' then
q <= not q;
end if;
end process;