parser: kleinere anpassungen. eine aenderung verursacht zwar mehr logic
authorBernhard Urban <lewurm@gmail.com>
Mon, 24 May 2010 18:49:15 +0000 (20:49 +0200)
committerBernhard Urban <lewurm@gmail.com>
Mon, 24 May 2010 18:49:15 +0000 (20:49 +0200)
elements, wird aber verstaendlicher...

logic elements: 2715 -> 2705

src/TODO
src/parser.vhd

index 9dcc181164248438fa16f9841e2df6652c40cd8c..0704608570d75ad53192fad54ef3e407fe5162e1 100644 (file)
--- a/src/TODO
+++ b/src/TODO
 
 
 == low prio ==
 
 
 == low prio ==
-- mehr testfaelle fuer alu/scanner/parser
-- parser refactor
 - logic elements eliminieren
 
 == jakob/thomas fragen ==
 - sram warning @ quartus
 - coverage fuer abgabe noetig?
 - bei -cover funktioniert 's' nicht, siehe http://pastebin.com/p8RwNk7j
 - logic elements eliminieren
 
 == jakob/thomas fragen ==
 - sram warning @ quartus
 - coverage fuer abgabe noetig?
 - bei -cover funktioniert 's' nicht, siehe http://pastebin.com/p8RwNk7j
-- wo sieht man f_max im quartus?
 - wie detailiert muessen die screenshots der simulationen sein?
 - wie detailiert muessen die screenshots der simulationen sein?
+
+
+== FAQ =
+Q: wo sieht man f_max im quartus?
+A: in der project_gen.tcl die zeile 
+       > set_global_assignment -name FMAX_REQUIREMENT "33.33 MHz" -section_id sys_clk
+   entfernen und danach das quartus projekt neu erstellen. danach sollte fmax im
+   timing report ersichtlich sein.
index 2bf4e9540b74ecdd61b1fa5f8a8354af9a7753f1..39b9a96adac28ca3d9fde605046113962e677361 100644 (file)
@@ -245,42 +245,27 @@ begin
                                        state_next <= SREAD_SPACE_PROC_SIGN;
                                end if;
                        when SREAD_SPACE_PROC | SREAD_SPACE_PROC_SIGN =>
                                        state_next <= SREAD_SPACE_PROC_SIGN;
                                end if;
                        when SREAD_SPACE_PROC | SREAD_SPACE_PROC_SIGN =>
-                               case p_read is
-                                       when x"20" => null;
-                                       when x"2D" =>
-                                               case state_int is
-                                                       when SREAD_SPACE_PROC =>
-                                                               case state_int is
-                                                                       when SREAD_SPACE_PROC => state_next <= SREAD_SIGN;
-                                                                       when others => assert(false) report "wtf @ state3";
-                                                               end case;
-
-                                                       when SREAD_SPACE_PROC_SIGN =>
-                                                               p_rget_next <= '1';
-                                                               case state_int is
-                                                                       when SREAD_SPACE_PROC => state_next <= SREAD_NEXTBYTE;
-                                                                       when SREAD_SPACE_PROC_SIGN => state_next <= SREAD_OP1;
-                                                                       when others => assert(false) report "wtf @ state2";
-                                                               end case;
-
-                                                       when others => assert(false) report "SREAD_SPACE_PROC/3: shouldn't happen";
-                                               end case;
-                                       when others =>
-                                               p_rget_next <= '1';
-                                               case state_int is
-                                                       when SREAD_SPACE_PROC => state_next <= SREAD_NEXTBYTE;
-                                                       when SREAD_SPACE_PROC_SIGN => state_next <= SREAD_OP1;
-                                                       when others => assert(false) report "wtf @ state2";
-                                               end case;
-                               end case;
-
                                if p_rdone = '0' then
                                        case state_int is
                                                when SREAD_SPACE_PROC => state_next <= SREAD_SPACE_GET;
                                                when SREAD_SPACE_PROC_SIGN => state_next <= SREAD_SPACE_GET_SIGN;
                                                when others => assert(false) report "wtf @ state1";
                                        end case;
                                if p_rdone = '0' then
                                        case state_int is
                                                when SREAD_SPACE_PROC => state_next <= SREAD_SPACE_GET;
                                                when SREAD_SPACE_PROC_SIGN => state_next <= SREAD_SPACE_GET_SIGN;
                                                when others => assert(false) report "wtf @ state1";
                                        end case;
+                               else
+                                       if p_read = x"2d" and state_int = SREAD_SPACE_PROC then
+                                               -- vorzeichen?
+                                               state_next <= SREAD_SIGN;
+                                       elsif p_read /= x"20" then
+                                               -- leerzeichen sollen ignoriert werden
+                                               p_rget_next <= '1';
+                                               case state_int is
+                                                       when SREAD_SPACE_PROC => state_next <= SREAD_NEXTBYTE;
+                                                       when SREAD_SPACE_PROC_SIGN => state_next <= SREAD_OP1;
+                                                       when others => assert(false) report "SREAD_SPACE_PROC{,_SIGN}: shouldn't happen";
+                                               end case;
+                                       end if;
                                end if;
                                end if;
+
                        when SREAD_SIGN =>
                                z_sign_next <= '1';
                                if p_rdone = '0' then
                        when SREAD_SIGN =>
                                z_sign_next <= '1';
                                if p_rdone = '0' then
@@ -336,9 +321,7 @@ begin
                                state_next <= SREAD_OP2;
                        when SREAD_OP2 =>
                                if p_rdone = '0' then
                                state_next <= SREAD_OP2;
                        when SREAD_OP2 =>
                                if p_rdone = '0' then
-                                       if aktop_int /= ALU_NOP then
-                                               state_next <= SCALC_1;
-                                       end if;
+                                       state_next <= SCALC_1;
                                end if;
 
                        when SCALC_1 =>
                                end if;
 
                        when SCALC_1 =>
@@ -507,6 +490,9 @@ begin
                                end if;
 
                        when SERROR1 =>
                                end if;
 
                        when SERROR1 =>
+                               p_wtake_next <= '1';
+                               p_write_next <= hbyte(to_unsigned (character'pos(error_str(err_int)(errc_int)),8));
+                               errc_tmp_next <= errc_int - 1;
                                if p_wdone = '1' then
                                        if errc_int <= 2 then
                                                state_next <= SDONE;
                                if p_wdone = '1' then
                                        if errc_int <= 2 then
                                                state_next <= SDONE;
@@ -515,6 +501,7 @@ begin
                                        end if;
                                end if;
                        when SERROR2 =>
                                        end if;
                                end if;
                        when SERROR2 =>
+                               errc_next <= errc_tmp_int;
                                if p_wdone = '0' then
                                        state_next <= SERROR1;
                                end if;
                                if p_wdone = '0' then
                                        state_next <= SERROR1;
                                end if;
@@ -532,13 +519,8 @@ begin
 
                -- fehlerbehandlung
                case state_int is
 
                -- fehlerbehandlung
                case state_int is
-                       when SERROR1 =>
-                               p_wtake_next <= '1';
-                               p_write_next <= hbyte(to_unsigned (character'pos(error_str(err_int)(errc_int)),8));
-                               errc_tmp_next <= errc_int - 1;
-                       when SERROR2 =>
-                               errc_next <= errc_tmp_int;
-                       when SDONE => null;
+                       -- diese states sind ausgenommen vom "pokemon-exception-handling"
+                       when SERROR1 | SERROR2 | SDONE => null;
                        when others =>
                                if calc_error = '1' then
                                        if op2_int = 0 then
                        when others =>
                                if calc_error = '1' then
                                        if op2_int = 0 then