1-23-2020:
1-30-2020:
2-6-2020:
2-13-2020:
2-20-2020:
2-27-2020:
3-5-2020:
3-12-2020:
3-19-2020:
3-26-2020:
4-1-2020:
4-7-2020:
4-9-2020:
4-16-2020:
4-23-2020:
4-30-2020:
5-5-2020:
Lab 4 Update:
anode <= "1110" when dig="00" and data /= X"0000" else -- digit 0
"1101" when dig="01" and data(15 downto 4) /= X"000" else -- digit 1
"1011" when dig="10" and data(15 downto 8) /= X"00" else -- digit 2
"0111" when dig="11" and data(15 downto 12) /= X"0" else -- digit 3
"1111";
entity hexcalc is
Port ( clk_50MHz : in STD_LOGIC;
SEG7_anode : out STD_LOGIC_VECTOR (3 downto 0);
SEG7_seg : out STD_LOGIC_VECTOR (6 downto 0);
bt_clr : in STD_LOGIC;
bt_plus : in STD_LOGIC;
bt_eq : in STD_LOGIC;
KB_col : out STD_LOGIC_VECTOR (4 downto 1);
KB_row : in STD_LOGIC_VECTOR (4 downto 1 );
bt_sub: in STD_LOGIC);
...
signal add: STD_LOGIC;
...
when ENTER_ACC =>
if kp_hit = '1' then
nx_acc <= acc(11 downto 0) & kp_value;
nx_state <= ACC_RELEASE;
elsif bt_plus = '1' then
nx_state <= START_OP;
add <= '1';
elsif bt_sub = '1' then
nx_state <= START_OP;
add <= '0';
else nx_state <= ENTER_ACC;
end if;
...
when ENTER_OP =>
display <= operand;
if (bt_eq = '1' and add = '1' )then
nx_acc <= acc + operand;
nx_state <=SHOW_RESULT
elsif (bt_eq = '1' and add = '0' )then
nx_acc <= acc - operand;
nx_state <= SHOW_RESULT;
elsif kp_hit = '1' then
nx_operand <= operand(11 downto 0) & kp_value;
nx_state <= OP_RELEASE;
else nx_state <= ENTER_OP;
end if;
Code changes are becoming larger and can be seen in the GitHub Repo for my labs.
Lab 5 Update:
Lab 6 Update:
5-12-2020: