V
Vivek Menon
I am trying to synthesize and simulate a parallel shift register that keeps shifting the input data as long as the enable pin is active.
entity shift_out is
Port (
--Inputs
clk : in std_logic;
en : in std_logic;
rst : in std_logic;
in1 : in std_logic_vector(31 downto 0);
-- Outputs
shift_val : out std_logic_vector(31 downto 0)
);
end entity shift_out;
architecture arch of shift_out is
signal shift_t1 : std_logic_vector(31 downto 0) := (others => '0');
....
process (clk, rst, in1, en) is
begin
if rst = '1' then
shift_t1 <= (others=>'0');
shift_val <= (others=>'0');
elsif rising_edge(clk) then
if (en = '1') then
shift_t1 <= shift_t1 ror x"10";
shift_t1 <= in1;
end if ;
end if;
end process;
shift_val <= shift_t1;
end arch;
I am confused with the ror approach, I have tried array slicing and that did not simulate as well.
ANy suggestions??
entity shift_out is
Port (
--Inputs
clk : in std_logic;
en : in std_logic;
rst : in std_logic;
in1 : in std_logic_vector(31 downto 0);
-- Outputs
shift_val : out std_logic_vector(31 downto 0)
);
end entity shift_out;
architecture arch of shift_out is
signal shift_t1 : std_logic_vector(31 downto 0) := (others => '0');
....
process (clk, rst, in1, en) is
begin
if rst = '1' then
shift_t1 <= (others=>'0');
shift_val <= (others=>'0');
elsif rising_edge(clk) then
if (en = '1') then
shift_t1 <= shift_t1 ror x"10";
shift_t1 <= in1;
end if ;
end if;
end process;
shift_val <= shift_t1;
end arch;
I am confused with the ror approach, I have tried array slicing and that did not simulate as well.
ANy suggestions??