summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2025-05-05 17:38:32 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2025-05-05 17:38:32 -0400
commit88d2e8ff5ab198a115f49ccb4baaa032bb7cde1d (patch)
treeb9f6337e24b5a8ca8e213ceec822b10c74b4a5e3
parent9d978999c47941ad235339149b76e1f182c529ac (diff)
Fix Err
-rw-r--r--pb_APP_log_comb.srcs/sim_1/imports/verif/AppCombi_top_tb.vhd17
-rw-r--r--pb_APP_log_comb.srcs/sources_1/imports/src/septSegments_encodeur.vhd2
-rw-r--r--pb_APP_log_comb.srcs/sources_1/new/Mux.vhd30
3 files changed, 29 insertions, 20 deletions
diff --git a/pb_APP_log_comb.srcs/sim_1/imports/verif/AppCombi_top_tb.vhd b/pb_APP_log_comb.srcs/sim_1/imports/verif/AppCombi_top_tb.vhd
index ecbdeaa..493b77e 100644
--- a/pb_APP_log_comb.srcs/sim_1/imports/verif/AppCombi_top_tb.vhd
+++ b/pb_APP_log_comb.srcs/sim_1/imports/verif/AppCombi_top_tb.vhd
@@ -94,7 +94,22 @@ architecture Behavioral of AppCombi_top_tb is
constant sysclk_Period : time := 8 ns;
-
+ constant char_0 : std_logic_vector(3 downto 0) := "0000";
+ constant char_1 : std_logic_vector(3 downto 0) := "0001";
+ constant char_2 : std_logic_vector(3 downto 0) := "0010";
+ constant char_3 : std_logic_vector(3 downto 0) := "0011";
+ constant char_4 : std_logic_vector(3 downto 0) := "0100";
+ constant char_5 : std_logic_vector(3 downto 0) := "0101";
+ constant char_6 : std_logic_vector(3 downto 0) := "0110";
+ constant char_7 : std_logic_vector(3 downto 0) := "0111";
+ constant char_8 : std_logic_vector(3 downto 0) := "0000";
+ constant char_9 : std_logic_vector(3 downto 0) := "0000";
+ constant char_a : std_logic_vector(3 downto 0) := "0000";
+ constant char_b : std_logic_vector(3 downto 0) := "0000";
+ constant char_c : std_logic_vector(3 downto 0) := "0000";
+ constant char_neg : std_logic_vector(3 downto 0) := "0000";
+ constant char_e : std_logic_vector(3 downto 0) := "0000";
+ constant char_r : std_logic_vector(3 downto 0) := "0000";
----------------------------------------------------------------------------
-- declaration d'un tableau pour soumettre un vecteur de test
diff --git a/pb_APP_log_comb.srcs/sources_1/imports/src/septSegments_encodeur.vhd b/pb_APP_log_comb.srcs/sources_1/imports/src/septSegments_encodeur.vhd
index 971c700..bf77146 100644
--- a/pb_APP_log_comb.srcs/sources_1/imports/src/septSegments_encodeur.vhd
+++ b/pb_APP_log_comb.srcs/sources_1/imports/src/septSegments_encodeur.vhd
@@ -102,7 +102,7 @@ begin
when "1100" => s_Seg <= "0111001"; -- C
when "1101" => s_Seg <= "1000000"; -- neg. (-)
when "1110" => s_Seg <= "1111001"; -- E
- when "1111" => s_Seg <= "0001100"; -- r (for "Er")
+ when "1111" => s_Seg <= "1010000"; -- r (for "Er")
when others => s_Seg <= "0001000"; -- undefined ("_")
end case;
end process;
diff --git a/pb_APP_log_comb.srcs/sources_1/new/Mux.vhd b/pb_APP_log_comb.srcs/sources_1/new/Mux.vhd
index 1cb40ff..6202d38 100644
--- a/pb_APP_log_comb.srcs/sources_1/new/Mux.vhd
+++ b/pb_APP_log_comb.srcs/sources_1/new/Mux.vhd
@@ -53,12 +53,6 @@ architecture Behavioral of Mux is
signal break : BOOLEAN := FALSE;
- signal unit_input_buf : STD_LOGIC_VECTOR(3 downto 0);
- signal tens_input_buf : STD_LOGIC_VECTOR(3 downto 0);
-
- signal unit_sim_sink : string(1 to 1);
- signal tens_sim_sink : string(1 to 1);
-
begin
decide : process(ADCBin, Dizaines, Unites_ns, BTN, erreur, S2, Code_signe, Unite_s)
@@ -66,31 +60,31 @@ begin
-- HANDLE SWITCH {{{
if ( (S2 = pressed) or (erreur = '1')) then
break <= TRUE; -- Avoids double printing on 7seg
- tens_input_buf <= char_E;
- unit_input_buf <= char_r;
+ DAFF1 <= char_E;
+ DAFF0 <= char_r;
end if;
-- }}}
-- HANDLE BUTTONS {{{
if break = FALSE then
case (BTN) is
when "00" =>
- unit_input_buf <= Unites_ns;
- tens_input_buf <= Dizaines;
+ DAFF0 <= Unites_ns;
+ DAFF1 <= Dizaines;
when "01" =>
-- impossible de buster "C" en hex
-- encore moins avoir une deuxième décimale
-- on mets donc les "Dizaines" à zéro
- unit_input_buf <= ADCbin;
- tens_input_buf <= "0000";
+ DAFF0 <= ADCbin;
+ DAFF1 <= "0000";
when "10" =>
- unit_input_buf <= Unite_s;
- tens_input_buf <= Code_signe;
+ DAFF0 <= Unite_s;
+ DAFF1 <= Code_signe;
when "11" =>
- tens_input_buf <= char_E;
- unit_input_buf <= char_r;
+ DAFF1 <= char_E;
+ DAFF0 <= char_r;
when others =>
- tens_input_buf <= char_E;
- unit_input_buf <= char_r;
+ DAFF1 <= char_E;
+ DAFF0 <= char_r;
end case;
end if;
-- }}}