stiansjogren icon

Untitled

stiansjogren | PRO | 06/18/16 02:12:20 PM UTC | 0 ⭐ | 629 👁️ | Never ⏰ | []
text |

930 B

|

None

|

0 👍

/

0 👎

1 Questions
   1.1
  process(clk_en,di,dsi,rstn)
begin
    if rstn='0' then
        do<=(others=>'0');
    elsif clk_en= '1'then
        if dsi='1'then
            do<=di;
        end if;
    end if;
end process;
 - This process is a syncroeous process because the output does not only depent on the input, but also of the past values of inputs.
- Although the process does not contain any syntactical errors, the functionality is not useful. I think the process tries to implement a
  DFF with asyncroneus reset. Non-syntactical errors: clk signal not in sensitivity list and the DFF does not operate on rising edge of the clock.
  Improved version:
  process(clk ,clk_en,di,dsi,rstn)
begin
    if rising_edge(clk) then
        if rstn='0' then
            do<=(others=>'0');
        elsif clk_en= '1'then
            if dsi='1'then
                do<=di;
            end if;
        end if;
    end if;
end process;

Comments