Maverick_ 17 April 7, 2020 Posted April 7, 2020 · Report post " как мне сделать скалабилити. я хочу задать d0 - dN. generate cell_0 - cell_N " если Вы это сделаете, выложите пожалуйста здесь PS Сейчас по работе сильно загружен... Quote Share this post Link to post Share on other sites More sharing options...
jenya7 0 April 7, 2020 Posted April 7, 2020 · Report post 1 hour ago, Maverick_ said: " как мне сделать скалабилити. я хочу задать d0 - dN. generate cell_0 - cell_N " если Вы это сделаете, выложите пожалуйста здесь PS Сейчас по работе сильно загружен... спасибо Quote Share this post Link to post Share on other sites More sharing options...
vt313 0 April 9, 2020 Posted April 9, 2020 · Report post В 07.04.2020 в 12:16, jenya7 сказал: месье. жё не манж па си жур. предложите рабочий вариант пожалуйста. process(rst,clk) begin if rst = '1' then cnt_s <= x"0"; cnt_s0 <= x"5"; fl0 <= '0'; run_s <= '1'; elsif clk = '1' and clk'event then if start = '1' then cnt_s <= x"0"; elsif cnt_s = cnt_s0 then cnt_s <= x"0"; elsif run_s = '1' then cnt_s <= cnt_s + 1; end if; if start = '1' then cnt_s0 <= x"5"; elsif cnt_s = cnt_s0 then cnt_s0 <= cnt_s0 - 1; end if; if d_s(conv_integer(cnt_s)) > d_s(conv_integer(cnt_s + 1)) then d_s(conv_integer(cnt_s)) <= d_s(conv_integer(cnt_s + 1)); d_s(conv_integer(cnt_s+1)) <= d_s(conv_integer(cnt_s)); end if; if cnt_s = cnt_s0 then fl0 <= '1'; elsif d_s(conv_integer(cnt_s)) > d_s(conv_integer(cnt_s + 1)) then fl0 <= '0'; end if; if start = '1' then run_s <= '1'; elsif cnt_s = cnt_s0 and fl0 = '1' then run_s <= '0'; end if; end if; end process; fin <= not run_s; Пузырьковый метод, на массив в 6 элементов ( cnt_s0 <= x"5";). Если что не понятно, пишите. Quote Share this post Link to post Share on other sites More sharing options...
jenya7 0 April 9, 2020 Posted April 9, 2020 (edited) · Report post 11 hours ago, vt313 said: Пузырьковый метод, на массив в 6 элементов ( cnt_s0 <= x"5";). Если что не понятно, пишите. спасибо. а можно энтити для полноты картины? Edited April 9, 2020 by jenya7 Quote Share this post Link to post Share on other sites More sharing options...
vt313 0 April 10, 2020 Posted April 10, 2020 · Report post 12 часов назад, jenya7 сказал: спасибо. а можно энтити для полноты картины? Вы, каким-то образом, задаете массив и получаете результат. Это Ваши протоколы. Опишите их. Quote Share this post Link to post Share on other sites More sharing options...