hw6aSol - - 1 - 1. (15 points) Write a version of the fair...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: - 1 - 1. (15 points) Write a version of the fair arbiter that supports three clients instead of two. Your module should have a third request signal ( request2 ) and a third grant ( grant2 ). entity fairArbiter is port( clk, reset: in std_logic; request0, request1, request2: in std_logic; grant0, grant1, grant2: out std_logic); end fairArbiter; architecture a1 of fairArbiter is type stateType is (idle0, idle1, idle2, busy0, busy1, busy2); signal state: stateType; begin process(clk) begin if rising_edge(clk) then if reset = '1' then state <= idle0; else case state is when idle0 => if request0 = '1' then state <= busy0; elsif request1 = '1' then state <= busy1; elsif request2 = '1' then state <= busy2; end if; when idle1 => if request1 = '1' then state <= busy1; elsif request2 = '1' then state <= busy2; elsif request0 = '1' then state <= busy0; end if; when idle2 => if request2 = '1' then state <= busy2; elsif request0 = '1' then state <= busy0; elsif request1 = '1' then state <= busy1; end if;...
View Full Document

Page1 / 2

hw6aSol - - 1 - 1. (15 points) Write a version of the fair...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online