- bugfix: LSB_FIRST was not working
Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@816 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
+11
-3
@@ -41,7 +41,7 @@ ARCHITECTURE behavior OF sipo IS
|
||||
--------------------------------------------------------------------------
|
||||
begin
|
||||
|
||||
pre_fin <= shift_cnt_pipe(shift_cnt_pipe'left);
|
||||
pre_fin <= shift_cnt_pipe(shift_cnt_pipe'left) when msb_first else shift_cnt_pipe(0);
|
||||
dout_en <= out_en;
|
||||
dout_vld <= out_vld;
|
||||
|
||||
@@ -86,9 +86,17 @@ process(clk)
|
||||
begin
|
||||
if rising_edge(clk) then
|
||||
if rst = '1' or pre_fin = '1' then
|
||||
shift_cnt_pipe <= (shift_cnt_pipe'left downto 1 => '0') & din_vld;
|
||||
if (msb_first) then
|
||||
shift_cnt_pipe <= (shift_cnt_pipe'left downto 1 => '0') & din_vld;
|
||||
else
|
||||
shift_cnt_pipe <= din_vld & (shift_cnt_pipe'left downto 1 => '0');
|
||||
end if;
|
||||
elsif din_vld = '1' or abort = '1' then
|
||||
shift_cnt_pipe <= shift_cnt_pipe(shift_cnt_pipe'left-1 downto 0) & din_vld;
|
||||
if (msb_first) then
|
||||
shift_cnt_pipe <= shift_cnt_pipe(shift_cnt_pipe'left-1 downto 0) & din_vld;
|
||||
else
|
||||
shift_cnt_pipe <= din_vld & shift_cnt_pipe(shift_cnt_pipe'left downto 1);
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
Reference in New Issue
Block a user