Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • main
  • remove-reset
2 results

Target

Select target project
  • tp-vhdl-mee/MEDCON/gr-vhdl-e24passo/tp-filtre-etudiant-e24passo
1 result
Select Git revision
  • main
  • remove-reset
2 results
Show changes
Commits on Source (12)
......@@ -2,24 +2,28 @@
## Diagramme de la FSM
![Diagramme de la FSM](./img/FSM.png)
![Diagramme de la FSM](./img/FSM.drawio.png)
## Questions
### Question filtre 1 : Combien de processus sont utilisés et de quelles natures sont-ils ? Comment les différenciez-vous ?
Nous avons 2 processus, l'un pour définir les changements d'états après le début, et l'autre pour définir l'état initial. La différence entre eux réside dans les états que chacun définit : l'un concerne le premier état, tandis que l'autre concerne tous les autres états.
### Question filtre 2 : La simulation vous permet-elle de valider votre description VHDL ? Justifiez.
![Test de l'unité de controle](./img/controlUnitTest1.png)
![Test de l'unité de controle2](./img/controlUnitTest2.png)
Oui, comme il est possible de vérifier avec l'image, la simulation nous a permis de valider notre transcription VHDL. Avant chaque nouvel état, la condition est remplie pour permettre le changement. Nous avons constaté que cela est fait pour tous les états. Ainsi, la transcription est conforme au diagramme, et les sorties représentées suivent la séquence attendue.
### Question filtre 3 : Validez-vous la conception de l’unité de contrôle ?
Oui, nous avons validé la conception de l’unité de contrôle. Après avoir mis une chanson sur YouTube, avec des casques audio connectés à la protoboard, nous avons pu écouter la musique, même si la qualité n’était pas la meilleure parce qu’il y avait beaucoup de bruit. De plus, en activant ou non les interrupteurs, il y avait quelques modifications, comme le volume, le niveau de bruit etc.
### Question filtre 4 : Combien de processus sont utilisés et de quelles natures sont-ils ?
Quatre processus sont utilisés, et ils sont tous de nature séquentielle.
### Question filtre 5 : La simulation vous permet-elle de valider votre description VHDL ? Sinon, quel élément pose problème ? Comment pouvez-vous le corriger ? Justifiez
La simulation nous a d'abord permis de constater que l'unité opérative générait une séquence incorrecte par rapport à la séquence attendue. Cependant, nous avons identifié que le problème venait uniquement de l'absence d'arrondi des valeurs en fonction du premier chiffre décimal. En appliquant cet ajustement, la séquence est devenue conforme aux attentes.
### Question filtre 6 : Validez-vous la conception de l’unité opérative ? Sinon, quel élément pose problème ? Comment pouvez-vous le corriger ?
Oui, nous validons la conception de l’unité opérative. Nous l’avons testée sur la carte FPGA en faisant jouer une musique sur YouTube, et nous avons obtenu des résultats conformes aux attentes.
\ No newline at end of file
docs/img/ControlUnitSequence.png

60.6 KiB

docs/img/FSM.drawio.png

131 KiB

docs/img/OperativeUnitSequence.png

54.2 KiB

docs/img/controlUnitTest1.png

55.9 KiB

docs/img/controlUnitTest2.png

57.9 KiB

......@@ -49,34 +49,58 @@ architecture archi_operativeUnit of controlUnit is
begin
process (_BLANK_) is
process (I_reset, I_clock) is
begin
if I_reset = '1' then -- asynchronous reset (active high)
SR_presentState <= _BLANK_
SR_presentState <= WAIT_SAMPLE;
elsif rising_edge(I_clock) then -- rising clock edge
_BLANK_
SR_presentState <= SR_futurState;
end if;
end process;
process (_BLANK_) is
process (SR_presentState, I_inputSampleValid, I_processingDone) is
begin
case SR_presentState is
when WAIT_SAMPLE =>
_BLANK_
if (I_inputSampleValid = '1') then
SR_futurState <= STORE;
else
SR_futurState <= WAIT_SAMPLE;
end if;
when STORE =>
SR_futurState <= PROCESSING_LOOP;
when PROCESSING_LOOP =>
if (I_processingDone = '1') then
SR_futurState <= OUTPUT;
else
SR_futurState <= PROCESSING_LOOP;
end if;
when OUTPUT =>
SR_futurState <= WAIT_END_SAMPLE;
when WAIT_END_SAMPLE =>
if (I_inputSampleValid = '0') then
SR_futurState <= WAIT_SAMPLE;
else
SR_futurState <= WAIT_END_SAMPLE;
end if;
when others => null;
end case;
end process;
O_loadShift <= '1' when _BLANK_ ;
O_initAddress <= '1' when _BLANK_ ;
O_incrAddress <= '1' when _BLANK_ ;
O_initSum <= '1' when _BLANK_ ;
O_loadSum <= '1' when _BLANK_ ;
O_loadY <= '1' when _BLANK_ ;
O_FilteredSampleValid <= '1' when _BLANK_ ;
O_loadShift <= '1' when SR_presentState=STORE else '0';
O_initAddress <= '1' when SR_presentState=STORE else '0';
O_incrAddress <= '1' when SR_presentState=PROCESSING_LOOP else '0';
O_initSum <= '1' when SR_presentState=STORE else '0';
O_loadSum <= '1' when SR_presentState=PROCESSING_LOOP else '0';
O_loadY <= '1' when SR_presentState=OUTPUT else '0';
O_FilteredSampleValid <= '1' when SR_presentState=WAIT_END_SAMPLE else '0';
......
......@@ -41,14 +41,14 @@ entity operativeUnit is
I_initSum : in std_logic; -- Control signal to initialize the MAC register
I_loadSum : in std_logic; -- Control signal to load the MAC register;
I_loadY : in std_logic; -- Control signal to load Y register
O_processingDone : out std_logic; -- Indicate that processing is done
O_processingDone : out std_logic; -- Indicate that processing is done -- loadOutput
O_Y : out std_logic_vector(7 downto 0) -- filtered sample
);
end entity operativeUnit;
architecture arch_operativeUnit of operativeUnit is
type registerFile is array(0 to 15) of signed(7 downto 0);
type registerFile is array(0 to 15) of signed(7 downto 0); -- chiffres entiers
signal SR_coefRegister : registerFile;
......@@ -65,9 +65,9 @@ architecture arch_operativeUnit of operativeUnit is
begin
-- Low-pass filter provided with octave (or Matlab ;)) command
-- Low-pass filter provided with octave (or Matlab command
--fir1(15, .001)/sqrt(sum(fir1(15, .001).^2))*2^6
SR_coefRegister <= (to_signed(2, 8), -- ROM register used file to store FIR coefficients
SR_coefRegister <= (to_signed(2, 8), -- ROM register used file to store FIR coefficients -- chiffres fractionnaires entre -1 et +1; premier chiffre est signée
to_signed(3, 8),
to_signed(6, 8),
to_signed(10, 8),
......@@ -85,45 +85,72 @@ begin
to_signed(2, 8)
);
shift : process (_BLANK_) is
shift : process (I_reset, I_clock) is
begin -- process shift
if I_reset = '1' then -- asynchronous reset (active high)
SR_shiftRegister <= (others => (others => '0'));
elsif _BLANK_
elsif rising_edge(I_clock) then
if (I_loadShift = '1') then
SR_shiftRegister(1 to 15) <= SR_shiftRegister(0 to 14);
SR_shiftRegister(0) <= SIGNED(I_inputSample);
end if;
end if;
end process shift;
incr_address : process (_BLANK_) is
incr_address : process (I_reset, I_clock) is
begin
if I_reset = '1' then -- asynchronous reset (active high)
SR_readAddress <= 0;
elsif _BLANK_
elsif rising_edge(I_clock) then
if (I_initAddress = '1') then
SR_readAddress <= 0;
elsif (I_incrAddress = '1') then
if (SR_readAddress = 15) then
SR_readAddress <= 0;
else
SR_readAddress <= SR_readAddress + 1;
end if;
end if;
end if;
end process incr_address;
O_processingDone <= '1' when _BLANK_ ;
O_processingDone <= '1' when SR_readAddress = 14 else '0' ;
SC_multOperand1 <= _BLANK_ ; -- 8 bits
SC_multOperand2 <= _BLANK_ ; -- 8 bits
SC_MultResult <= _BLANK_ ; -- 16 bits
SC_multOperand1 <= SR_shiftRegister(SR_readAddress); -- 8 bits
SC_multOperand2 <= SR_coefRegister(SR_readAddress); -- 8 bits
SC_MultResult <= SC_multOperand1*SC_multOperand2; -- 16 bits
SC_addResult <= resize(SC_MultResult, SC_addResult'length) + SR_sum;
sum_acc : process (_BLANK_) is
sum_acc : process (I_reset, I_clock) is
begin
if I_reset = '1' then -- asynchronous reset (active high)
SR_sum <= (others => '0');
elsif _BLANK_
elsif rising_edge(I_clock) then
if (I_initSum= '1') then
SR_sum <= (others => '0');
elsif (I_loadSum = '1') then
SR_sum <= SC_addResult;
end if;
end if;
end process sum_acc;
store_result : process (_BLANK_) is
store_result : process (I_reset, I_clock) is
begin
_BLANK_
if I_reset = '1' then -- asynchronous reset (active high)
SR_Y <= (others => '0');
elsif rising_edge(I_clock) then
if (I_loadY= '1') then
if SC_addResult(6) = '1' then
SR_Y <= SC_addResult(14 downto 7) + 1;
else
SR_Y <= SC_addResult(14 downto 7);
end if;
end if;
end if;
end process store_result;
O_Y <= std_logic_vector(SR_Y);
end architecture arch_operativeUnit;
end architecture arch_operativeUnit;
\ No newline at end of file
#-----------------------------------------------------------
# Vivado v2024.1 (64-bit)
# SW Build 5076996 on Wed May 22 18:36:09 MDT 2024
# IP Build 5075265 on Wed May 22 21:45:21 MDT 2024
# SharedData Build 5076995 on Wed May 22 18:29:18 MDT 2024
# Start of session at: Tue Mar 4 11:35:53 2025
# Process ID: 51844
# Current directory: /homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant-g24obuzo
# Command line: vivado
# Log file: /homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant-g24obuzo/vivado.log
# Journal file: /homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant-g24obuzo/vivado.jou
# Running On :fl-tp-br-634
# Platform :Ubuntu
# Operating System :Ubuntu 24.04.2 LTS
# Processor Detail :Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
# CPU Frequency :1100.200 MHz
# CPU Physical cores:4
# CPU Logical cores :4
# Host memory :33538 MB
# Swap memory :4294 MB
# Total Virtual :37833 MB
# Available Virtual :35155 MB
#-----------------------------------------------------------
start_gui
open_project /homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant/tp-filtre-etudiant.xpr
update_compile_order -fileset sources_1
launch_simulation
open_wave_config /homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant/tb_firUnit_behav.wcfg
source tb_firUnit.tcl
run 10 us
save_wave_config {/homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant/tb_firUnit_behav.wcfg}
open_hw_manager
connect_hw_server -allow_non_jtag
open_hw_target
set_property PROGRAM.FILE {/homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant/tp-filtre-etudiant.runs/impl_1/audioProc.bit} [get_hw_devices xc7a200t_0]
current_hw_device [get_hw_devices xc7a200t_0]
refresh_hw_device -update_hw_probes false [lindex [get_hw_devices xc7a200t_0] 0]
set_property PROBES.FILE {} [get_hw_devices xc7a200t_0]
set_property FULL_PROBES.FILE {} [get_hw_devices xc7a200t_0]
set_property PROGRAM.FILE {/homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant/tp-filtre-etudiant.runs/impl_1/audioProc.bit} [get_hw_devices xc7a200t_0]
program_hw_devices [get_hw_devices xc7a200t_0]
refresh_hw_device [lindex [get_hw_devices xc7a200t_0] 0]
set_property PROBES.FILE {} [get_hw_devices xc7a200t_0]
set_property FULL_PROBES.FILE {} [get_hw_devices xc7a200t_0]
set_property PROGRAM.FILE {/homes/g24obuzo/Documents/UEG_MEDCONS/tp-filtre-etudiant-g24obuzo/tp-filtre-etudiant/tp-filtre-etudiant.runs/impl_1/audioProc.bit} [get_hw_devices xc7a200t_0]
program_hw_devices [get_hw_devices xc7a200t_0]
refresh_hw_device [lindex [get_hw_devices xc7a200t_0] 0]
close_hw_manager
open_project /homes/g24obuzo/Documents/UEF_Integrated_Electronics/TP2_Sobel/sobel/sobel.xpr
current_project tp-filtre-etudiant
current_project sobel
close_project
close_sim
This diff is collapsed.