B
Beware
Hi,
i'm make some simples VHDL design to keep alive my knowledges (i
try ).
But, i've got a little problem in my code, it's a shift register.
When i simulate this design, i haven't the execpted value on the
signal s1 (out) because i've not the good value on my internal signal
(it doesn't take the value of the input as it would be to).
I hope i'm clear in my explications.
Here my design :
library ieee;
use ieee.std_logic_1164.all;
--entity
entity accushift32 is
port (
e1 : in std_logic_vector(31 downto 0);
rst : in std_logic;
clk : in std_logic;
s1 : out std_logic);
end accushift32;
--design
architecture d_accushift32 of accushift32 is
signal internal : std_logic_vector(31 downto 0) := (others => '0');
begin -- d_accushift32
s1 <= internal(0);
process (clk, rst)
begin -- process
if rst = '0' then -- asynchronous reset (active
low)
internal <= e1;
elsif clk'event and clk = '1' then -- rising clock edge
internal <= '0' & internal(31 downto 1);
end if;
end process;
end d_accushift32;
Thanks to all of you for your answers (or your comments)
i'm make some simples VHDL design to keep alive my knowledges (i
try ).
But, i've got a little problem in my code, it's a shift register.
When i simulate this design, i haven't the execpted value on the
signal s1 (out) because i've not the good value on my internal signal
(it doesn't take the value of the input as it would be to).
I hope i'm clear in my explications.
Here my design :
library ieee;
use ieee.std_logic_1164.all;
--entity
entity accushift32 is
port (
e1 : in std_logic_vector(31 downto 0);
rst : in std_logic;
clk : in std_logic;
s1 : out std_logic);
end accushift32;
--design
architecture d_accushift32 of accushift32 is
signal internal : std_logic_vector(31 downto 0) := (others => '0');
begin -- d_accushift32
s1 <= internal(0);
process (clk, rst)
begin -- process
if rst = '0' then -- asynchronous reset (active
low)
internal <= e1;
elsif clk'event and clk = '1' then -- rising clock edge
internal <= '0' & internal(31 downto 1);
end if;
end process;
end d_accushift32;
Thanks to all of you for your answers (or your comments)