Page 242 - 《软件学报》2021年第6期
P. 242

1816                                     Journal of Software  软件学报 Vol.32, No.6,  June 2021

             signal_light_S2<==2 and skip;
             int signal_light_S3 and signal_light_S3<==0 and skip;
             signal_light_S3<==3 and skip;
             int signal_light_S4 and signal_light_S4<==0 and skip;
             signal_light_S4<==4 and skip;
             int Old_counter_clkand Old_counter_clk:=0;
             int Old_counter_clk_tempand Old_counter_clk_temp:=0;
             int Old_counter_rstand Old_counter_rst:=0;
             int Old_counter_rst_tempand Old_counter_rst_temp:=0;
             int Old_signal_light_clkand Old_signal_light_clk:=0;
             int Old_signal_light_clk_tempand Old_signal_light_clk_temp:=0;
             while (now<cycle_num){
             counter(signal_light_top_clk[now],signal_light_top_rst[now]);
             reg_signal_light_top_count:=counter_counter_count;
             TEMP<==reg_signal_light_top_count and skip;
             every_i:=0;
             while (every_i≤5)
             {signal_light_top_count[every_i]:=TEMP%2;
             every_i:=every_i+1;
             TEMP:=TEMP/2};
             signal_light(signal_light_top_clk[now],signal_light_top_rst[now],reg_signal_light_top_count);
             reg_signal_light_top_light1:=signal_light_signal_light_light1;
             TEMP<==reg_signal_light_top_light1 and skip;
             every_i:=0;
             while (every_i≤2)
             {signal_light_top_light1[every_i]:=TEMP%2;
             every_i:=every_i+1;
             TEMP:=TEMP/2};
             reg_signal_light_top_light2:=signal_light_signal_light_light2;
             TEMP<==reg_signal_light_top_light2 and skip;
             every_i:=0;
             while (every_i≤2)
             {signal_light_top_light2[every_i]:=TEMP%2;
             every_i:=every_i+1;
             TEMP:=TEMP/2};
             Old_counter_clk:=Old_counter_clk_temp;
             Old_counter_rst:=Old_counter_rst_temp;
             Old_signal_light_clk:=Old_signal_light_clk_temp;
             output (“interval”) and skip;
             output (signal_light_top_clk[now]) and skip;
             output (signal_light_top_rst[now]) and skip;
             output (signal_light_top_light1[2]) and skip;
   237   238   239   240   241   242   243   244   245   246   247