Question: for this code Could you draw a combinational logic diagram? library IEEE; use IEEE.STD _ LOGIC _ 1 1 6 4 . ALL; use IEEE.STD
for this code Could you draw a combinational logic diagram?
library IEEE; use IEEE.STDLOGICALL; use IEEE.STDLOGICARITH.ALL; use IEEE.STDLOGICUNSIGNED.ALL; entity sequentialdivision is Port clk : in STDLOGIC; rst : in STDLOGIC; A : in STDLOGICVECTOR downto ; B : in STDLOGICVECTOR downto ; Q : out STDLOGICVECTOR downto ; R : out STDLOGICVECTOR downto ; end sequentialdivision; architecture Behavioral of sequentialdivision is signal remainder : STDLOGICVECTOR downto :; signal quotient : STDLOGICVECTOR downto :; signal tempB : STDLOGICVECTOR downto ; signal subtractresult : STDLOGICVECTOR downto ; signal cmpflag : STDLOGIC; begin processclk rst begin if rst then remainder ; quotient ; elsif risingedgeclk then if unsignedremainder unsignedtempB then subtractresult stdlogicvectorunsignedremainder unsignedtempB; quotient stdlogicvectorunsignedquotient; remainder subtractresult; end if; end if; end process; Assign inputs to temporary registers tempB & B; Extend B to bits remainder & A; Extend A to bits Output assignments Q quotient; R remainder downto ; Take lower bits as remainder end Behavioral;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
