TA147

Ejecicios y trabajos prácticos de la materia Taller de Sistemas Digitales (TA147)
Index Commits Files Refs
commit aac37b56ff30d051ab324e271fee685b5a03f71d
parent af9b53d2a233e10b6d073607e67772a4b0332701
Author: Martin Klöckner <mjkloeckner@gmail.com>
Date:   Sat, 18 Apr 2026 08:40:39 -0300

Revert to af9b53d2a233e10b6d073607e67772a4b0332701

Diffstat:
Mtps/1/informe/img/statechart.png | 0
Mtps/1/informe/img/statechart_trim.png | 0
Dtps/1/informe/img/waveform_view_whiter.png | 0
Mtps/1/informe/informe.pdf | 0
Mtps/1/informe/informe.tex | 11+++++++----
Mtps/1/src/Makefile | 2+-
Mtps/1/src/intersection_ctrl.vhd | 14+-------------
7 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/tps/1/informe/img/statechart.png b/tps/1/informe/img/statechart.png
Binary files differ.
diff --git a/tps/1/informe/img/statechart_trim.png b/tps/1/informe/img/statechart_trim.png
Binary files differ.
diff --git a/tps/1/informe/img/waveform_view_whiter.png b/tps/1/informe/img/waveform_view_whiter.png
Binary files differ.
diff --git a/tps/1/informe/informe.pdf b/tps/1/informe/informe.pdf
Binary files differ.
diff --git a/tps/1/informe/informe.tex b/tps/1/informe/informe.tex
@@ -143,7 +143,10 @@ fontupper={\ttfamily\mystrut}}
     \textsc{\Large TA147}\\[0.2 cm]
     \textsc{\large Taller de Sistemas Digitales}\\[4 cm]
     \textcolor{cyan}{{
-        \fontsize{25}{32}\selectfont \bfseries \thetitle
+        \begin{minipage}{\textwidth}
+            \centering
+            \fontsize{26}{32}\selectfont \bfseries \thetitle
+        \end{minipage}
     }}\\[0.5cm]
     \vspace{1em}
     {\Large \bfseries Primer Trabajo Práctico}\\[5cm]
@@ -203,13 +206,13 @@ que controle el estado de dos semaforos en la intersección de dos calles.
 Para la implementacion del control de los dos semaforos se modela al sistema
 como una maquina de estados finita compuesta de seis estados ciclicos, en la que
 cada estado representa una configuración de luces. El diagrama de estados de la
-maquina de estados diseñada se muestra en la figura \ref{waveform_view}.
+maquina de estados diseñada se muestra en la figura \ref{statechart}.
 
 \begin{figure}[!ht]
     \centering
     \includegraphics[width=1.00\textwidth]{img/statechart_trim.png}
     \caption{Diagrama de estados del control de semaforos}
-    \label{waveform_view}
+    \label{statechart}
 \end{figure}
 
 Para este trabajo se considera que el estado de cada semaforo es, ordenados en
@@ -316,7 +319,7 @@ la simulacion se muestra en la figura \ref{waveform_view} a continuación.
 
 \begin{figure}[!ht]
     \centering
-    \includegraphics[width=1.00\textwidth]{img/waveform_view_whiter.png}
+    \includegraphics[width=1.00\textwidth]{img/waveform_view.png}
     \caption{Resultado de las señales simuladas}
     \label{waveform_view}
 \end{figure}
diff --git a/tps/1/src/Makefile b/tps/1/src/Makefile
@@ -15,7 +15,7 @@ elaborate: analyze
     $(GHDL) -e $(TOP)
 
 run: elaborate
-    $(GHDL) -r $(TOP) --vcd=$(WAVEFORM_FILE) --stop-time=200ms
+    $(GHDL) -r $(TOP) --vcd=$(WAVEFORM_FILE) --stop-time=1ms --stop-delta=100000
 
 clean:
     rm -f *.o *.cf $(TOP) $(TOP).vcd
diff --git a/tps/1/src/intersection_ctrl.vhd b/tps/1/src/intersection_ctrl.vhd
@@ -39,7 +39,7 @@ begin
         rst   => rst,
         clk_ms => clk_ms);
 
-    process(clk_ms, rst) is
+    process(rst, clk_ms, ms_tick_cnt, state) is
     begin
 
         if rst = '1' then
@@ -50,7 +50,6 @@ begin
             case state is
                 when state_0 =>
                     if ms_tick_cnt = RED_TIME_MS then
-
                         ms_tick_cnt <= (others => '0');
                         state <= state_1;
 
@@ -60,11 +59,9 @@ begin
                         red_2 <= '0';
                         yel_2 <= '1';
                         gre_2 <= '0';
-
                     end if;
                 when state_1 =>
                     if ms_tick_cnt = YEL_TIME_MS then
-
                         ms_tick_cnt <= (others => '0');
                         state <= state_2;
 
@@ -74,11 +71,9 @@ begin
                         red_2 <= '1';
                         yel_2 <= '0';
                         gre_2 <= '0';
-
                     end if;
                 when state_2 =>
                     if ms_tick_cnt = YEL_TIME_MS then
-
                         ms_tick_cnt <= (others => '0');
                         state <= state_3;
 
@@ -88,11 +83,9 @@ begin
                         red_2 <= '1';
                         yel_2 <= '0';
                         gre_2 <= '0';
-
                     end if;
                 when state_3 =>
                     if ms_tick_cnt = GRE_TIME_MS then
-
                         ms_tick_cnt <= (others => '0');
                         state <= state_4;
 
@@ -102,11 +95,9 @@ begin
                         red_2 <= '1';
                         yel_2 <= '0';
                         gre_2 <= '0';
-
                     end if;
                 when state_4 =>
                     if ms_tick_cnt = YEL_TIME_MS then
-
                         ms_tick_cnt <= (others => '0');
                         state <= state_5;
 
@@ -116,11 +107,9 @@ begin
                         red_2 <= '1';
                         yel_2 <= '1';
                         gre_2 <= '0';
-
                     end if;
                 when state_5 =>
                     if ms_tick_cnt = YEL_TIME_MS then
-
                         ms_tick_cnt <= (others => '0');
                         state <= state_0;
 
@@ -130,7 +119,6 @@ begin
                         red_2 <= '0';
                         yel_2 <= '0';
                         gre_2 <= '1';
-
                     end if;
             end case;
         end if;