Question

WRITE IN SYSTEM VERILOG:

Write a HDL code for 1 bit D-register with a rising edge clock, a synchronous active-low reset and an asynchronous active-hig

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Program1:

 
Library IEEE;
USE IEEE.Std_logic_1164.all;

 
entity Rising Edge_DFlipFlop_Sync Active low Reset is 
   port(
      Q : out std_logic;    
      Clk :in std_logic;  
   sync_reset: in std_logic;  
      D :in  std_logic    
   );
end Rising Edge_DFlipFlop_Sync Active low Reset;
architecture Behavioral of Rising Edge_DFlipFlop_Sync Active low Reset is  
begin  
 process(Clk)
 begin 
    if(rising_edge(Clk)) then
   if(sync_reset='0') then 
    Q <= '0';
   else 
    Q <= D; 
end if;
    end if;       
 end process;  
end Behavioral; 
Program2:

 
Library IEEE;
USE IEEE.Std_logic_1164.all;

 
entity RisingEdge_DFlipFlop_AsyncResetHigh is 
   port(
      Q : out std_logic;    
      Clk :in std_logic;  
   sync_reset: in std_logic;  
      D :in  std_logic    
   );
end RisingEdge_DFlipFlop_AsyncResetHigh;
architecture Behavioral of RisingEdge_DFlipFlop_AsyncResetHigh is  
begin  
 process(Clk,sync_reset)
 begin 
     if(sync_reset='1') then 
   Q <= '0';
     elsif(rising_edge(Clk)) then
   Q <= D; 
  end if;      
 end process;  
end Behavioral; 
Add a comment
Know the answer?
Add Answer to:
Write a HDL code for 1 bit D-register with a rising edge clock, a synchronous active-low reset an...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT