## #5 Procedural Logic [Post Homework Here]

Talk about the fifth PyroEDU course here.
ThePyroElectro
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

### #5 Procedural Logic [Post Homework Here]

A new lesson was posted today:
http://www.pyroelectro.com/edu/fpga/procedural_logic/

Bingo600
Newbie Pyro
Posts: 75
Joined: Sat Jun 28, 2014 7:22 am

### Re: #5 Procedural Logic [Post Homework Here]

Hi Chris

Here is my homework

HOMEWORK QUESTION 1
What is the difference between combinatorial logic and procedural logic?

Combinatorial logic always runs.
Procedural logic runs when a signal on the sensitivity list changes.

HOMEWORK QUESTION 2
What is the purpose of using a ‘sensitivity list’ in a procedural logic process?

To "trigger" the procedure.
Meaning that the procedural statements are only executed when one of the signals in the sensitivity list changes.

HOMEWORK QUESTION 3
Using VHDL make a logic element with one clock input and one output. Then use procedural
logic to divide the clock input frequency by 4 and send it to the output.

Code: Select all

`library ieee;use ieee.std_logic_1164.all;entity lesson5a isport(   clk:         in   std_logic; --   clk_out:      out std_logic --   );end lesson5a;architecture rtl of lesson5a issignal f2: std_logic;signal f4: std_logic;begin   DIV2: process(clk)   begin   if rising_edge(clk) then      f2 <= not f2;   end if;   end process DIV2;      DIV4: process(f2)   begin   if rising_edge(f2) then      f4 <= not f4;   end if;   end process DIV4;      clk_out <= f4;end rtl;   ` Screenshot-RTL Viewer - -home-cfo-x-altera-pyro-course-lesson5a-lesson5a - lesson5a.png (44.7 KiB) Viewed 9343 times

/Bingo

ThePyroElectro
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

### Re: #5 Procedural Logic [Post Homework Here]

Bingo600 wrote:Hi Chris

Here is my homework

HOMEWORK QUESTION 1
What is the difference between combinatorial logic and procedural logic?

Combinatorial logic always runs.
Procedural logic runs when a signal on the sensitivity list changes.

HOMEWORK QUESTION 2
What is the purpose of using a ‘sensitivity list’ in a procedural logic process?

To "trigger" the procedure.
Meaning that the procedural statements are only executed when one of the signals in the sensitivity list changes.

...
...
...

/Bingo