A new lesson was posted today:
http://www.pyroelectro.com/edu/fpga/procedural_logic/
Post your homework answers here to compare with everyone else!
#5 Procedural Logic [Post Homework Here]
-
- PyroElectro Admin
- Posts: 1181
- Joined: Mon Nov 12, 2007 9:24 pm
- Location: Earth
- Contact:
Re: #5 Procedural Logic [Post Homework Here]
Hi Chris
Here is my homework
Combinatorial logic always runs.
Procedural logic runs when a signal on the sensitivity list changes.
To "trigger" the procedure.
Meaning that the procedural statements are only executed when one of the signals in the sensitivity list changes.
/Bingo
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 is
port(
clk: in std_logic; --
clk_out: out std_logic --
);
end lesson5a;
architecture rtl of lesson5a is
signal 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;
/Bingo
-
- PyroElectro Admin
- 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 homeworkHOMEWORK 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
Correct answers!
Thanks for showing the RTL viewer image as well. That thing really slams it in your face how two d-flip-flops is all you need.
Return to “Introduction to CPLD and FPGA”
Who is online
Users browsing this forum: No registered users and 2 guests