D
Daku
Could some VHDL guru point out what I might be doing incorrectly ?
1. The following code compiles perfectly:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_arith.ALL;
use IEEE.NUMERIC_STD.ALL;
ENTITY testclock IS
PORT (inclk : in std_logic;
outclk : out std_logic);
END testclock;
ARCHITECTURE dftest OF testclock IS
SIGNAL local : std_logic := '0';
BEGIN
proc1 : PROCESS(inclk)
BEGIN
IF RISING_EDGE(inclk) THEN
local <= inclk;
END IF;
END PROCESS proc1;
proc2 : PROCESS(inclk)
BEGIN
IF FALLING_EDGE(inclk) THEN
outclk <= local;
END IF;
END PROCESS proc2;
END dftest;
2. A small modification to proc2 as :
proc2 : PROCESS(inclk)
BEGIN
IF FALLING_EDGE(inclk) THEN
outclk <= local'DELAYED(1000ns);
--outclk <= TRANSPORT local AFTER 1000ns;
END IF;
END PROCESS proc2;
produces the error message:
vbl_bcomp_y.y 4463 : Error 18 line 22 in file testclock :illegal
concurrent statement
3. In Verilog, one can have a variable period (alternatively variable
frequency) clock as:
always
# (fixed_half_period) clock = 0;
# (fixed_half_period + variable_delay) = 1;
where variable_delay can be generated using a standard distribution,
as $dist_exponential
Is there a similar way to control clock periods in VHDL ?
Any hints, suggestions would be of invaluable. Thanks in advance for
your help.
1. The following code compiles perfectly:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_arith.ALL;
use IEEE.NUMERIC_STD.ALL;
ENTITY testclock IS
PORT (inclk : in std_logic;
outclk : out std_logic);
END testclock;
ARCHITECTURE dftest OF testclock IS
SIGNAL local : std_logic := '0';
BEGIN
proc1 : PROCESS(inclk)
BEGIN
IF RISING_EDGE(inclk) THEN
local <= inclk;
END IF;
END PROCESS proc1;
proc2 : PROCESS(inclk)
BEGIN
IF FALLING_EDGE(inclk) THEN
outclk <= local;
END IF;
END PROCESS proc2;
END dftest;
2. A small modification to proc2 as :
proc2 : PROCESS(inclk)
BEGIN
IF FALLING_EDGE(inclk) THEN
outclk <= local'DELAYED(1000ns);
--outclk <= TRANSPORT local AFTER 1000ns;
END IF;
END PROCESS proc2;
produces the error message:
vbl_bcomp_y.y 4463 : Error 18 line 22 in file testclock :illegal
concurrent statement
3. In Verilog, one can have a variable period (alternatively variable
frequency) clock as:
always
# (fixed_half_period) clock = 0;
# (fixed_half_period + variable_delay) = 1;
where variable_delay can be generated using a standard distribution,
as $dist_exponential
Is there a similar way to control clock periods in VHDL ?
Any hints, suggestions would be of invaluable. Thanks in advance for
your help.